From 3bfcfb3f93db73964c8456435785cc804f47303e Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 8 Apr 2025 09:09:26 -0600 Subject: [PATCH 1/2] blackrock main sampling rate --- neo/rawio/blackrockrawio.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/neo/rawio/blackrockrawio.py b/neo/rawio/blackrockrawio.py index e0d3a7fa1..b99d02677 100644 --- a/neo/rawio/blackrockrawio.py +++ b/neo/rawio/blackrockrawio.py @@ -129,6 +129,10 @@ class BlackrockRawIO(BaseRawIO): extensions = ["ns" + str(_) for _ in range(1, 7)] extensions.extend(["nev", "sif", "ccf"]) # 'sif', 'ccf' not yet supported rawmode = "multi-file" + # At the moment, this is used as the frequency of the spike channels + # We need to document the origin of this value + main_sampling_rate = 30000.0 + def __init__( self, filename=None, nsx_override=None, nev_override=None, nsx_to_load=None, load_nev=True, verbose=False @@ -250,7 +254,6 @@ def __init__( def _parse_header(self): - main_sampling_rate = 30000.0 event_channels = [] spike_channels = [] @@ -298,7 +301,7 @@ def _parse_header(self): # TODO: Double check if this is the correct assumption (10 samples) # default value: threshold crossing after 10 samples of waveform wf_left_sweep = 10 - wf_sampling_rate = main_sampling_rate + wf_sampling_rate = self.main_sampling_rate spike_channels.append((name, _id, wf_units, wf_gain, wf_offset, wf_left_sweep, wf_sampling_rate)) # scan events From 7c86537bf3fa969ddfba56c909102e14f135ba88 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 8 Apr 2025 09:15:20 -0600 Subject: [PATCH 2/2] other use --- neo/rawio/blackrockrawio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neo/rawio/blackrockrawio.py b/neo/rawio/blackrockrawio.py index b99d02677..69ab0ec3c 100644 --- a/neo/rawio/blackrockrawio.py +++ b/neo/rawio/blackrockrawio.py @@ -129,7 +129,7 @@ class BlackrockRawIO(BaseRawIO): extensions = ["ns" + str(_) for _ in range(1, 7)] extensions.extend(["nev", "sif", "ccf"]) # 'sif', 'ccf' not yet supported rawmode = "multi-file" - # At the moment, this is used as the frequency of the spike channels + # We need to document the origin of this value main_sampling_rate = 30000.0 @@ -395,7 +395,7 @@ def _parse_header(self): _data_reader_fun = self.__nsx_data_reader[spec] self.nsx_datas[nsx_nb] = _data_reader_fun(nsx_nb) - sr = float(main_sampling_rate / self.__nsx_basic_header[nsx_nb]["period"]) + sr = float(self.main_sampling_rate / self.__nsx_basic_header[nsx_nb]["period"]) self.sig_sampling_rates[nsx_nb] = sr if spec in ["2.2", "2.3", "3.0"]: