AllenSWDB / allenswdb.github.io

Other
3 stars 6 forks source link

neuropixels invalid times #24

Closed saskiad closed 2 months ago

saskiad commented 1 year ago

Need documentation about the invalid times warning, the session.get_invalid_times() function and strategies to use to work around these issues. definitely part of visual coding neuropixels - I assume also in the visual behavior neuropixels but not sure.

galenlynch commented 1 year ago

I can't find any mention of invalid times in the Allen SDK readthedocs and most of the code related to invalid times that I could find seems to be stump functions. Could you elaborate on what they are and how to get them?

https://github.com/AllenInstitute/AllenSDK/blob/028a9e66122804ef47ff1c9d0ee9a27db2a184ed/allensdk/brain_observatory/ecephys/ecephys_session_api/ecephys_nwb1_session_api.py#L324 https://github.com/AllenInstitute/AllenSDK/blob/028a9e66122804ef47ff1c9d0ee9a27db2a184ed/allensdk/brain_observatory/ecephys/ecephys_session_api/ecephys_session_api.py#L32 https://github.com/AllenInstitute/AllenSDK/blob/028a9e66122804ef47ff1c9d0ee9a27db2a184ed/allensdk/test/brain_observatory/ecephys/stimulus_analysis/test_dot_motion.py#L37

saskiad commented 1 year ago

If you access the session object for many sessions (one example is 732592105) it gives a warning that there are invalid times. The function 'session.get_invalid_times()' returns a dataframe of start/stop times of invalid times with a tag of which probe(s) are affected. I don't know why these times are invalid or the range of what it can be, but we should at least document how to handle this warning:

Screen Shot 2023-08-31 at 1 58 39 PM
saskiad commented 3 months ago

Contact Josh and ask him to provide details about what these are and how people should work with/around them.

JEElsner commented 3 months ago

We need to know what it means to get an invalid time, and whether or not that's a dealbreaker for whatever experiment you're doing -- or how to determine that.

saskiad commented 3 months ago

https://community.brain-map.org/t/how-to-deal-with-invalid-times-in-a-ecephys-session/1072

JEElsner commented 3 months ago

Make a markdown page that addresses this, and we can figure out where to work it into the databook later.

Also need to figure out how to find the invalid times. Look at questions to ask about the data to figure out how it affects use of the data.