<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Alex,<br>
<br>
&nbsp;&nbsp;&nbsp; The raw .fif file is 30 GB and I have 60 GB of RAM. When I load the epochs, it takes up more than the 60 GB I have of RAM. I have tried iterating over the epochs, loading each section and then putting them back into an EpochsArray but then when I go to
 read them in I get the following error:<br>
<br>
&nbsp;&nbsp; Traceback (most recent call last):<br>
&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
&nbsp; File &quot;/autofs/space/karima_001/users/alex/software/anaconda2.7/lib/python2.7/site-packages/mne-0.16.dev0-py2.7.egg/mne/epochs.py&quot;, line 448, in load_data<br>
&nbsp;&nbsp;&nbsp; self._data = self._get_data()<br>
&nbsp; File &quot;&lt;string&gt;&quot;, line 2, in _get_data<br>
&nbsp; File &quot;/autofs/space/karima_001/users/alex/software/anaconda2.7/lib/python2.7/site-packages/mne-0.16.dev0-py2.7.egg/mne/utils.py&quot;, line 728, in verbose<br>
&nbsp;&nbsp;&nbsp; return function(*args, **kwargs)<br>
&nbsp; File &quot;/autofs/space/karima_001/users/alex/software/anaconda2.7/lib/python2.7/site-packages/mne-0.16.dev0-py2.7.egg/mne/epochs.py&quot;, line 1170, in _get_data<br>
&nbsp;&nbsp;&nbsp; epoch_noproj = self._get_epoch_from_raw(idx)<br>
&nbsp; File &quot;&lt;string&gt;&quot;, line 2, in _get_epoch_from_raw<br>
&nbsp; File &quot;/autofs/space/karima_001/users/alex/software/anaconda2.7/lib/python2.7/site-packages/mne-0.16.dev0-py2.7.egg/mne/utils.py&quot;, line 728, in verbose<br>
&nbsp;&nbsp;&nbsp; return function(*args, **kwargs)<br>
&nbsp; File &quot;/autofs/space/karima_001/users/alex/software/anaconda2.7/lib/python2.7/site-packages/mne-0.16.dev0-py2.7.egg/mne/epochs.py&quot;, line 2606, in _get_epoch_from_raw<br>
&nbsp;&nbsp;&nbsp; raise RuntimeError('Correct epoch could not be found, please '<br>
RuntimeError: Correct epoch could not be found, please contact mne-python developers<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF591578" style="direction: ltr;"><font face="Tahoma" color="#000000" size="2"><b>From:</b> mne_analysis-bounces@nmr.mgh.harvard.edu [mne_analysis-bounces@nmr.mgh.harvard.edu] on behalf of Alexandre Gramfort [alexandre.gramfort@inria.fr]<br>
<b>Sent:</b> Wednesday, February 14, 2018 3:04 PM<br>
<b>To:</b> Discussion and support forum for the users of MNE Software<br>
<b>Subject:</b> Re: [Mne_analysis] Resampling with TMS artifacts<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">to interpolate the artifact you need to load the data from disk.
<div><br>
</div>
<div>it seems that your data are big and you cannot load them in memory.</div>
<div><br>
</div>
<div>how big are your data? How much RAM do you have on your machine?</div>
<div><br>
</div>
<div>Alex</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Feb 14, 2018 at 8:11 PM, Rockhill, Alexander P. <span dir="ltr">
&lt;<a href="mailto:AROCKHILL@mgh.harvard.edu" target="_blank">AROCKHILL@mgh.harvard.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi Mainak,<br>
<br>
&nbsp;&nbsp;&nbsp; Thank you for the suggestion. When I load in the raw data using the string preload option, there isn't a problem, but when try giving a string for preload to the epochs, I get:<br>
<br>
Traceback (most recent call last):<br>
&nbsp; File &quot;&lt;stdin&gt;&quot;, line 4, in &lt;module&gt;<br>
&nbsp; File &quot;&lt;string&gt;&quot;, line 2, in __init__<br>
&nbsp; File &quot;/autofs/space/karima_001/<wbr>users/alex/software/anaconda2.<wbr>7/lib/python2.7/site-packages/<wbr>mne-0.16.dev0-py2.7.egg/mne/<wbr>utils.py&quot;, line 728, in verbose<br>
&nbsp;&nbsp;&nbsp; return function(*args, **kwargs)<br>
&nbsp; File &quot;/autofs/space/karima_001/<wbr>users/alex/software/anaconda2.<wbr>7/lib/python2.7/site-packages/<wbr>mne-0.16.dev0-py2.7.egg/mne/<wbr>epochs.py&quot;, line 1960, in __init__<br>
&nbsp;&nbsp;&nbsp; verbose=verbose)<br>
&nbsp; File &quot;/autofs/space/karima_001/<wbr>users/alex/software/anaconda2.<wbr>7/lib/python2.7/site-packages/<wbr>mne-0.16.dev0-py2.7.egg/mne/<wbr>epochs.py&quot;, line 386, in __init__<br>
&nbsp;&nbsp;&nbsp; self.load_data()&nbsp; # this will do the projection<br>
&nbsp; File &quot;/autofs/space/karima_001/<wbr>users/alex/software/anaconda2.<wbr>7/lib/python2.7/site-packages/<wbr>mne-0.16.dev0-py2.7.egg/mne/<wbr>epochs.py&quot;, line 448, in load_data<br>
&nbsp;&nbsp;&nbsp; self._data = self._get_data()<br>
&nbsp; File &quot;&lt;string&gt;&quot;, line 2, in _get_data<br>
&nbsp; File &quot;/autofs/space/karima_001/<wbr>users/alex/software/anaconda2.<wbr>7/lib/python2.7/site-packages/<wbr>mne-0.16.dev0-py2.7.egg/mne/<wbr>utils.py&quot;, line 728, in verbose<br>
&nbsp;&nbsp;&nbsp; return function(*args, **kwargs)<br>
&nbsp; File &quot;/autofs/space/karima_001/<wbr>users/alex/software/anaconda2.<wbr>7/lib/python2.7/site-packages/<wbr>mne-0.16.dev0-py2.7.egg/mne/<wbr>epochs.py&quot;, line 1212, in _get_data<br>
&nbsp;&nbsp;&nbsp; dtype=epoch_out.dtype, order='C')<br>
MemoryError<br>
<br>
<div><br>
<br>
In order to interpolate the artifact and downsample the data, I am following recommendations that the data be in epochs. Is there any suggestions for how to avoid this?<br>
<br>
Thanks,<br>
<br>
Alex<br>
</div>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr>
<div id="m_7533745160245433784divRpF795840" style="direction:ltr"><font face="Tahoma" color="#000000" size="2"><b>From:</b>
<a href="mailto:mne_analysis-bounces@nmr.mgh.harvard.edu" target="_blank">mne_analysis-bounces@nmr.mgh.<wbr>harvard.edu</a> [<a href="mailto:mne_analysis-bounces@nmr.mgh.harvard.edu" target="_blank">mne_analysis-bounces@nmr.mgh.<wbr>harvard.edu</a>] on behalf
 of Mainak Jas [<a href="mailto:mainakjas@gmail.com" target="_blank">mainakjas@gmail.com</a>]<br>
<b>Sent:</b> Wednesday, February 14, 2018 11:29 AM<br>
<b>To:</b> Discussion and support forum for the users of MNE Software<br>
<b>Subject:</b> Re: [Mne_analysis] Resampling with TMS artifacts<br>
</font><br>
</div>
<div>
<div class="h5">
<div></div>
<div>
<div dir="ltr">
<div>Hi,<br>
<br>
</div>
<div>How long is the artifact? Probably you could use fix_stim_artifact for this:
<a href="https://mne-tools.github.io/dev/generated/mne.preprocessing.fix_stim_artifact.html" target="_blank">
https://mne-tools.github.io/<wbr>dev/generated/mne.<wbr>preprocessing.fix_stim_<wbr>artifact.html</a><br>
</div>
<div>
<div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">or use decim parameter when epoching<br>
<br>
</div>
<div class="gmail_extra">Mainak<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Feb 14, 2018 at 3:49 PM, Rockhill, Alexander P. <span dir="ltr">
&lt;<a href="mailto:AROCKHILL@mgh.harvard.edu" target="_blank">AROCKHILL@mgh.harvard.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:rgb(0,0,0); font-size:10pt">
Hi all,<br>
<br>
&nbsp;&nbsp;&nbsp; I was wondering about the best way to resample data with a high-frequency TMS artifact. I first epoched the raw data so that the TMS events would be kept but when I resample the epochs, a low-pass filter is applied which makes sense but causes a large filter
 artifact from the TMS pulse. Is there any way to not apply this filter?<br>
<br>
Thanks,<br>
<br>
Alex<br>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
<a rel="noreferrer" href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.e<wbr>du/mailman/listinfo/mne_analys<wbr>is</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a rel="noreferrer" href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/compli<wbr>anceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>