# Extract channels as numpy arrays

**URL:** <https://mne.discourse.group/t/extract-channels-as-numpy-arrays/1834>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [May 3, 2019, 2:35pm UTC](https://mne.discourse.group/t/extract-channels-as-numpy-arrays/1834 "2019-05-03T14:35:52Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [May 3, 2019, 2:35pm UTC](https://mne.discourse.group/t/extract-channels-as-numpy-arrays/1834/1 "2019-05-03T14:35:52Z")

</div>

External Email - Use Caution

Dear MNE enthusiasts,

I reach out to you with a specific question regarding the python MNE  
library and hope you can assist me as my colleagues can't. I am a  
neurologist interested in analyzing EEG data using the python version of  
mne. Pursuant to the mne documentation I have run the following python code:

"

\*import os.path as opimport numpy as npimport mnedata\_path =  
op.join(mne.datasets.sample.data\_path(), 'MEG', 'sample')raw =  
mne.io.read\_raw\_fif(op.join(data\_path, 'sample\_audvis\_raw.fif'),  
preload=True)raw.set\_eeg\_reference('average', projection=True) # set EEG  
average referenceraw.plot(block=True, lowpass=40)raw.plot(butterfly=True,  
group\_by='position')\*  
"  
Doing this allowed me to visualize the EEG data as follows:  
[image: grafik.png]

Is there a way to output each of the MEG channels (just the curves) as  
numpy arrays? I would appreciate your help very much.

Thank you very much.

Best regards  
Kebir

---

<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:** [May 3, 2019, 4:38pm UTC](https://mne.discourse.group/t/extract-channels-as-numpy-arrays/1834/2 "2019-05-03T16:38:32Z")

</div>

External Email - Use Caution

Raw objects have a get\_data method:

raw\_array = raw.get\_data()
