ffrprep.group.run_group_level

ffrprep.group.run_group_level(args)[source]

Run the group-level aggregation step (BIDS-App analysis_level=group).

Discovers participant-level ffrprep-analysis/ffrprep-preprocessing derivatives under args.output_dir, computes a grand-average evoked response and a per-subject scalar-metrics table for each (task, session, run) with at least two contributing subjects, writes them plus a group HTML report to args.output_dir/ffrprep-group/, and returns the list of output paths written.

This step only aggregates outputs participant-level ffrprep has already computed; it does not run any group-level statistics. When args.f0 / args.stimulus are set, the metrics table also gets harmonic-amplitude and stimulus-to-response columns computed from the sum of the per-trial-type averages, and subject-level covariates from <bids_dir>/participants.tsv and args.covariates are joined onto the saved TSV (never used for inference here). args.min_usable_pct / args.min_snr add qc_* flag columns (see add_qc_flags()); flagged subjects stay in the table and the grand averages.