-
Couldn't load subscription status.
- Fork 224
Support for using event names as IDs in PL2 files #4049
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
base: main
Are you sure you want to change the base?
Conversation
|
This seems fair to me. Our default for sorting extractors is None (but really False). So for parsimony reasons I would have the default be false and make the user purposely switch it to True. |
|
Makes sense. I changed the default to False. |
|
MacOS tests keep failing, but I don't recognize this error. Let's see if @h-mayorquin recognizes it. |
|
No idea why is this. I think we should skip this test on mac as this is a feature that is useful for the user and wine/plexon has been a pain for a while. We don't really have resources to dig deeper into this as far as I am aware. As for the default, let's discuss this on the meeting I vaguely remember that Sam prefers to keep None for provenance but I might be misremembering. That is, False or True the user chosen it but None means the user did not choose if that makes sense. |
Yeah I think you're right on that. None defaults to False behavior, but for provenance keeping None is fine since the other extractors do it. I think people would really only trust you to muck around with the testing for Mac at that level. so happy to figure out how to fix this at a maintenance meeting. |
|
@ShijiMi-Soup we will ping you once we have testing fixed for any final patches to the PR :) |
Hi! I was having issues using the event ids of .pl2 data. The ids were all numbers and not unique (like '1', '2', ..., '1', '2', ..., which are supposed to be 'KBD01', 'KBD02', ... 'EVT01', 'EVT02'...). So I added an option to use event names as ids for .pl2 files.
Summary by copilot
This pull request introduces a new feature to allow the use of channel names as unique identifiers (
use_names_as_ids) in event extractors, along with corresponding updates to ensure compatibility and proper functionality. The changes primarily affect theNeoBaseEventExtractorclass and its subclasses.Enhancements to event extraction:
use_names_as_idsparameter toNeoBaseEventExtractor: The__init__method ofNeoBaseEventExtractornow includes ause_names_as_idsparameter. When set toTrue, channel names are used as identifiers instead of channel IDs. An assertion ensures that channel names are unique when this option is enabled. (src/spikeinterface/extractors/neoextractors/neobaseextractor.py, src/spikeinterface/extractors/neoextractors/neobaseextractor.pyL668-R680)NeoEventSegmentto supportuse_names_as_ids: TheNeoEventSegmentclass now accepts theuse_names_as_idsparameter and uses it to determine whether to index event channels by name or ID. (src/spikeinterface/extractors/neoextractors/neobaseextractor.py, src/spikeinterface/extractors/neoextractors/neobaseextractor.pyL687-R709)Subclass-specific updates:
Plexon2EventExtractorto defaultuse_names_as_idstoTrue: ThePlexon2EventExtractorsubclass now defaults theuse_names_as_idsparameter toTruein its constructor, ensuring that channel names are used as identifiers by default for this extractor. (src/spikeinterface/extractors/neoextractors/plexon2.py, src/spikeinterface/extractors/neoextractors/plexon2.pyL126-R128)