[Mne_analysis] Error in combining edf files

Teon Brooks teon.brooks at gmail.com
Sun Dec 3 21:39:32 EST 2017
Search archives:

Hi Senaka,

The append method is an in-place operation so when you assign it to raw,
there is no returned value and therefore it is then mapped to None.

To remedy it, just try  `raw0.append(raw1)` and proceed with raw0 for
following steps.

HTH,

On Sun, Dec 3, 2017 at 5:51 PM, Senaka Amarakeerthi <senakahks at gmail.com>
wrote:

> Hi,
>
> I am trying to combine two edf files with the following code,
>
> raw0 = mne.io.read_raw_edf('file1', preload=True)
> raw1 = mne.io.read_raw_edf('file2', preload=True)
>
> raw = raw0.append(raw1)
>
> When I try to plot 19th channel with the following code,
>
> data = raw[:, :][0]
> plt.plot(data[19])
> plt.show()
>
> Following set of error comes
>
> TypeError                                 Traceback (most recent call last)<ipython-input-214-345e58904e3a> in <module>()----> 1 data = raw[:, :][0]      2 plt.plot(data[19])      3 plt.show()
> TypeError: 'NoneType' object is not subscriptable
>
>
>
> What is wrong with my code?
>
>
>
>
>> <https://mailtrack.io/> Sent with Mailtrack
> <https://chrome.google.com/webstore/detail/mailtrack-for-gmail-inbox/ndnaehgpjlnokgebbaldlmgkapkpjkkb?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>


-- 
teon <http://www.twitter.com/teon_io>, phd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20171203/f23e1b49/attachment-0001.html 


More information about the Mne_analysis mailing list