You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #2354 implements a helper function to register the timestamps in a sync file with multiple stimulus block presentations. We need to be able to use this code to create a StimulusTimestamps object.
Need to be able to return a StimulusTimestamps object that correctly registers multiple stimulus files to one sync file but only returns the timestamps corresponding to the stimulus file of interest. This should be a new class method in StimulusTimestamps that looks something like this
from_multi_stim(
sync_path: path/to/sync/file,
list_of_stim: list_of_stimulus_files,
stim_of_interest: index or list of indices in list_of_stim whose timestamps you actually want)
Tasks
Implement from_multi_stim in StimulusTimestamps
Remove StimulusTimestamps.from_json and to_json as it is no longer straightforward to know which timestamps you want if there are more than one pickle files referred to in the dict representation
Validation
All existing unit tests pass
There are unit tests round tripping the data through from_multi_stim and to_nwb
The text was updated successfully, but these errors were encountered:
should achieve step (3). What I do not know is how to represent the fact that a StimulusTimestamps object came from multiple stimulus files in the to_json method of any DataObjects that are constructed from the StimulusTimestamps. Probably, StimulusTimestamps._stimulus_file should have the option to be a ListOfStimFiles object that knows how to write the appropriate data to_json. Any dependent object could, for instance
class RunningSpeed():
def to_json():
...
if self._stimulus_timestamps._stimulus_file is not None:
output.update(self._stimulus_timestamps._stimulus_file.to_json())
but I haven't thought that all the way through. Sorry to leave things in such an incomplete state.
PR #2354 implements a helper function to register the timestamps in a sync file with multiple stimulus block presentations. We need to be able to use this code to create a StimulusTimestamps object.
Need to be able to return a StimulusTimestamps object that correctly registers multiple stimulus files to one sync file but only returns the timestamps corresponding to the stimulus file of interest. This should be a new class method in
StimulusTimestamps
that looks something like thisTasks
from_multi_stim
inStimulusTimestamps
StimulusTimestamps.from_json
andto_json
as it is no longer straightforward to know which timestamps you want if there are more than one pickle files referred to in the dict representationValidation
from_multi_stim
andto_nwb
The text was updated successfully, but these errors were encountered: