Closed owoolnough closed 3 years ago
@owoolnough would you be able to provide an example file? I can provide a Google Drive folder or Globus Endpoint if that would be easier for you
@bendichter Sent you a link over Slack
@owoolnough I found two issues:
You need to adjust the way you call the function. It should be:
[trial_data, tt] = util.loadTrialAlignedTimeSeriesData(nwb, ts, [-0.5 0.5], 'start_time', trial_conditions);
One of the columns, correct
, is dimensions ntrials x 2, but it should be ntrials x 1.
Once you fix those issues it should work with no alterations to matnwb. Can you adjust those two things and let me know if it works?
That works! Thank you
@bendichter I'm updating my code from NWB 2.0b to 2.2.5. Having an issue using util.loadTrialAlignedTimeSeriesData to pull out epoched data. Data file was generated using 2.2.5. My data import code that previously worked for 2.0b is below.
trial_conditions = containers.Map({'correct','good','articulation'},{1 1 0});
[trial_data, tt] = util.loadTrialAlignedTimeSeriesData(nwb2,timeseries, window+[-0.5 0.5], trial_conditions);
Getting the following error: Error using containers.Map/subsref Only '()' indexing is supported by a containers.Map.
Error in types.untyped.Set/get (line 165) o{i} = obj.map(name{i});
Error in util.loadTrialAlignedTimeSeriesData (line 44) times = trials.vectordata.get(align_to);
Error in blrk2NWB (line 212) [trial_data, tt] = util.loadTrialAlignedTimeSeriesData(nwb2,timeseries, window+[-0.5 0.5], trial_conditions);