Closed lkeegan closed 2 years ago
@lkeegan Thanks for the lovely code!
While it's fine to explicitly specify the IntervalSeries
timestamps field, note that you may also be able to use the add_interval
function (https://github.com/catalystneuro/nwb-conversion-tools/blob/master/tests/test_gin.py) in a bit more direct fashion.
Also, if you could remind me what issue you were having with TimeIntervals
? The times there should be supported as floats equivalently.
Otherwise, if the NWBFiles output by these changes look good to you, then can merge to stay up to date!
While it's fine to explicitly specify the
IntervalSeries
timestamps field, note that you may also be able to use theadd_interval
function (https://github.com/catalystneuro/nwb-conversion-tools/blob/master/tests/test_gin.py) in a bit more direct fashion.Thanks! Have changed to using this instead: https://github.com/catalystneuro/mease-lab-to-nwb/pull/48/commits/819e8c6a407693f02563f761645e8c8507f20ad9
Also, if you could remind me what issue you were having with
TimeIntervals
? The times there should be supported as floats equivalently.I think the issue was that the timestamps were being generated from tick counts divided by sampling frequency, and as both of these were integers it was doing integer division instead of floating point i.e. the times all got rounded down to the nearest second (before being passed to the
TimeIntervals
object):
Going to go ahead and merge this so the PR doesn't get too clogged - once the GIN stuff is worked out we can add that in later.
Thanks for the code, and for opening the PR here so we can stay up to date!
key changes: