Axon: improve channel name handling#1874
Open
h-mayorquin wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This improves how
AxonRawIObuilds ADC channel names, which previously used.replace(b" ", b"")and had three shortcomings. Names now come back asstrrather thanbytes; 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 positionalch{id}instead of an empty""that leaves it unaddressable; and decoding useserrors="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_6andFile_axon_7return"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 fixtureabf1_episodic_empty_channel_name.abf.