Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.
brainprep.interfaces.freesurfer.freesurfer_command_status¶
- brainprep.interfaces.freesurfer.freesurfer_command_status(log_file, command, dryrun=False)[source]¶
Check the status of a FreeSurfer recon-all process from its log file.
- Parameters:
- log_fileFile
Path to the recon-all.log file.
- commandstr
The name of the command-line that produces the log file - used as a selector to define the success phrase.
- dryrunbool
If True, skip actual computation and file writing. Default False.
- Raises:
- FileNotFoundError
If no input log file.
- ValueError
If the command-line is not supported.
- RuntimeError
If recon-all failed or its status is unclear.
Notes
Success is determined by the presence of the phrase “finished without error” in the last lines of the log.
Errors are detected by scanning for lines containing “ERROR:” or “FATAL:”.
This function raises exceptions to signal failure or ambiguity, and does not return any value.