Skip to content

Add trial number to unit #69

Closed Answered by CodyCBakerPhD
ahabdallah27 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ahabdallah27

What I would strongly suggest from a data modeling point of view, is to decouple the trials and units tables to be separate

A trials table is native to the NWBFile object, check out this tutorial for an easy way to add trial times (relative to the global session_start_time)

Likewise, the units table is native to the NWBFile object, but all it does is specify the times when spikes occurred (again, with respect to the global session_start_time) and associate a single units spike train with additional info, including the electrodes responsible for detecting the unit

And yes, this can accept multiple electrode indices! For example,

nwbfile.add_unit(spike_times=[1,2,3], electr…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ahabdallah27
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ahabdallah27
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants