Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions neo/rawio/blackrockrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ class BlackrockRawIO(BaseRawIO):
extensions.extend(["nev", "sif", "ccf"]) # 'sif', 'ccf' not yet supported
rawmode = "multi-file"

# We need to document the origin of this value
main_sampling_rate = 30000.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm not sure about this. Black rock has so many versions. I would want a link to docs or something to indicate this is the required. Most software gives you some options.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this was already hardcoded. This is only to make it accessible without parsing.



def __init__(
self, filename=None, nsx_override=None, nev_override=None, nsx_to_load=None, load_nev=True, verbose=False
):
Expand Down Expand Up @@ -250,7 +254,6 @@ def __init__(

def _parse_header(self):

main_sampling_rate = 30000.0

event_channels = []
spike_channels = []
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -392,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"]:
Expand Down
Loading