# pick\_channels() is a legacy function

**URL:** <https://mne.discourse.group/t/pick-channels-is-a-legacy-function/8445>\
**Category:** Support & Discussions\
**Tags:** epochs\
**Created:** [March 7, 2024, 4:44am UTC](https://mne.discourse.group/t/pick-channels-is-a-legacy-function/8445 "2024-03-07T04:44:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jollygraces](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/jollygraces/32/1678_2.png) [@Jollygraces](https://mne.discourse.group/u/Jollygraces)\
**Post date:** [March 7, 2024, 4:44am UTC](https://mne.discourse.group/t/pick-channels-is-a-legacy-function/8445/1 "2024-03-07T04:44:20Z")

</div>

- MNE version: 1.6.0
- operating system: Windows 10

I am trying to visualize channels on my code, but I got an error message after running this code.

temp0 =epochs\_train.copy().pick\_channels([‘F4-M1’])

error: NOTE: pick\_channels() is a legacy function. New code should use inst.pick(…)

Please how do I fix this issue? I have looked at MNE resource online, but I am unable to find any guide on fixing this.

---

<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:** [March 7, 2024, 6:48am UTC](https://mne.discourse.group/t/pick-channels-is-a-legacy-function/8445/2 "2024-03-07T06:48:08Z")

</div>

Hello, simply do:

```python
epochs_train.copy().pick(["F4-M1"])

```

Best wishes,  
Richard

---

<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:** [March 14, 2024, 6:48am UTC](https://mne.discourse.group/t/pick-channels-is-a-legacy-function/8445/3 "2024-03-14T06:48:50Z")

</div>

Closed on March 14, 2024, 6:48am UTC

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