Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion neo/rawio/neuralynxrawio/nlxheader.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ def _to_bool(txt):
("DspHighCutNumTaps", "", None),
("DspHighCutFilterType", "", None),
("DspDelayCompensation", "", None),
("DspFilterDelay_µs", "", None),
# DspFilterDelay key with flexible µ symbol matching
# Different Neuralynx versions encode the µ (micro) symbol differently:
# - Some files use single-byte encoding (latin-1): DspFilterDelay_µs (raw bytes: \xb5)
# - Other files use UTF-8 encoding: DspFilterDelay_µs (raw bytes: \xc2\xb5)
# When UTF-8 encoded µ (\xc2\xb5) is decoded with latin-1, it becomes "µ"
# This regex matches both variants: "µs" and "µs" but normalizes to "DspFilterDelay_µs"
(r"DspFilterDelay_[Â]?µs", "DspFilterDelay_µs", None),
("DisabledSubChannels", "", None),
("WaveformLength", "", int),
("AlignmentPt", "", None),
Expand Down
1 change: 1 addition & 0 deletions neo/test/rawiotest/test_neuralynxrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class TestNeuralynxRawIO(
"neuralynx/Cheetah_v5.6.3/original_data",
"neuralynx/Cheetah_v5.7.4/original_data",
"neuralynx/Cheetah_v6.3.2/incomplete_blocks",
"neuralynx/two_streams_different_header_encoding",
]

def test_scan_ncs_files(self):
Expand Down
Loading