I’m analyzing image selectivity using the Visual Coding dataset. In the precomputed unit analysis metrics table, there is a column that should contain the preferred images for each neuron. However, the indices in this column do not correspond to the indices in the natural scenes dataset. They range from 4908 to 5026, whereas the natural scene indices obtained using the cache.get_natural_scene_template() method range from 0 to 117.
Can anyone help clarify this discrepancy? How can I get the preferred images based on the indices listed in the precomputed unit analysis metrics table? Also, can anyone send the link to the source code from which one can understand why the numeration differs?
The numbers you’re seeing correspond to the stimulus_condition_ids, which are applied to all stimulus types and are unique within each session. In order to translate those to natural scene indices, you’ll need to load the NWB file for each session you’re interested in, extract the stimulus table, and check which image is associated with which condition ID. This was obviously an oversight that was made when calculating these metrics.
And this is where the preferred condition is calculated. The output of this function should have been translated to image IDs before saving.
At the time of the Neuropixels data release, we weren’t confident that the methods for calculating response p-values developed for 2P imaging were appropriate to apply to spiking data. If you’re interested in calculating responsiveness metrics for the ephys data, you can take a look at this fork of the AllenSDK, which was created for the analysis performed in this paper.
Thanks a lot! I have one more question - for some units in the precomputed metrics table, both the preferred image and the image selectivity index are set to NaN. Does this indicate that there were no recordings from these units during the presentation of natural scenes?