wonambi.trans.reject module

Module to reject bad channels and bad epochs.

wonambi.trans.reject.rejectbadchan()[source]

Class to reject bad channels.

wonambi.trans.reject.remove_artf_evts(times, annot, chan=None, name=None, min_dur=0.1)[source]

Correct times to remove events marked ‘Artefact’.

Parameters:
  • times (list of tuple of float) – the start and end times of each segment

  • annot (instance of Annotations) – the annotation file containing events and epochs

  • chan (str, optional) – full name of channel on which artefacts were marked. Channel format is ‘chan_name (group_name)’. If None, artefacts from any channel will be removed.

  • name (str or list of str, optional) – name of the event type(s) to be rejected. If None, defaults to ‘Artefact’.

  • min_dur (float) – resulting segments, after concatenation, are rejected if shorter than this duration

Returns:

list of tuple of float – the new start and end times of each segment, with artefact periods taken out