# CSD: session.get\_current\_source\_density() hanging

**URL:** <https://community.brain-map.org/t/csd-session-get-current-source-density-hanging/501>\
**Category:** Technical\
**Tags:** software, brain-observatory-visual-coding, analysis, allensdk\
**Created:** [April 2, 2020, 12:11pm UTC](https://community.brain-map.org/t/csd-session-get-current-source-density-hanging/501 "2020-04-02T12:11:03Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![njmei](https://avatars.discourse-cdn.com/v4/letter/n/c37758/32.png) [@njmei](https://community.brain-map.org/u/njmei)\
**Post date:** [April 7, 2020, 1:35am UTC](https://community.brain-map.org/t/csd-session-get-current-source-density-hanging/501/4 "2020-04-07T01:35:21Z")

</div>

@eabhorrocks

Thanks for your patience!

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:

1. 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.

2. 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](https://community.brain-map.org/t/failed-to-get-session-data/503/4)

3. 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.

```auto
import logging
logging.getLogger().setLevel(logging.DEBUG)

```

Let me know though if you are still encountering issues!

---

_[View the full topic](https://community.brain-map.org/t/csd-session-get-current-source-density-hanging/501)._
