# Make the required label

**URL:** <https://mne.discourse.group/t/make-the-required-label/6041>\
**Category:** Support & Discussions\
**Created:** [December 7, 2022, 9:52am UTC](https://mne.discourse.group/t/make-the-required-label/6041 "2022-12-07T09:52:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuyu](https://avatars.discourse-cdn.com/v4/letter/y/71e660/32.png) [@yuyu](https://mne.discourse.group/u/yuyu)\
**Post date:** [December 7, 2022, 9:52am UTC](https://mne.discourse.group/t/make-the-required-label/6041/1 "2022-12-07T09:52:36Z")

</div>

Hi，everyone  
After source localization, I want to extract the time course of some brain regions used mne.extract\_label\_time\_course, such as the local activation area of the primary somatosensory cortex and the secondary somatosensory cortex induced by finger stimulation. How can I make the labels I need？

---

<div class="post-metadata">

**Author:** ![jstout211](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/jstout211/32/180_2.png) [@jstout211](https://mne.discourse.group/u/jstout211)\
**Post date:** [December 7, 2022, 10:32pm UTC](https://mne.discourse.group/t/make-the-required-label/6041/2 "2022-12-07T22:32:35Z")

</div>

1. If you expect these labels to be defined by the anatomy:

```python
#From terminal - full freesurfer recon (you probably have already done this part)
recon-all -all -s SUBJID #Creates the parcels in SUBJECTS_DIR/SUBJID/label/
#In python/ipython
labels = mne.read_labels_from_annot(subject, parc='aparc', subjects_dir=subjects_dir)

```

Look through the label names that best define your regions and use those to extract the label (mne.extract\_label\_time\_course).

1. If you want functionally defined labels from the source localized activity: [Generate a functional label from source estimates — MNE 1.2.2 documentation](https://mne.tools/stable/auto_examples/inverse/label_from_stc.html)

Good luck  
-Jeff

---

<div class="post-metadata">

**Author:** ![CarinaFo](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/carinafo/32/746_2.png) [@CarinaFo](https://mne.discourse.group/u/CarinaFo)\
**Post date:** [December 12, 2022, 3:29pm UTC](https://mne.discourse.group/t/make-the-required-label/6041/3 "2022-12-12T15:29:43Z")

</div>

Hello Yuyu,

I also work in the field of somatosensory perception and I use those labels:

```python
label_BA3a = 'C:\\Users\\Carina\\mne_data\\MNE-fsaverage-data' \
           '\\fsaverage\\label\\rh.BA3a.label'

label_BA3b = 'C:\\Users\\Carina\\mne_data\\MNE-fsaverage-data' \
           '\\fsaverage\\label\\rh.BA3b.label'

label_BA1 = 'C:\\Users\\Carina\\mne_data\\MNE-fsaverage-data' \
           '\\fsaverage\\label\\rh.BA1.label'

label_BA2 = 'C:\\Users\\Carina\\mne_data\\MNE-fsaverage-data' \
           '\\fsaverage\\label\\rh.BA2.label'

```

I run source localization on the contrast between signal and noise (somatosensory stimuli vs. catch trials) and then extract the timecourse in the forementioned labels.

Hope this helps.

Best,

Carina
