From db311396336b825ed454e696ec407ba630318429 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 14 May 2024 07:41:03 -0600 Subject: [PATCH 1/8] add annotations to intan --- neo/rawio/intanrawio.py | 82 +++++++++++++++++++++++++++++++---------- 1 file changed, 63 insertions(+), 19 deletions(-) diff --git a/neo/rawio/intanrawio.py b/neo/rawio/intanrawio.py index 4a59c560e..c717d30db 100644 --- a/neo/rawio/intanrawio.py +++ b/neo/rawio/intanrawio.py @@ -44,7 +44,7 @@ class IntanRawIO(BaseRawIO): Parameters ---------- filename: str, default: '' - name of the 'rhd' or 'rhs' data file + name of the 'rhd' or 'rhs' data file Notes ----- @@ -109,7 +109,7 @@ def _parse_header(self): ( self._global_info, - self._ordered_channels, + self._ordered_channel_info, data_dtype, header_size, self._block_size, @@ -135,7 +135,7 @@ def _parse_header(self): ( self._global_info, - self._ordered_channels, + self._ordered_channel_info, data_dtype, header_size, self._block_size, @@ -191,7 +191,7 @@ def _parse_header(self): # signals signal_channels = [] - for c, chan_info in enumerate(self._ordered_channels): + for c, chan_info in enumerate(self._ordered_channel_info): name = chan_info["custom_channel_name"] channel_id = chan_info["native_channel_name"] sig_dtype = chan_info["dtype"] @@ -255,6 +255,50 @@ def _parse_header(self): self._generate_minimal_annotations() + bl_annotations = self.raw_annotations["blocks"][0] + seg_annotations = bl_annotations["segments"][0] + + for signal_annotation in seg_annotations["signals"]: + # Add global annotations + signal_annotation["intan_version"] = ( + f"{self._global_info['major_version']}." f"{self._global_info['minor_version']}" + ) + global_keys_to_skip = ["major_version", "minor_version", "sampling_rate", "magic_number"] + global_keys_to_annotate = set(self._global_info.keys()) - set(global_keys_to_skip) + for key in global_keys_to_annotate: + signal_annotation[key] = self._global_info[key] + + # Add channel annotations + array_annotations = signal_annotation["__array_annotations__"] + channel_ids = array_annotations["channel_ids"] + + # TODO refactor ordered channel dict to make this easier + # Use this to find which elements of the ordered channels correspond to the current signal + signal_type = int(signal_annotation["stream_id"]) + channel_info = next((info for info in self._ordered_channel_info if info["signal_type"] == signal_type)) + channel_keys_to_skip = [ + "signal_type", + "custom_channel_name", + "native_channel_name", + "gain", + "offset", + "channel_enabled", + "dtype", + "units", + ] + + channel_keys_to_annotate = set(channel_info.keys()) - set(channel_keys_to_skip) + properties_dict = {key: [] for key in channel_keys_to_annotate} + for channel_id in channel_ids: + matching_info = next( + info for info in self._ordered_channel_info if info["native_channel_name"] == channel_id + ) + for key in channel_keys_to_annotate: + properties_dict[key].append(matching_info[key]) + + for key in channel_keys_to_annotate: + array_annotations[key] = properties_dict[key] + def _segment_t_start(self, block_index, seg_index): return 0.0 @@ -502,7 +546,7 @@ def read_rhs(filename, file_format: str): sr = global_info["sampling_rate"] # construct dtype by re-ordering channels by types - ordered_channels = [] + ordered_channel_info = [] if file_format == "header-attached": data_dtype = [("timestamp", "int32", BLOCK_SIZE)] else: @@ -523,7 +567,7 @@ def read_rhs(filename, file_format: str): chan_info["dtype"] = "uint16" else: chan_info["dtype"] = "int16" - ordered_channels.append(chan_info) + ordered_channel_info.append(chan_info) if file_format == "header-attached": data_dtype += [(name, "uint16", BLOCK_SIZE)] else: @@ -542,7 +586,7 @@ def read_rhs(filename, file_format: str): chan_info_dc["offset"] = -512 * 19.23 chan_info_dc["signal_type"] = 10 # put it in another group chan_info_dc["dtype"] = "uint16" - ordered_channels.append(chan_info_dc) + ordered_channel_info.append(chan_info_dc) if file_format == "header-attached": data_dtype += [(name + "_DC", "uint16", BLOCK_SIZE)] else: @@ -564,7 +608,7 @@ def read_rhs(filename, file_format: str): chan_info_stim["offset"] = 0.0 chan_info_stim["signal_type"] = 11 # put it in another group chan_info_stim["dtype"] = "uint16" - ordered_channels.append(chan_info_stim) + ordered_channel_info.append(chan_info_stim) if file_format == "header-attached": data_dtype += [(name + "_STIM", "uint16", BLOCK_SIZE)] else: @@ -587,7 +631,7 @@ def read_rhs(filename, file_format: str): chan_info["gain"] = 0.0003125 chan_info["offset"] = -32768 * 0.0003125 chan_info["dtype"] = "uint16" - ordered_channels.append(chan_info) + ordered_channel_info.append(chan_info) if file_format == "header-attached": data_dtype += [(name, "uint16", BLOCK_SIZE)] else: @@ -609,7 +653,7 @@ def read_rhs(filename, file_format: str): chan_info["gain"] = 1.0 chan_info["offset"] = 0.0 chan_info["dtype"] = "uint16" - ordered_channels.append(chan_info) + ordered_channel_info.append(chan_info) if file_format == "header-attached": data_dtype += [(name, "uint16", BLOCK_SIZE)] else: @@ -627,7 +671,7 @@ def read_rhs(filename, file_format: str): data_dtype = {k: v for (k, v) in data_dtype.items() if len(v) > 0} channel_number_dict = {k: v for (k, v) in channel_number_dict.items() if v > 0} - return global_info, ordered_channels, data_dtype, header_size, BLOCK_SIZE, channel_number_dict + return global_info, ordered_channel_info, data_dtype, header_size, BLOCK_SIZE, channel_number_dict ############### @@ -771,7 +815,7 @@ def read_rhd(filename, file_format: str): else: BLOCK_SIZE = 60 # 256 channels - ordered_channels = [] + ordered_channel_info = [] if version >= V("1.2"): if file_format == "header-attached": @@ -798,7 +842,7 @@ def read_rhd(filename, file_format: str): else: chan_info["offset"] = 0.0 chan_info["dtype"] = "int16" - ordered_channels.append(chan_info) + ordered_channel_info.append(chan_info) if file_format == "header-attached": data_dtype += [(name, "uint16", BLOCK_SIZE)] @@ -813,7 +857,7 @@ def read_rhd(filename, file_format: str): chan_info["gain"] = 0.0000374 chan_info["offset"] = 0.0 chan_info["dtype"] = "uint16" - ordered_channels.append(chan_info) + ordered_channel_info.append(chan_info) if file_format == "header-attached": data_dtype += [(name, "uint16", BLOCK_SIZE // 4)] else: @@ -827,7 +871,7 @@ def read_rhd(filename, file_format: str): chan_info["gain"] = 0.0000748 chan_info["offset"] = 0.0 chan_info["dtype"] = "uint16" - ordered_channels.append(chan_info) + ordered_channel_info.append(chan_info) if file_format == "header-attached": data_dtype += [(name, "uint16")] else: @@ -842,7 +886,7 @@ def read_rhd(filename, file_format: str): chan_info["gain"] = 0.001 chan_info["offset"] = 0.0 chan_info["dtype"] = "int16" - ordered_channels.append(chan_info) + ordered_channel_info.append(chan_info) data_dtype += [(name, "int16")] # 3: USB board ADC input channel @@ -860,7 +904,7 @@ def read_rhd(filename, file_format: str): chan_info["gain"] = 0.0003125 chan_info["offset"] = -32768 * 0.0003125 chan_info["dtype"] = "uint16" - ordered_channels.append(chan_info) + ordered_channel_info.append(chan_info) if file_format == "header-attached": data_dtype += [(name, "uint16", BLOCK_SIZE)] else: @@ -884,7 +928,7 @@ def read_rhd(filename, file_format: str): chan_info["gain"] = 1.0 chan_info["offset"] = 0.0 chan_info["dtype"] = "uint16" - ordered_channels.append(chan_info) + ordered_channel_info.append(chan_info) if file_format == "header-attached": data_dtype += [(name, "uint16", BLOCK_SIZE)] else: @@ -902,7 +946,7 @@ def read_rhd(filename, file_format: str): data_dtype = {k: v for (k, v) in data_dtype.items() if len(v) > 0} channel_number_dict = {k: v for (k, v) in channel_number_dict.items() if v > 0} - return global_info, ordered_channels, data_dtype, header_size, BLOCK_SIZE, channel_number_dict + return global_info, ordered_channel_info, data_dtype, header_size, BLOCK_SIZE, channel_number_dict ########################################################################## From e1dd3df54b469e7d2a620590232b7ae831c37cfe Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 14 May 2024 09:35:39 -0600 Subject: [PATCH 2/8] fix reference --- neo/rawio/intanrawio.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neo/rawio/intanrawio.py b/neo/rawio/intanrawio.py index c717d30db..f27adc572 100644 --- a/neo/rawio/intanrawio.py +++ b/neo/rawio/intanrawio.py @@ -263,11 +263,15 @@ def _parse_header(self): signal_annotation["intan_version"] = ( f"{self._global_info['major_version']}." f"{self._global_info['minor_version']}" ) - global_keys_to_skip = ["major_version", "minor_version", "sampling_rate", "magic_number"] + global_keys_to_skip = ["major_version", "minor_version", "sampling_rate", "magic_number", "reference_channel"] global_keys_to_annotate = set(self._global_info.keys()) - set(global_keys_to_skip) for key in global_keys_to_annotate: signal_annotation[key] = self._global_info[key] + reference_channel = self._global_info.get("reference_channel", None) + # Following the pdf specification + reference_channel = "hardware" if reference_channel == "n/a" else reference_channel + # Add channel annotations array_annotations = signal_annotation["__array_annotations__"] channel_ids = array_annotations["channel_ids"] From 6372bbb0b2abf9f23fee2a5294364a2d7c8caab8 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 14 May 2024 10:10:07 -0600 Subject: [PATCH 3/8] no sampling rate in channel annotations --- neo/rawio/intanrawio.py | 1 + 1 file changed, 1 insertion(+) diff --git a/neo/rawio/intanrawio.py b/neo/rawio/intanrawio.py index f27adc572..e4614e032 100644 --- a/neo/rawio/intanrawio.py +++ b/neo/rawio/intanrawio.py @@ -289,6 +289,7 @@ def _parse_header(self): "channel_enabled", "dtype", "units", + "sampling_rate", ] channel_keys_to_annotate = set(channel_info.keys()) - set(channel_keys_to_skip) From fca20433b0a649d53acf2b9503a459293362e8fe Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 14 May 2024 16:42:03 -0600 Subject: [PATCH 4/8] some test --- neo/test/rawiotest/test_intanrawio.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/neo/test/rawiotest/test_intanrawio.py b/neo/test/rawiotest/test_intanrawio.py index 3f5ee3c7c..389e10b8b 100644 --- a/neo/test/rawiotest/test_intanrawio.py +++ b/neo/test/rawiotest/test_intanrawio.py @@ -21,5 +21,26 @@ class TestIntanRawIO( ] + def test_annotations(self): + + intan_reader = IntanRawIO(filename=self.get_local_path("intan/intan_rhd_test_1.rhd")) + intan_reader.parse_header() + + raw_annotations = intan_reader.raw_annotations + annotations = raw_annotations["blocks"][0]["segments"][0] # Intan is mono segment + signal_annotations = annotations["signals"][0] # As in the other exmaples, annotaions are duplicated + + + exepcted_annotations = {'intan_version': '1.5', 'desired_impedance_test_frequency': 1000.0, 'desired_upper_bandwidth': 7500.0, 'note1': '', 'notch_filter_mode': 1, 'notch_filter': False, 'nb_signal_group': 7, + 'dsp_enabled': 1, 'actual_impedance_test_frequency': 1000.0, 'desired_lower_bandwidth': 0.1, 'note3': '', 'actual_dsp_cutoff_frequency': 1.165828, + 'desired_dsp_cutoff_frequency': 1.0, 'actual_lower_bandwidth': 0.0945291, 'eval_board_mode': 0, 'note2': '', 'num_temp_sensor_channels': 0} + + for key in exepcted_annotations: + if isinstance(exepcted_annotations[key], float): + self.assertAlmostEqual(signal_annotations[key], exepcted_annotations[key], places=2) + else: + self.assertEqual(signal_annotations[key], exepcted_annotations[key]) + + if __name__ == "__main__": unittest.main() From a7e80398eb83b1e3b55ba992145b7319cbdd35d3 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Wed, 15 May 2024 08:07:47 -0600 Subject: [PATCH 5/8] add some scalar annotations --- neo/test/rawiotest/test_intanrawio.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/neo/test/rawiotest/test_intanrawio.py b/neo/test/rawiotest/test_intanrawio.py index 389e10b8b..5b313c2d8 100644 --- a/neo/test/rawiotest/test_intanrawio.py +++ b/neo/test/rawiotest/test_intanrawio.py @@ -1,7 +1,7 @@ import unittest +import numpy as np from neo.rawio.intanrawio import IntanRawIO - from neo.test.rawiotest.common_rawio_test import BaseTestRawIO @@ -31,6 +31,7 @@ def test_annotations(self): signal_annotations = annotations["signals"][0] # As in the other exmaples, annotaions are duplicated + # Scalar annotations exepcted_annotations = {'intan_version': '1.5', 'desired_impedance_test_frequency': 1000.0, 'desired_upper_bandwidth': 7500.0, 'note1': '', 'notch_filter_mode': 1, 'notch_filter': False, 'nb_signal_group': 7, 'dsp_enabled': 1, 'actual_impedance_test_frequency': 1000.0, 'desired_lower_bandwidth': 0.1, 'note3': '', 'actual_dsp_cutoff_frequency': 1.165828, 'desired_dsp_cutoff_frequency': 1.0, 'actual_lower_bandwidth': 0.0945291, 'eval_board_mode': 0, 'note2': '', 'num_temp_sensor_channels': 0} @@ -41,6 +42,10 @@ def test_annotations(self): else: self.assertEqual(signal_annotations[key], exepcted_annotations[key]) - + # Array annotations + signal_array_annotations = signal_annotations["__array_annotations__"] + np.testing.assert_array_equal(signal_array_annotations["native_order"][:10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) + np.testing.assert_array_equal(signal_array_annotations["spike_scope_digital_edge_polarity"][:10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) + np.testing.assert_array_equal(signal_array_annotations["board_stream_num"][:10], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) if __name__ == "__main__": unittest.main() From 596f748155297402dfc5016a6a380318f752fd51 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Wed, 15 May 2024 08:09:56 -0600 Subject: [PATCH 6/8] V TO version --- neo/rawio/intanrawio.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/neo/rawio/intanrawio.py b/neo/rawio/intanrawio.py index e4614e032..ae0859a23 100644 --- a/neo/rawio/intanrawio.py +++ b/neo/rawio/intanrawio.py @@ -21,7 +21,7 @@ from pathlib import Path import os from collections import OrderedDict -from packaging.version import Version as V +from packaging.version import Version import warnings import numpy as np @@ -664,9 +664,9 @@ def read_rhs(filename, file_format: str): else: data_dtype[sig_type] = "uint16" - if global_info["notch_filter_mode"] == 2 and global_info["major_version"] >= V("3.0"): + if global_info["notch_filter_mode"] == 2 and global_info["major_version"] >= Version("3.0"): global_info["notch_filter"] = "60Hz" - elif global_info["notch_filter_mode"] == 1 and global_info["major_version"] >= V("3.0"): + elif global_info["notch_filter_mode"] == 1 and global_info["major_version"] >= Version("3.0"): global_info["notch_filter"] = "50Hz" else: global_info["notch_filter"] = False @@ -771,22 +771,22 @@ def read_rhd(filename, file_format: str): global_info = read_variable_header(f, rhd_global_header_base) - version = V(f"{global_info['major_version']}.{global_info['minor_version']}") + version = Version(f"{global_info['major_version']}.{global_info['minor_version']}") # the header size depends on the version :-( header = list(rhd_global_header_part1) # make a copy - if version >= V("1.1"): + if version >= Version("1.1"): header = header + rhd_global_header_v11 else: global_info["num_temp_sensor_channels"] = 0 - if version >= V("1.3"): + if version >= Version("1.3"): header = header + rhd_global_header_v13 else: global_info["eval_board_mode"] = 0 - if version >= V("2.0"): + if version >= Version("2.0"): header = header + rhd_global_header_v20 else: global_info["reference_channel"] = "" @@ -815,14 +815,14 @@ def read_rhd(filename, file_format: str): sr = global_info["sampling_rate"] # construct the data block dtype and reorder channels - if version >= V("2.0"): + if version >= Version("2.0"): BLOCK_SIZE = 128 else: BLOCK_SIZE = 60 # 256 channels ordered_channel_info = [] - if version >= V("1.2"): + if version >= Version("1.2"): if file_format == "header-attached": data_dtype = [("timestamp", "int32", BLOCK_SIZE)] else: @@ -939,9 +939,9 @@ def read_rhd(filename, file_format: str): else: data_dtype[sig_type] = "uint16" - if global_info["notch_filter_mode"] == 2 and version >= V("3.0"): + if global_info["notch_filter_mode"] == 2 and version >= Version("3.0"): global_info["notch_filter"] = "60Hz" - elif global_info["notch_filter_mode"] == 1 and version >= V("3.0"): + elif global_info["notch_filter_mode"] == 1 and version >= Version("3.0"): global_info["notch_filter"] = "50Hz" else: global_info["notch_filter"] = False From cae4bacc86ab41cf2cfafe5c29390f9ff0fd5538 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Thu, 16 May 2024 09:05:51 -0400 Subject: [PATCH 7/8] update doc comments and docstrings --- neo/rawio/intanrawio.py | 53 +++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/neo/rawio/intanrawio.py b/neo/rawio/intanrawio.py index ae0859a23..9a121b365 100644 --- a/neo/rawio/intanrawio.py +++ b/neo/rawio/intanrawio.py @@ -8,7 +8,8 @@ RHS supported version 1.0 RHD supported version 1.0 1.1 1.2 1.3 2.0 3.0, 3.1 -RHD headerless binary support 3.1 +RHD headerless binary support 3.x +RHS headerless binary support 3.x See: * http://intantech.com/files/Intan_RHD2000_data_file_formats.pdf @@ -44,27 +45,43 @@ class IntanRawIO(BaseRawIO): Parameters ---------- filename: str, default: '' - name of the 'rhd' or 'rhs' data file + name of the 'rhd' or 'rhs' data/header file Notes ----- - * Intan reader can handle two file formats 'rhd' and 'rhs'. It will automatically + * The Intan reader can handle two file formats 'rhd' and 'rhs'. It will automatically check for the file extension and will gather the header information based on the - extension. Additionally it functions with RHS v 1.0 and RHD 1.0, 1.1, 1.2, 1.3, 2.0, - 3.0, and 3.1 files. + extension. Additionally it functions with RHS v 1.0 and v 3.x and RHD 1.0, 1.1, 1.2, 1.3, 2.0, + 3.x files. + + * The Intan reader can also handle the headerless binary formats 'one-file-per-signal' and + 'one-file-per-channel' which have a header file called 'info.rhd' or 'info.rhs' and a series + of binary files with the '.dat' suffix * Intan files contain amplifier channels labeled 'A', 'B' 'C' or 'D' depending on the port in which they were recorded along with the following - additional channels. - 0: 'RHD2000' amplifier channel + additional channels for RHD: + + 0: 'RHD2000 amplifier channel' 1: 'RHD2000 auxiliary input channel', 2: 'RHD2000 supply voltage channel', 3: 'USB board ADC input channel', 4: 'USB board digital input channel', 5: 'USB board digital output channel' + And for RHS: + + 0: 'RHS2000 amplfier channel' + 3: 'USB board ADC input channel', + 4: 'USB board ADC output channel', + 5: 'USB board digital input channel', + 6: 'USB board digital output channel', + 10: 'DC Amplifier channel', + 11: 'Stim channel', + * Due to the structure of the digital input and output channels these can be accessed - as one long vector, which must be post-processed. + as one long vector, which must be post-processed in the case of 'header-attached' or + 'one-file-per-stream' formats. Examples -------- @@ -96,6 +113,7 @@ def _parse_header(self): if not filename.exists() or not filename.is_file(): raise FileNotFoundError(f"{filename} does not exist") + # see comment below for RHD which explains the division between file types if self.filename.endswith(".rhs"): if filename.name == "info.rhs": if any((filename.parent / file).exists() for file in one_file_per_signal_filenames_rhs): @@ -236,6 +254,7 @@ def _parse_header(self): # are in a list we just take the first channel in each list of channels else: self._max_sigs_length = max([raw_data[0].size for raw_data in self._raw_data.values()]) + # No events event_channels = [] event_channels = np.array(event_channels, dtype=_event_channel_dtype) @@ -263,13 +282,19 @@ def _parse_header(self): signal_annotation["intan_version"] = ( f"{self._global_info['major_version']}." f"{self._global_info['minor_version']}" ) - global_keys_to_skip = ["major_version", "minor_version", "sampling_rate", "magic_number", "reference_channel"] + global_keys_to_skip = [ + "major_version", + "minor_version", + "sampling_rate", + "magic_number", + "reference_channel", + ] global_keys_to_annotate = set(self._global_info.keys()) - set(global_keys_to_skip) for key in global_keys_to_annotate: signal_annotation[key] = self._global_info[key] reference_channel = self._global_info.get("reference_channel", None) - # Following the pdf specification + # Following the pdf specification reference_channel = "hardware" if reference_channel == "n/a" else reference_channel # Add channel annotations @@ -664,6 +689,10 @@ def read_rhs(filename, file_format: str): else: data_dtype[sig_type] = "uint16" + # per discussion with Intan developers before version 3 of their software the 'notch_filter_mode' + # was a request for postprocessing to be done in one of their scripts. From version 3+ the notch + # filter is now applied to the data in realtime and only the post notched amplifier data is + # saved. if global_info["notch_filter_mode"] == 2 and global_info["major_version"] >= Version("3.0"): global_info["notch_filter"] = "60Hz" elif global_info["notch_filter_mode"] == 1 and global_info["major_version"] >= Version("3.0"): @@ -939,6 +968,10 @@ def read_rhd(filename, file_format: str): else: data_dtype[sig_type] = "uint16" + # per discussion with Intan developers before version 3 of their software the 'notch_filter_mode' + # was a request for postprocessing to be done in one of their scripts. From version 3+ the notch + # filter is now applied to the data in realtime and only the post notched amplifier data is + # saved. if global_info["notch_filter_mode"] == 2 and version >= Version("3.0"): global_info["notch_filter"] = "60Hz" elif global_info["notch_filter_mode"] == 1 and version >= Version("3.0"): From 38536afbdb89fc410c5b508fdb7573e3513d802b Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Thu, 30 May 2024 02:57:09 -0600 Subject: [PATCH 8/8] spelling --- neo/rawio/intanrawio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neo/rawio/intanrawio.py b/neo/rawio/intanrawio.py index 7ebcfb27f..67052be7c 100644 --- a/neo/rawio/intanrawio.py +++ b/neo/rawio/intanrawio.py @@ -695,7 +695,7 @@ def read_rhs(filename, file_format: str): chan_info["gain"] = 1.0 chan_info["offset"] = 0.0 chan_info["dtype"] = "uint16" - ordered_channels_info.append(chan_info) + ordered_channel_info.append(chan_info) data_dtype[sig_type] = "uint16" # per discussion with Intan developers before version 3 of their software the 'notch_filter_mode' @@ -982,7 +982,7 @@ def read_rhd(filename, file_format: str): chan_info["gain"] = 1.0 chan_info["offset"] = 0.0 chan_info["dtype"] = "uint16" - ordered_channels_info.append(chan_info) + ordered_channel_info.append(chan_info) data_dtype[sig_type] = "uint16" # per discussion with Intan developers before version 3 of their software the 'notch_filter_mode'