Skip to content

Commit 9835568

Browse files
Merge branch 'NeuralEnsemble:master' into master
2 parents 56ea2b4 + 7b24bb2 commit 9835568

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.github/workflows/io-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
# the key depend on the last commit repo https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git
3838
id: ephy_testing_data_hash
3939
run: |
40-
echo "latest_hash=$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)" >> GITHUB_OUTPUT
40+
echo "latest_hash=$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
4141
4242
- uses: actions/cache@v3
4343
# Loading cache of ephys_testing_dataset

neo/rawio/intanrawio.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
22
3-
Support for intan tech rhd and rhs files.
3+
Support for intan tech rhd and rhs files.
44
5-
This 2 formats are more or less the same but:
5+
These 2 formats are more or less the same but:
66
* some variance in headers.
77
* rhs amplifier is more complex because the optional DC channel
88
99
RHS supported version 1.0
10-
RHD supported version 1.0 1.1 1.2 1.3 2.0
10+
RHD supported version 1.0 1.1 1.2 1.3 2.0 3.0, 3.1
1111
1212
See:
1313
* http://intantech.com/files/Intan_RHD2000_data_file_formats.pdf
@@ -333,6 +333,11 @@ def read_rhs(filename):
333333
if len(channels_by_type[sig_type]) > 0:
334334
name = {5: 'DIGITAL-IN', 6: 'DIGITAL-OUT'}[sig_type]
335335
data_dtype += [(name, 'uint16', BLOCK_SIZE)]
336+
337+
if bool(global_info['notch_filter_mode']) and global_info['major_version'] >= 3:
338+
global_info['notch_filter_applied'] = True
339+
else:
340+
global_info['notch_filter_applied'] = False
336341

337342
return global_info, ordered_channels, data_dtype, header_size, BLOCK_SIZE
338343

@@ -346,7 +351,6 @@ def read_rhs(filename):
346351
('minor_version', 'int16'),
347352
]
348353

349-
350354
rhd_global_header_part1 = [
351355
('sampling_rate', 'float32'),
352356

@@ -360,7 +364,7 @@ def read_rhs(filename):
360364
('desired_upper_bandwidth', 'float32'),
361365

362366
('notch_filter_mode', 'int16'),
363-
367+
364368
('desired_impedance_test_frequency', 'float32'),
365369
('actual_impedance_test_frequency', 'float32'),
366370

@@ -544,5 +548,10 @@ def read_rhd(filename):
544548
if len(channels_by_type[sig_type]) > 0:
545549
name = {4: 'DIGITAL-IN', 5: 'DIGITAL-OUT'}[sig_type]
546550
data_dtype += [(name, 'uint16', BLOCK_SIZE)]
547-
551+
552+
if bool(global_info['notch_filter_mode']) and version >= V('3.0'):
553+
global_info['notch_filter_applied'] = True
554+
else:
555+
global_info['notch_filter_applied'] = False
556+
548557
return global_info, ordered_channels, data_dtype, header_size, BLOCK_SIZE

0 commit comments

Comments
 (0)