AllenInstitute / openscope_databook

OpenScope databook: a collaborative, versioned, data-centric collection of foundational analyses for reproducible systems neuroscience 🐁🧠🔬🖥️📈
https://alleninstitute.github.io/openscope_databook
Other
62 stars 19 forks source link

Confirm there aren't units outside the surface of the brain in our NWB files #345

Closed rcpeene closed 5 months ago

rcpeene commented 6 months ago

Dan Birman gave a presentation and showed that in the data he used, there were Units outside the surface of the brain. I inquired about this and he said he used https://allensdk.readthedocs.io/en/latest/_static/examples/nb/visual_behavior_neuropixels_data_access.html this code.

I should check this in our files.

rcpeene commented 5 months ago

According to @jsiegle, probes whose regions are NaN should be outside the surface of the brain. Since I believe in NWB files the region is encoded as a string, I did find regions assigned the value of "" (the empty string) in the visual coding dataset. In our openscope illusion files, there is no empty string, but there is "root" which I believe is given to any regions not otherwise assigned.

Here is the result of the plotting the units whose probes list "root" as their location. Image

As can be seen, these units are outside of the brain. So we know for analysis to exclude units whose region is root.

jsiegle commented 5 months ago

I think there are some rare cases where units inside the brain will be assigned to root (for example if they fall in a voxel without any CCF label). But this should happen infrequently enough that it's fine to exclude any units with this label.