Code originaly provided by Pierre-Emmanuel Morin
Script used to validate de content of e-prime directories obtained during fMRI session (CIMA-Q). This code verifies that all files are properly identified (CIMA-Q naming convention) and that files required for further analysis are present.
You should have one, unzipped, directory per participant containing the files created during one fMRI session for CIMA-Q
The directories are from /loris/media_uploads and are expected to be named according to the following rule:
PSCID_VisitLabel_IRMF_task_suffix (example: 1234567_V01_IRMf_task)
The validate the content by running the scipt:
python3 fmri_task_validator.py 1234567_V03_IRMf_task
or (to send results to a file)
python3 fmri_task_validator.py 1234567_V01_IRMf_task >> validation.txt
python3 fmri_task_validator.py 2345678_V01_IRMf_task >> validation.txt
Output example:
9889496_V03_IRMf_task
PRATIQUE-9889496-V03.edat2
PRATIQUE-9889496-V03.txt
Output_Retrieval_9889496_V03.txt
Retrieval-9889496-V03.edat2
Encoding-scan_NewPad-9889496-V03.txt
Output-Responses-Encoding_9889496_847696_V03A.txt
Onset-Event-Encoding_9889496_847696_V03A.txt
Encoding-scan_NewPad-9889496-V03.edat2
Retrieval-9889496-V03.txt
All IDs are OK!
Content is valid!
An array contains a list of files to ignore.
Current list includes:
README.txt
*.pdf (debrifing files are sometimes included)
The following files must be present:
Onset-Event-Encoding*
Output-Responses-Encoding*
Output_Retrieval*
Add an alternate printing mode (single vs multiple)