Filter epoch entries by matching DAQ system device name#48
Merged
Conversation
When multiple DAQ systems report the same epochs (same epoch_id and epoch_session_id), buildepochtable and buildmultipleepochtables would include duplicate entries. Deduplicate by tracking seen (epoch_id, epoch_session_id) pairs and skipping already-seen epochs. https://claude.ai/code/session_016R2mDR7X4ySBpod8U54i1z
Instead of blindly deduplicating by epoch_id (which could match the wrong DAQ system), check that the matching epochprobemap's device name matches the current DAQ system's name. This mirrors the MATLAB behavior where only epochs from the correct device are included. https://claude.ai/code/session_016R2mDR7X4ySBpod8U54i1z
The test mock_daqsys needs name and _name attributes set to match the devicestring in the epochprobemap, so the device name check works correctly. https://claude.ai/code/session_016R2mDR7X4ySBpod8U54i1z
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.
Summary
This change adds validation to ensure that epoch probe map entries are only included if their associated device belongs to the current DAQ system being processed. This prevents mismatched device entries from being incorrectly included in epoch tables.
Key Changes
buildepochtable()method, checking bothnameand_nameattributesbuildmultipleepochtables()method with the same fallback logicdevicenameattribute or by parsing thedevicestring(taking the first colon-separated component)buildepochtable()andbuildmultipleepochtables()for consistencyImplementation Details
The device name extraction uses a fallback approach:
devicenameattribute if availabledevicestringby splitting on ":" and taking the first componenthttps://claude.ai/code/session_016R2mDR7X4ySBpod8U54i1z