datman.fs_log_scraper module

Scrapes the ‘scripts’ log files in a freesurfer output folder for information about a run and reports any differences between the subjects and the expected parameters.

The FSLog class aggregates/parses the most useful details from the log files.

class datman.fs_log_scraper.FSLog(freesurfer_folder)[source]

Bases: object

static get_args(cmd_args)[source]
get_date(date_str)[source]
get_kernel(log_uname)[source]
static get_niftis(cmd_args)[source]
get_subject(subject_field)[source]
parse_recon_done(recon_done)[source]
read_log(path)[source]
datman.fs_log_scraper.check_diff(log_field, standards_field)[source]
datman.fs_log_scraper.choose_standard_sub(subject_logs)[source]
datman.fs_log_scraper.make_standards(standard_log)[source]
datman.fs_log_scraper.scrape_logs(fs_output_folders, standards=None, col_headers=False)[source]

Takes a list of paths to freesurfer output folders and generates a list of log lines containing differences relative to a ‘standard’ subject.

A field will be left empty if no differences are found

datman.fs_log_scraper.verify_standards(standards_dict, expected_keys)[source]