Skip to content

Appending timestamps? #48

Answered by bendichter
tjr1 asked this question in Q&A
Apr 14, 2023 · 4 comments · 3 replies
Discussion options

You must be logged in to vote

Yes, something like this:

replace

timestamp_vec = (1:10000)./fs; % seconds

with:

timestamp_vec = types.untyped.DataPipe( ...
'data', (1:10000)./fs; % seconds, ...
'maxSize', fullDataSize, ...
'axis', 1);

However, I would add that if you timestamps are truly regular, you are better off defining your TimeSeries with a sampling rate and starting time like this:

fdataNWB = types.core.TimeSeries( ...
  'data', fData_use, ...
  'data_unit', 'mV',...
  'starting_time', 0.0, ...
  'starting_time_rate', fs, ...
);

which would avoid this problem altogether.

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@lawrence-mbf
Comment options

Comment options

You must be logged in to vote
2 replies
@tjr1
Comment options

@bendichter
Comment options

Answer selected by tjr1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants