Closed jihyunbak closed 3 years ago
@VBaratham could you please look at this?
These are just what what get passed as the starting_time
kwarg to the pynwb TimeSeries
objects, right?
For the mark track, since we are talking about the mark track that's recorded simultaneously with the neural data yes, I think this one should always have a start time of 0.
It looks like this computes stim_starting_time
for discrete stimuli from the trials table in the nwb - so first_recorded_mark
is the starting time of the first trial. Then you subtract the time between the start of the stim DVD and the start of the first trial, which is the time to the first mark plus the time between the first mark and the first trial. That all looks correct to me.
For continuous stimuli, finding when the stimulus started would involve looking at the actual recorded mark track (or perhaps the recorded stimulus) just like we had to do in order to create the trials table. I don't know what works best for the current pipeline, but it might make sense to create a trials table even for continuous stimuli (it would just contain one entry).
@VBaratham Thanks a lot for this too! Good point about continuous stimuli — I think a single-trial table would make sense.
Can someone confirm that we are setting
mark_starting_time
andstim_starting_time
correctly?Relevant place to look at:
StimulusOriginator
.—
mark starting time: always set to 0.0
https://github.com/BouchardLab/nsds_lab_to_nwb/blob/e2663acbc310416134281c2e5cdbf5493f7d312b/nsds_lab_to_nwb/components/stimulus/stimulus_originator.py#L21
stimulus starting time: a combination of three offsets
https://github.com/BouchardLab/nsds_lab_to_nwb/blob/e2663acbc310416134281c2e5cdbf5493f7d312b/nsds_lab_to_nwb/components/stimulus/stimulus_originator.py#L33-L46