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.
![error_jupyter_nb](https://private-user-images.githubusercontent.com/38142786/292337701-994a916f-2ac4-4389-a067-e88cb6a6c6a3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MzUyNjQsIm5iZiI6MTcyNDczNDk2NCwicGF0aCI6Ii8zODE0Mjc4Ni8yOTIzMzc3MDEtOTk0YTkxNmYtMmFjNC00Mzg5LWEwNjctZTg4Y2I2YTZjNmEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDA1MDI0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNkYzNjNjc0ZTMwYTkxMWIwZDQyY2VhYmJjYzAzZWRkZTk4ZGMzODQ0NWM4ZjU4ZDRkZWFhNTM1NzI4NGRhYzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bNnIA6UTs3j6fEqcmWu0zlFh19aEp8-hKvwttMfPOqM)
The text was updated successfully, but these errors were encountered: