[Mne_analysis] Visual annotation question

Brunner, Clemens (clemens.brunner@uni-graz.at) clemens.brunner at uni-graz.at
Wed Jul 15 03:39:29 EDT 2020
Search archives:

        External Email - Use Caution        

Hi!

When you close the window, the annotated intervals are stored in raw.annotations. If annotation descriptions start with "bad", they are ignored by most MNE functions (see https://mne.tools/stable/auto_tutorials/raw/plot_30_annotate_raw.html#how-annotations-affect-preprocessing-and-analysis and https://mne.tools/stable/auto_tutorials/preprocessing/plot_20_rejecting_bad_data.html#id1).

Therefore, if you are going to use MNE for further processing, it might not be necessary to remove these intervals from the raw data (but make sure their names start with "bad").

If you really need to remove these intervals from the raw object, I'm not aware of any built-in method to achieve that. There's raw.crop(), but this more or less does the inverse operation and only works with one interval. Epochs do have epochs.drop_bad(), but raw.drop_bad() doesn't exist, but it might be a useful addition.

Feel free to open an issue at https://github.com/mne-tools/mne-python/issues to discuss this feature.

Clemens


> On 14.07.2020, at 23:29, Paul Fishback <fishbacp at mail.gvsu.edu> wrote:
> 
>         External Email - Use Caution        
> 
> 
> Hello,
> 
> I'm constructing a script that combines MNE and Tkinter to allow clinicians to compute various connectivity measures. My files are EDF and not FIF. 
> 
> I'd like to provide the means for updating raw data when certain intervals are annotated. By that I mean if I perform raw.plot(), select "a", and highlight intervals as in the illustration below, I'd like for the raw data to be updated to exclude the highlighted intervals when the window is closed. In the picture, the new raw file would be the old one with the
> time intervals 100 to 200 and 400 to 500 seconds removed.
> 
> Is this possible?
> 
> Thanks
> 
> Paul F.
> 
> <image.png>
> 
> 
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis





More information about the Mne_analysis mailing list