From beb882756b96a70c7cdd8cbe52ebff9e5b0d1e35 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:09:24 -0500 Subject: [PATCH 1/4] another overflow --- neo/rawio/plexonrawio.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/neo/rawio/plexonrawio.py b/neo/rawio/plexonrawio.py index 5593ab2e9..cc79417e3 100644 --- a/neo/rawio/plexonrawio.py +++ b/neo/rawio/plexonrawio.py @@ -209,7 +209,9 @@ def _parse_header(self): for index, pos in enumerate(positions): bl_header = data[pos : pos + 16].view(DataBlockHeader)[0] - timestamp = bl_header["UpperByteOf5ByteTimestamp"] * 2**32 + bl_header["TimeStamp"] + current_upper_byte_of_5_byte_timestamp = int(bl_header["UpperByteOf5ByteTimestamp"]) + current_bl_timestamp = int(bl_header["TimeStamp"]) + timestamp = current_upper_byte_of_5_byte_timestamp * 2**32 + current_bl_timestamp n1 = bl_header["NumberOfWaveforms"] n2 = bl_header["NumberOfWordsInWaveform"] sample_count = n1 * n2 From 1148431a094f053511d62a5fef420bec32e18153 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:23:18 -0500 Subject: [PATCH 2/4] try testing with 4chDemo --- examples/plot_read_files_neo_io.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/plot_read_files_neo_io.py b/examples/plot_read_files_neo_io.py index d40ee37a4..30b6a3991 100644 --- a/examples/plot_read_files_neo_io.py +++ b/examples/plot_read_files_neo_io.py @@ -14,8 +14,8 @@ url_repo = "https://web.gin.g-node.org/NeuralEnsemble/ephy_testing_data/raw/master/" # Plexon files -distantfile = url_repo + "plexon/File_plexon_3.plx" -localfile = "File_plexon_3.plx" +distantfile = url_repo + "plexon/4chDemoPLX.plx" +localfile = "4chDemoPLX.plx" urllib.request.urlretrieve(distantfile, localfile) @@ -23,7 +23,7 @@ # Now we can create our reader and read some data # create a reader -reader = neo.io.PlexonIO(filename="File_plexon_3.plx") +reader = neo.io.PlexonIO(filename="4chDemoPlx.plx") # read the blocks blks = reader.read(lazy=False) print(blks) From 11941a429ab68a23e53c0b3f9ea9f44750c1a73d Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:29:33 -0500 Subject: [PATCH 3/4] oops --- examples/plot_read_files_neo_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/plot_read_files_neo_io.py b/examples/plot_read_files_neo_io.py index 30b6a3991..21f3a7045 100644 --- a/examples/plot_read_files_neo_io.py +++ b/examples/plot_read_files_neo_io.py @@ -23,7 +23,7 @@ # Now we can create our reader and read some data # create a reader -reader = neo.io.PlexonIO(filename="4chDemoPlx.plx") +reader = neo.io.PlexonIO(filename="4chDemoPLX.plx") # read the blocks blks = reader.read(lazy=False) print(blks) From 2a70edb626712455d794b00840b7460015360e81 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:56:32 -0500 Subject: [PATCH 4/4] limit numpy 2.0 for docs --- examples/plot_read_files_neo_io.py | 6 +++--- pyproject.toml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/plot_read_files_neo_io.py b/examples/plot_read_files_neo_io.py index 21f3a7045..d40ee37a4 100644 --- a/examples/plot_read_files_neo_io.py +++ b/examples/plot_read_files_neo_io.py @@ -14,8 +14,8 @@ url_repo = "https://web.gin.g-node.org/NeuralEnsemble/ephy_testing_data/raw/master/" # Plexon files -distantfile = url_repo + "plexon/4chDemoPLX.plx" -localfile = "4chDemoPLX.plx" +distantfile = url_repo + "plexon/File_plexon_3.plx" +localfile = "File_plexon_3.plx" urllib.request.urlretrieve(distantfile, localfile) @@ -23,7 +23,7 @@ # Now we can create our reader and read some data # create a reader -reader = neo.io.PlexonIO(filename="4chDemoPLX.plx") +reader = neo.io.PlexonIO(filename="File_plexon_3.plx") # read the blocks blks = reader.read(lazy=False) print(blks) diff --git a/pyproject.toml b/pyproject.toml index c6fd2fa19..79cc1a849 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,8 @@ docs = [ "matplotlib", "nixio", "pynwb", - "igor2" + "igor2", + "numpy<2.0" # https://github.com/NeuralEnsemble/python-neo/pull/1612 ] dev = [