# How to name channels

**URL:** <https://mne.discourse.group/t/how-to-name-channels/9160>\
**Category:** Support & Discussions\
**Created:** [August 5, 2024, 8:38pm UTC](https://mne.discourse.group/t/how-to-name-channels/9160 "2024-08-05T20:38:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![squidguy3400](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/squidguy3400/32/3807_2.png) [@squidguy3400](https://mne.discourse.group/u/squidguy3400)\
**Post date:** [August 5, 2024, 8:38pm UTC](https://mne.discourse.group/t/how-to-name-channels/9160/1 "2024-08-05T20:38:09Z")

</div>

- MNE version: 1.7.1
- operating system: Windows 11

Hi again. I am trying to name my EEG channels and having trouble. I have data where each channel is a different subject, with one stimulus channel and N=11 subjects (12 total). I think I may be misunderstanding how to name them. I tried to name them by subject name, e.g. ‘B99’ and ‘C6’ and so on but that did not work. I read on the github page that the `ch_names` function only works if it starts with ‘MEG’ or ‘EEG’, so I tried this:

# create metadata

```python
n_channels = 12
ch_names = [
"stim","EEG99","EEG4","EEG6","EEG7","EEG9","EEG10","EEG13","EEG14","EEG16","EEG17","EEG18"
]

ch_types = ["misc"]+["eeg"]*11
sampling_freq = 40 # in Hz
sfreq = sampling_freq
info = mne.create_info(n_channels,ch_types=ch_types,sfreq=sampling_freq)
print(info)

```

out:

```python
<Info | 7 non-empty values
 bads: []
 ch_names: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
 chs: 1 misc, 11 EEG
 custom_ref_applied: False
 highpass: 0.0 Hz
 lowpass: 20.0 Hz
 meas_date: unspecified
 nchan: 12
 projs: []
 sfreq: 40.0 Hz

```

Is there a way to custom name my channels? I am very new to python and appreciate any help.

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [August 6, 2024, 5:42am UTC](https://mne.discourse.group/t/how-to-name-channels/9160/2 "2024-08-06T05:42:42Z")

</div>

Hello, change this:

> [@squidguy3400](#):
>
> `info = mne.create_info(n_channels,ch_types=ch_types,sfreq=sampling_freq)`

To:

```python
info = mne.create_info(ch_names, ch_types=ch_types, sfreq=sampling_freq)

```

Richard

---

<div class="post-metadata">

**Author:** ![squidguy3400](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/squidguy3400/32/3807_2.png) [@squidguy3400](https://mne.discourse.group/u/squidguy3400)\
**Post date:** [August 6, 2024, 5:55pm UTC](https://mne.discourse.group/t/how-to-name-channels/9160/3 "2024-08-06T17:55:01Z")

</div>

Thank you! Such a silly mistake on my part. I appreciate the help

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 13, 2024, 5:55pm UTC](https://mne.discourse.group/t/how-to-name-channels/9160/4 "2024-08-13T17:55:48Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
