Skip to content

Axon: improve channel name handling#1874

Open
h-mayorquin wants to merge 2 commits into
NeuralEnsemble:masterfrom
h-mayorquin:axon_channel_name_fallback
Open

Axon: improve channel name handling#1874
h-mayorquin wants to merge 2 commits into
NeuralEnsemble:masterfrom
h-mayorquin:axon_channel_name_fallback

Conversation

@h-mayorquin

Copy link
Copy Markdown
Contributor

This improves how AxonRawIO builds ADC channel names, which previously used .replace(b" ", b"") and had three shortcomings. Names now come back as str rather than bytes; only the fixed-width padding is stripped so interior spaces are preserved (a name like "IN 1" was being mangled to "IN1"); a channel whose stored name is blank now falls back to a positional ch{id} instead of an empty "" that leaves it unaddressable; and decoding uses errors="replace" so an odd byte in a name can never crash the read.

One intended behavior change: files whose channel names contain interior spaces now report the real name, for example File_axon_6 and File_axon_7 return "IN 1" instead of "IN1". The space is part of the name Clampex recorded, so this is the correct value; any downstream code that matched the old space-stripped form should use the real name. The blank-name case is covered by the fixture abf1_episodic_empty_channel_name.abf.

@h-mayorquin h-mayorquin self-assigned this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant