validate
Validate generated cued recall BIDS events against metainformation reference.
Compares events files generated by timed_events.py for cued recall sessions against the pre-formatted reference files in sourcedata/metainformation/.
Validation checks:
- Row count match
- Exact match on categorical columns (trial_id, word, pairId, mmmId, trial_type)
- Numeric match within tolerance for timing columns (onset_actual, duration_actual)
- Exact match on response columns (resp, resp_RT)
Session mapping: Metainformation uses ses-01 to ses-15 (cued recall session number). BIDS output uses ses-04 to ses-18 (cued recall session + 3).
Usage: python validate.py [–subjects SUB1,SUB2,…] [–tolerance 0.01] [–verbose]
Source: src/python/raw2bids_converters/validate.py
Functions
find_metainfo_file
Find the metainformation reference file for a given session/task/run.
Metainformation uses ses-01 to ses-15 numbering (cued recall session).
find_metainfo_file(sub_num, cr_session, task, run)
find_generated_file
Find the generated BIDS events file for a given session/task/run.
Generated files use BIDS ses-04 to ses-18 numbering.
find_generated_file(sub_num, cr_session, task, run)
compare_files
Compare a generated events file against the metainformation reference.
Returns a dict with comparison results.
compare_files(gen_path, ref_path, tolerance = TIMING_TOLERANCE, verbose = False)
validate_subject
Validate all cued recall events for one subject.
validate_subject(sub_num, tolerance = TIMING_TOLERANCE, verbose = False)