We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9d251f0 + f81a7a1 commit 43c6415Copy full SHA for 43c6415
neo/rawio/neuralynxrawio/nlxheader.py
@@ -55,7 +55,13 @@ def _to_bool(txt):
55
("DspHighCutNumTaps", "", None),
56
("DspHighCutFilterType", "", None),
57
("DspDelayCompensation", "", None),
58
- ("DspFilterDelay_µs", "", None),
+ # DspFilterDelay key with flexible µ symbol matching
59
+ # Different Neuralynx versions encode the µ (micro) symbol differently:
60
+ # - Some files use single-byte encoding (latin-1): DspFilterDelay_µs (raw bytes: \xb5)
61
+ # - Other files use UTF-8 encoding: DspFilterDelay_µs (raw bytes: \xc2\xb5)
62
+ # When UTF-8 encoded µ (\xc2\xb5) is decoded with latin-1, it becomes "µ"
63
+ # This regex matches both variants: "µs" and "µs" but normalizes to "DspFilterDelay_µs"
64
+ (r"DspFilterDelay_[Â]?µs", "DspFilterDelay_µs", None),
65
("DisabledSubChannels", "", None),
66
("WaveformLength", "", int),
67
("AlignmentPt", "", None),
neo/test/rawiotest/test_neuralynxrawio.py
@@ -31,6 +31,7 @@ class TestNeuralynxRawIO(
31
"neuralynx/Cheetah_v5.6.3/original_data",
32
"neuralynx/Cheetah_v5.7.4/original_data",
33
"neuralynx/Cheetah_v6.3.2/incomplete_blocks",
34
+ "neuralynx/two_streams_different_header_encoding",
35
]
36
37
def test_scan_ncs_files(self):
0 commit comments