typos, wrong indices, unsuccessful function calls.
actually it's annoying if something goes wrong and you've got to run the decomposition once more.
my idea was that if sth is bad, at least the ica is fitted.
what about printing trace back + error message?

On 07.02.2013, at 18:39, Alexandre Gramfort <notifications@github.com> wrote:

> In mne/preprocessing/ica.py:
> 
> > -
> > -    logger.info('Ready.')
> > -
> > -    return ica
> > +    try:
> > +        ica = _detect_artifacts(ica=ica, raw=raw, start_find=start_find,
> > +                stop_find=stop_find, ecg_channel=ecg_channel,
> > +                ecg_score_func=ecg_score_func, ecg_criterion=ecg_criterion,
> > +                eog_channel=eog_channel, eog_score_func=eog_score_func,
> > +                eog_criterion=ecg_criterion, skew_criterion=skew_criterion,
> > +                kurt_criterion=kurt_criterion, var_criterion=var_criterion,
> > +                add_nodes=add_nodes)
> > +    except:
> > +        logger.info('Detection failed. Returning ica without indices marked'
> > +                    ' for exclusion. Please continue using the '
> > +                    'ica.detect_artifacts method')
> what could happen here? I don't like that much as it can be stupid typo that is caught by the except.
> Can you do this in your script?
> 
> —
> Reply to this email directly or view it on GitHub.
>