# Area and location of receptive fields - Visual Coding Neuropixel dataset

**URL:** https://community.brain-map.org/t/area-and-location-of-receptive-fields-visual-coding-neuropixel-dataset/2968
**Category:** Technical
**Tags:** allensdk, analysis, how-to
**Created:** [January 25, 2024, 8:58am UTC](https://community.brain-map.org/t/area-and-location-of-receptive-fields-visual-coding-neuropixel-dataset/2968 "2024-01-25T08:58:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AKasts](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@AKasts](https://community.brain-map.org/u/AKasts)
#### Post date: [January 25, 2024, 8:58am UTC](https://community.brain-map.org/t/area-and-location-of-receptive-fields-visual-coding-neuropixel-dataset/2968/1 "2024-01-25T08:58:19Z")

</div>

Hi everyone,

I’m currently analyzing the Visual Coding Neuropixel dataset and have a question about how the area and center of receptive fields were calculated. I’ve used the get\_unit\_analysis\_metrics\_by\_session\_type() method to obtain the area, width, and height, but I’m seeking more information about the underlying methodology.  
Area Calculation:  
Was the area determined based on activity above a certain threshold, or were 2D Gaussian models fitted to identify the receptive field area?  
If a threshold was used, where can I find the specific threshold values for each neuron?  
Smoothing Process:  
In the white paper, it’s mentioned that receptive fields were smoothed for area calculation. Can you provide details on how this smoothing was conducted?

Many thanks in advance!

---

<div class="post-metadata">

### Author: ![joshs](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/joshs/32/8_2.png) [@joshs](https://community.brain-map.org/u/joshs)
#### Post date: [January 29, 2024, 7:57pm UTC](https://community.brain-map.org/t/area-and-location-of-receptive-fields-visual-coding-neuropixel-dataset/2968/2 "2024-01-29T19:57:22Z")

</div>

Hi @AKasts – the area is equal to the number of pixels in the 9 x 9 receptive field above a threshold of the peak value minus 0.5x the standard deviation of all values. The receptive field was smoothed with a 2D Gaussian filter with a 1 pixel radius before thresholding.

The code for these calculations is available here: [AllenSDK/allensdk/brain\_observatory/ecephys/stimulus\_analysis/receptive\_field\_mapping.py at a9b5c685396126d9748f1ccecf7c00f440569f69 · AllenInstitute/AllenSDK · GitHub](https://github.com/AllenInstitute/AllenSDK/blob/a9b5c685396126d9748f1ccecf7c00f440569f69/allensdk/brain_observatory/ecephys/stimulus_analysis/receptive_field_mapping.py#L602-L644)

---

<div class="post-metadata">

### Author: ![AKasts](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@AKasts](https://community.brain-map.org/u/AKasts)
#### Post date: [February 5, 2024, 2:15pm UTC](https://community.brain-map.org/t/area-and-location-of-receptive-fields-visual-coding-neuropixel-dataset/2968/3 "2024-02-05T14:15:10Z")

</div>

Many thanks!
