Hi, I’m trying to access the current source density data from the visual coding neuropixels datasets. The session.get_current_source_density() is consistently hanging on me, eventually resulting in time out errors. I’m using the following code to run it:
I tried session.get_current_source_density() with session 719161530 and for probe id 729445648 using AllenSDK 1.6.0 and Python 3.7.7 and was able to get CSD data from the NWB file from my home computer. What follows is a guess as to what may have gone wrong as well as some additional troubleshooting tips:
The CSD data is stored on a NWB file (which are typically multiple gigabytes) that is separate from the session NWB data. So the ‘hanging’ you experience, may be the AllenSDK trying to download a separate probe NWB file.
If your download speed is not great, you may also want to set a longer duration for the NWB download timeout (which defaults to 10 minutes before giving up on a download). You can find an example code snippet for setting a custom download timeout here: Failed to get session data
You can add the following snippet at the start of a script or notebook to get more information about what the AllenSDK is doing in the background. As mentioned in 1. I suspect when you call get_current_source_density() the logging will show the AllenSDK taking a while to download the separate probe NWB file that I mentioned.
Thanks for your help. I thought the CSD data was stored in the .session nwb rather than the probe files. The issue will almost certainly be downloads taking too long - the d/l speed for these files seems to be capped at 500 kb/s for me. I’ll manually download the required probe files and go from there.
One more thing, what is the directory structure I should use for the probe files to access the CSD data with session.get_current_source_density()? Should they be stored in the relevant session folders, in their own individual probe folders, or in some other structure?