-
Notifications
You must be signed in to change notification settings - Fork 4
hwChan ordering with unrecorded channels #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures that the list of hardware channels (hwChan) is filtered to only those included in the recording, preserving correct indexing into the binary data.
- Extended
_produce_ephys_channel_idswith parameters for recorded channel count and channel list, and added filtering logic. - Updated
_parse_headerto gatherhw_channels_recordedfrom the XML and pass it into the channel ID generator. - Split the original
numChannelsattribute intonum_chip_channelsandnum_ephy_channels, though both currently draw from the same source.
Comments suppressed due to low confidence (2)
src/trodes_to_nwb/spike_gadgets_raw_io.py:75
- Update the docstring to reflect the new parameters
n_channels_recordedandhw_channels_recordedfor clarity.
def _produce_ephys_channel_ids(
src/trodes_to_nwb/spike_gadgets_raw_io.py:187
num_chip_channelsandnum_ephy_channelsare both assigned from the same XML attribute; verify if there is a distinct attribute for recorded channels to avoid misconfiguration.
num_chip_channels = int(
Co-authored-by: Copilot <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #122 +/- ##
==========================================
+ Coverage 89.32% 89.38% +0.05%
==========================================
Files 12 12
Lines 1471 1479 +8
==========================================
+ Hits 1314 1322 +8
Misses 157 157 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I made some minor suggestions but otherwise looks good to me. |
Co-authored-by: Ryan Ly <[email protected]>
Fixes #121
When making the list of
hwChanas ordered in the binary stream, restrict to only channels included in the recording. This ensures proper indexing into the binary data