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

[Neuropixels] Support optogenetics protocol #34

Merged
merged 7 commits into from
Dec 18, 2024

Conversation

weiglszonja
Copy link
Collaborator

Support adding OptogeneticsSeries and OptogeneticStimulusSite to NWB file for optogenetics protocol.

The stimulation parameters should be updated in the optogenetics_stimulation_metadata.yaml
The behavior metadata for Bpod data with such protocols ("RWTautowait2OptoTest") is updated to include the additional state types and task arguments.
According to their protocol code (RWTautowait2OptoTest.m) the optogenetic stimulation onsets can be determined from the Bpod data:

  • "IsOpto" - Whether the trial is an optogenetic trial.
  • "OptoEvent" - The type of optogenetic event. (1 = center port in, 2 = side port off, 3 = Reward or opt-out, 4 = stimulation on, 5 = delay)

We construct the OptogeneticsSeries from the stimulation onsets: trials where OptoEvent = 4
And the stimulation parameters from the yaml file.

Base automatically changed from Neuropixels/update-for-session-to-nwb to main December 11, 2024 14:05
Copy link
Contributor

@alessandratrapani alessandratrapani left a comment

Choose a reason for hiding this comment

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

Ok, so it would use the already created trial table to buld the optogenetic series from the opto event and from metadata. Correct?

@weiglszonja
Copy link
Collaborator Author

Ok, so it would use the already created trial table to buld the optogenetic series from the opto event and from metadata. Correct?

Yes the onset times are from the trials table where is-opto is true and opto event type is 4. The other parameters to build the optognetics series are from the metadata yaml file

@weiglszonja weiglszonja merged commit 16e33fc into main Dec 18, 2024
@weiglszonja weiglszonja deleted the Neuropixels/add-optional-optogenetics-stimulation branch December 18, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants