[Mne_analysis] on_missing and time-frequency
Denis-Alexander Engemann
denis.engemann at gmail.com
Fri Oct 3 04:59:18 EDT 2014
Thanks Virginie,
I opened a PR, which is based on your suggestion.
2014-10-02 22:42 GMT+02:00 Virginie van Wassenhove <
virginie.van.wassenhove at gmail.com>:
> simply specify that "if no event id are found in the data, an error will
> be automatically generated irrespective of the str"
>
> however, i am still unclear about what "no_missing" means: how would
> mne.epochs know in advance whether an event should be there or not (hence
> that it is missing)?
>
The mismatch is produced as follows:
You pass an event_id that will be a dict in most cases, e.g. {'left': 1,
'right':2}.
Second you pass events at which to segment the continuous recordings.
For simplicity let's assume we only have two of them.
np.array([[1, 0, 14], [1, 0, 2]])
In this case the event id 'left' is not found in the events (not in the
data) and 'on_missing' becomes relevant.
For the sourcecode see:
https://github.com/mne-tools/mne-python/blob/master/mne/epochs.py#L708
If no event id is found at all and 'on_missing' is set to 'ignore' it will
crash here:
https://github.com/mne-tools/mne-python/blob/master/mne/epochs.py#L731
-Denis
> -V
>
> On Thu, Oct 2, 2014 at 6:30 PM, Alexandre Gramfort <
> alexandre.gramfort at telecom-paristech.fr> wrote:
>
>> nice to hear it works
>>
>> how would you phrase the doc? It is currently:
>>
>> on_missing : str
>> What to do if an event id is not found in the recording.
>> Valid keys are 'error' | 'warning' | 'ignore'
>> Default is 'error'. If on_missing is 'warning' it will proceed but
>> warn, if 'ignore' it will proceed silently.
>>
>> Alex
>>
>
>
>
>
>
> _______________________________________________
> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141003/ea291354/attachment.html
More information about the Mne_analysis
mailing list