Skip to content
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

Add neuronexus allego recording Extractor #3235

Merged
merged 11 commits into from
Oct 9, 2024

Conversation

zm711
Copy link
Collaborator

@zm711 zm711 commented Jul 19, 2024

This depends on:

NeuralEnsemble/python-neo#1509

I still need to upload the test data to GIN and cleanup the PR, but I figure we can have for once that is merged :)

  • Add tests

@zm711 zm711 added extractors Related to extractors module NEO Problem related to NEO IO labels Jul 19, 2024

def __init__(
self,
file_path,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

str or Path.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type hints while Sam is away. haha.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I thought that he was against doing them himself I was not aware he dislikes them in principle : O

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now you know :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x D

Ah, OK, disregard

@zm711
Copy link
Collaborator Author

zm711 commented Aug 28, 2024

Reminder to myself: we changed it to NeuroNexus at Neo level so I need to fix this for the new name.

Copy link
Collaborator Author

@zm711 zm711 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix names soon.

src/spikeinterface/extractors/neoextractors/__init__.py Outdated Show resolved Hide resolved
src/spikeinterface/extractors/neoextractors/__init__.py Outdated Show resolved Hide resolved
src/spikeinterface/extractors/tests/test_neoextractors.py Outdated Show resolved Hide resolved
@zm711 zm711 marked this pull request as ready for review September 30, 2024 18:12
@zm711 zm711 requested a review from h-mayorquin September 30, 2024 20:49
@samuelgarcia
Copy link
Member

C'est parfait.
with we have the wraning of importing profiles but I guess we can merge this.

@zm711
Copy link
Collaborator Author

zm711 commented Oct 9, 2024

Fixed with a rerun. @h-mayorquin import windows failed with 3.05 seconds which was above the limit of 3 second set. Fixed on a re-run. I think we will have to watch out as you mess with numba and cuda--> those lead to really slow imports if not done carefully. Heberto and I will have to go back and fix things later :P

Copy link
Collaborator

@h-mayorquin h-mayorquin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, some simple questions.


Parameters
----------
file_path : str
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can take path as well, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes because we cast it to a path to resolve. I can add that :)

If there are several streams, specify the stream name you want to load.
all_annotations : bool, default: False
Load exhaustively all annotations from neo.
use_names_as_ids : bool, default: False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we provide an illustrative examples of the names or are they too variable so giving a pattern does not make sense?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't know the pattern super well. We only have the one test file at Neo, so I could write something, but I'm not confident.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you think it is still worth putting and I can combine your two pieces of feedback.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na, let's do it when we know more. No point in adding possible confusing message.

@@ -52,8 +52,11 @@ def test_open(self):
num_samples = rec.get_num_samples(segment_index=segment_index)

full_traces = rec.get_traces(segment_index=segment_index)
assert full_traces.shape == (num_samples, num_chans)
assert full_traces.dtype == dtype
assert full_traces.shape == (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something I like to do is to write expected_shape = (num_samples, num_channels) and then do the assertion so if I Jump in the debugger I have all the variables already loaded. But I think this is OK.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I didn't change anything here. I was just getting an error and couldn't see what it was so I rage added this :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I realize, just sharing a pattern. I was going to suggest adding string to the message but this is the testing suite so I think this is fine and your addition is an improvement.

@h-mayorquin h-mayorquin merged commit bbf7daf into SpikeInterface:main Oct 9, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extractors Related to extractors module NEO Problem related to NEO IO
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants