ffrprep.group.add_qc_flags¶
- ffrprep.group.add_qc_flags(metrics, min_usable_pct=None, min_snr=None)[source]¶
Flag recordings that fail quality thresholds; never drop rows.
Adds boolean
qc_usable_pct_ok(usable_pct >= min_usable_pct) and/orqc_snr_ok(polarity-sum RMS SNR, else the combined-evokedrms_snr,>= min_snr) columns for each threshold given, plusqc_include(all checks pass) andqc_reason(the failed checks,n/awhen none). A missing value (NaN) fails its check. The metrics table keeps every subject and the grand averages are unchanged, so downstream analyses choose whether to filter onqc_include.Returns
metricsunchanged when no threshold is given.