Skip to content

Commit 47083fa

Browse files
h-mayorquinclaude
andcommitted
Change stream naming from f{id} to DSPFilter{id}
- DSPFilter{id} more accurately represents DSP filter configurations - Clearer naming: explicitly mentions Digital Signal Processing - Works correctly even when filtering is disabled (DSPFilter0 = configuration 0) - Updated tests to reflect new naming convention The stream name format is now: stream{id}_{Hz}Hz_{mV}mVRange_DSPFilter{id} Examples: - stream0_32000Hz_100mVRange_DSPFilter0 (eye-tracking, low-cut disabled) - stream1_32000Hz_1mVRange_DSPFilter1 (ephys, low-cut enabled) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 9b4e048 commit 47083fa

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

neo/rawio/neuralynxrawio/neuralynxrawio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,9 @@ def _parse_header(self):
496496

497497
# Unpack stream_key and format stream name
498498
sampling_rate, input_range, gain, input_inverted, filter_params_tuple = stream_key
499-
filter_id = seen_filters[filter_params_tuple]
499+
dsp_filter_id = seen_filters[filter_params_tuple]
500500
voltage_mv = int(input_range / 1000) if input_range is not None else 0
501-
stream_name = f"stream{stream_id}_{int(sampling_rate)}Hz_{voltage_mv}mVRange_f{filter_id}"
501+
stream_name = f"stream{stream_id}_{int(sampling_rate)}Hz_{voltage_mv}mVRange_DSPFilter{dsp_filter_id}"
502502

503503
stream_names.append(stream_name)
504504
stream_ids.append(stream_id)

neo/test/rawiotest/test_neuralynxrawio.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,14 @@ def test_two_streams_different_header_encoding(self):
233233
# Check stream names follow the new naming convention
234234
stream_names = [rawio.header["signal_streams"][i][0] for i in range(rawio.signal_streams_count())]
235235

236-
# Stream names should include sampling rate (Hz), voltage range (mV), and filter ID
236+
# Stream names should include sampling rate (Hz), voltage range (mV), and DSP filter ID
237237
for stream_name in stream_names:
238-
self.assertRegex(stream_name, r"stream\d+_\d+Hz_\d+mVRange_f\d+")
238+
self.assertRegex(stream_name, r"stream\d+_\d+Hz_\d+mVRange_DSPFilter\d+")
239239

240240
# Verify we have the expected streams:
241241
# - Eye-tracking channels (CSC145, CSC146): 32000Hz, 100mV range, low-cut disabled
242-
# - Ephys channel (csc23_100): 32000Hz, 1mV range, low-cut enabled
243-
expected_names = {"stream0_32000Hz_100mVRange_f0", "stream1_32000Hz_1mVRange_f1"}
242+
# - Ephys channel (CSC76): 32000Hz, 1mV range, low-cut enabled
243+
expected_names = {"stream0_32000Hz_100mVRange_DSPFilter0", "stream1_32000Hz_1mVRange_DSPFilter1"}
244244
self.assertEqual(set(stream_names), expected_names)
245245

246246
# Verify filter configurations are stored privately

0 commit comments

Comments
 (0)