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 template generate_recording_from_template_database #2769

Merged

Conversation

h-mayorquin
Copy link
Collaborator

Thisi s a request for the hybrid project to fetch templates from the s3 database and generate recordings. I addded a pure function that allows to fetch teh template data and a convinence function that wraps this and generates a recording.

How to use:

from spikeinterface.generation import generate_recording_from_template_database

selected_unit_inidces = [0, 23, 44 , 55]
durations = [1.0]

#from spikeinterface.hybrid import generate_recording_from_template_database
selected_unit_inidces  = [0, 1, 2, 3] # Here value from selectedUnitIndices
durations = [1.0] # To be determined by the user
dataset = "test_templates" # The dataset name
recording = generate_recording_from_template_database(selected_unit_inidces, durations=durations, dataset=dataset)
recording

Right now I only have test_templates as a dataset. This comes from real data but I have not done the whole batch because I am getting a memory leak. I need to test this.

@h-mayorquin h-mayorquin added the hybrid Related to Hybrid testing label Apr 26, 2024
@h-mayorquin h-mayorquin self-assigned this Apr 26, 2024
@h-mayorquin h-mayorquin marked this pull request as ready for review April 26, 2024 17:43
@samuelgarcia
Copy link
Member

Hi Ramon. Cool thanks.
I will do some comments in the code.

@samuelgarcia
Copy link
Member

We should also make a small doc to explain the template library, its URL and make some screen shot.
No ?

@h-mayorquin
Copy link
Collaborator Author

We should also make a small doc to explain the template library, its URL and make some screen shot. No ?

Sure. But where and of what do you want the screenshoot? I migrated all the code to the organization btw:

https://github.com/SpikeInterface/hybrid_template_library

@alejoe91 alejoe91 merged commit d79773d into SpikeInterface:main May 1, 2024
11 checks passed
@h-mayorquin h-mayorquin deleted the add_template_generation_function branch June 6, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hybrid Related to Hybrid testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants