Updating FIP PSTH tools to accept multiple NWB files#71
Conversation
| Compare the same FIP channel aligned to multiple event types | ||
| nwb, nwb object for the session | ||
| nwb, nwb object for the session, or a list of nwbs | ||
| alignments, either a list of event types in df_events, or a dictionary |
There was a problem hiding this comment.
documentation needs to be updated
There was a problem hiding this comment.
maybe the comment wasn't at the correct point-- the update should be in alignments-- this was the info i wanted here:
if single nwb - can pass list, or dictionary
if list of nwbs - can pass a single list, or list of dictionaries
| ******************** | ||
| plot_fip_psth(nwb, 'goCue_start_time') | ||
| plot_fip_psth(nwb_list, 'goCue_start_time') | ||
| plot_fip_psth(nwb_list, ['goCue_start_time','goCue_start_time']) |
|
Looks good. Thank you for the refactor. Some minor things--some checks, some functionality differences etc. I really think we shouldn't allow for different alignments for different NWBs in compare_channels. It'll make things confusing. |
| align = [align] | ||
|
|
||
| # First check that each session has an events table and fip table | ||
| for nwb_i in nwb_list: |
There was a problem hiding this comment.
missing check for channel names in all NWBs:
channel_exists = all(c in nwb_i.df_fip["event"].values for nwb_i in nwb_to_check)
There was a problem hiding this comment.
I check for missing channels below when computing the ETR:
include = [c in nwb.df_fip["event"].values for nwb in nwb_list]
If a channel is missing for a session, that session is skipped just for that channel.
I'll add a warning though if this happens
There was a problem hiding this comment.
looks great thanks.
| Compare the same FIP channel aligned to multiple event types | ||
| nwb, nwb object for the session | ||
| nwb, nwb object for the session, or a list of nwbs | ||
| alignments, either a list of event types in df_events, or a dictionary |
There was a problem hiding this comment.
maybe the comment wasn't at the correct point-- the update should be in alignments-- this was the info i wanted here:
if single nwb - can pass list, or dictionary
if list of nwbs - can pass a single list, or list of dictionaries
rachelstephlee
left a comment
There was a problem hiding this comment.
sorry it took a bit-- this looks good. thank you!

Updates the tools in
plot.plot_fipto operate on either a single NWB or a list of NWB files. This is a re-write and thus replaces #70. This also closes #48 (but does not Z-score each session as proposed in that issue)Examples:
This original example still works as expected:
But now we can analyze and combine multiple sessions
We can also use columns names in df_events:
The
error_typekeyword lets the user select between:semthe standard error of the mean over all samplessem_over_sessionsthe standard error of the mean over sessions.