pymovements.DataQualityReport.save_bids_report#

DataQualityReport.save_bids_report(output_path: Path, pipeline_name: str = 'pymovements') → None[source]#

Write BIDS-conformant derivative report files.

Writes the following files under output_path / 'derivatives' / pipeline_name /:

  • dataset_description.json — required BIDS derivative descriptor.

  • data_quality_checks.tsv + .json sidecar — one row per CheckResult.

  • data_quality_measures_{level}.tsv + .json sidecar — one file per aggregation level present in measures.

  • warnings.log — one line per Python warning captured during the run.

Parameters:
  • output_path (Path) – Root of the BIDS dataset. Derivative files are written under output_path / 'derivatives' / pipeline_name /.

  • pipeline_name (str) – Name of the pipeline sub-directory. (default: 'pymovements')

Examples

>>> import tempfile, pathlib
>>> from pymovements.gaze.quality import DataQualityReport, CheckResult
>>> report = DataQualityReport(
...     check_results=[CheckResult('trial_columns_exist', 'pass', 'All OK')],
... )
>>> with tempfile.TemporaryDirectory() as tmp:
...     report.save_bids_report(pathlib.Path(tmp))