Peak to peak amplitude auto: based on MNE annotations

meg_qc.calculation.metrics.Peaks_auto_meg_qc.PP_auto_meg_qc(ptp_auto_params: dict, channels: list, data: Raw, m_or_g_chosen: list)[source]

Function calculates peak-to-peak amplitude annotations for every channel separately.

Parameters:
  • ptp_auto_params (dict) – Dictionary with parameters for peak-to-peak amplitude annotations.

  • channels (list) – List of channels.

  • data (mne.io.Raw) – Raw data.

  • m_or_g_chosen (list) – List of channels types.

Returns:

  • deriv_ptp_auto (list) – List of QC_derivative objects containing dataframes with peak-to-peak amplitude annotations.

  • bad_channels (list) – List of bad channels.

  • pp_auto_str (str) – string with notes about PtP auto for report

meg_qc.calculation.metrics.Peaks_auto_meg_qc.get_amplitude_annots_per_channel(raw: Raw, peak: float, flat: float, channels: List, bad_percent: int, min_duration: float) Tuple[DataFrame, List][source]

Create peak-to-peak amplitude annotations for every channel separately

Parameters:
  • raw (mne.io.Raw) – Raw data.

  • peak (float) – Peak value.

  • flat (float) – Flat value.

  • channels (list) – List of channel names.

  • bad_percent (int) – Percent of bad data allowed to still cound channels as good.

  • min_duration (float) – Minimum duration of bad data to be considered as bad? (check this)

Returns:

  • df_ptp_amlitude_annot (pd.DataFrame) – Dataframe with peak-to-peak amplitude annotations.

  • bad_channels (list) – List of bad channels.