meeg_utils.report.DerivativesSummary#

class meeg_utils.report.DerivativesSummary(table, warnings_, *, min_files=5)[source]#

QC metrics of every derivative in a folder, with outlying files flagged.

Built by summarize(). The metrics are the scalar values of each step’s qc_ (e.g. bads.eeg.n_bads, ica.n_excluded, autoreject.fraction_dropped) read from the sidecars; a file is an outlier for a metric when its modified z-score exceeds 3.5 (as meeg_utils.qc.inspect_dataset()).

table#

File (relative to the root) mapped to {metric: value}.

Type:

dict

warnings#

File mapped to the warnings its pipeline raised.

Type:

dict

outliers#

source, metric, value and z of each outlier.

Type:

list of dict

__init__(table, warnings_, *, min_files=5)[source]#

Methods

__init__(table, warnings_, *[, min_files])

report(*[, title, max_metrics])

Build an HTML report: outliers, warnings and the distribution of each metric.

to_csv(fname)

Write to_records() as CSV.

to_records()

One row per file: its metrics, warning count and outlying metrics.

to_records()[source]#

One row per file: its metrics, warning count and outlying metrics.

to_csv(fname)[source]#

Write to_records() as CSV.

Parameters:

fname (str | Path) – Output file.

Returns:

The file written.

Return type:

Path

report(*, title='Preprocessing summary', max_metrics=24)[source]#

Build an HTML report: outliers, warnings and the distribution of each metric.

Parameters:
  • title (str) – Report title.

  • max_metrics (int) – At most this many metric distributions are drawn (those that vary across files, outlying ones first).

Returns:

The report.

Return type:

mne.Report