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
You may want to check whether the TimeSeries you are accesses is using a starting_time and rate instead of explicit timestamps. In PyNWB the property TimeSeries.timestamps only returns a timestamps array if it is part of the actual data; as such, if the TimeSeries does uses timestamps bases on starting_time and rate, then the property will be None (the relevant code in PyNWB is here https://github.com/NeurodataWithoutBorders/pynwb/blob/649800088ffb4bffb95bf0f55302d82537a8d78f/src/pynwb/base.py#L269-L276). If instead you always want an array even if starting_time and rate are being used, then you can use the TimeSeries.get_timestamps() function instead, which will return the same as the TimeSeries.timestamps property if explicit timestamps are being used and it will create a regularly sampled numpy array if starting_time and rate are being used (the code for TimeSeries.get_timestamps() is here https://github.com/NeurodataWithoutBorders/pynwb/blob/649800088ffb4bffb95bf0f55302d82537a8d78f/src/pynwb/base.py#L294-L298 )
Thank you for the response. I was able to replace starting_time and rate by timestamps in the conversion code convert_to_nwb.py. See the figure attached.
Of course, timestamps can be deduced from starting_time, rate, and the size of time-dimension of neural traces (shown as data in the code below). The latter is not readily available, but can be read off from the trace data.
It'd be good to update either the Jupyter notebook or convert_to_nwb.py, so that users can run the tutorial without extensive debugging.
After converting the original files (downloaded from cshl repo) to nwb, I ran the jupyter notebook, but there was no timestamps in
trial_seg_module.get('dFoF_firstSideTryAl').roi_response_series
Is this an issue with the conversion from mat to nwb?
Please see the error message attached.
The text was updated successfully, but these errors were encountered: