skbold.exp_model.batch_fsf module

class FsfCrawler(data_dir, run_idf=None, template='mvpa', preprocess=True, register=True, mvpa_type='trial_wise', output_dir=None, subject_idf='sub', event_file_ext='txt', sort_by_onset=False, prewhiten=True, n_cores=1, **feat_options)[source]

Bases: object

Given an fsf-template, this crawler creates subject-specific fsf-FEAT files assuming that appropriate .bfsl files exist.

Parameters:
  • data_dir (str) – Absolute path to directory with BIDS-formatted data.
  • run_idf (str) – Identifier for run to apply template fsf to.
  • template (str) – Absolute path to template fsf-file. Default is ‘mvpa’, which models each event as a separate regressor (and contrast against baseline).
  • preprocess (bool) – Whether to apply preprocessing (as specified in template) or whether to only run statistics/GLM.
  • register (bool) – Whether to calculate registration (func -> highres, highres -> standard)
  • mvpa_type (str) – Whether to estimate patterns per trial (mvpa_type=’trial_wise’) or to estimate patterns per condition (or per run, mvpa_type=’run_wise’)
  • output_dir (str) – Path to desired output dir of first-levels.
  • subject_idf (str) – Identifier for subject-directories.
  • event_file_ext (str) – Extension for event-file; if ‘bfsl/txt’ (default, for legacy reasons), then assumes single event-file per predictor. If ‘tsv’ (cf. BIDS), then assumes a single tsv-file with all predictors.
  • sort_by_onset (bool) – Whether to sort predictors by onset (first trial = first predictor), or, when False, sort by condition (all trials condition A, all trials condition B, etc.).
  • n_cores (int) – How many CPU cores should be used for the batch-analysis.
  • feat_options (key-word arguments) –

    Which preprocessing options to set (only relevant if template=’mvpa’ or if you want to deviate from template). Examples:

    mc=‘1’ (apply motion correction), st=‘1’ (apply regular-up slice-time correction), bet_yn=‘1’ (do brain extraction of func-file), smooth=‘5.0’ (smooth with 5 mm FWHM), temphp_yn=‘1’ (do HP-filtering), paradigm_hp=‘100’ (set HP-filter to 100 seconds), prewhiten_yn=‘1’ (do prewhitening), motionevs=‘1’ (add motion-params as nuisance regressors)
crawl()[source]

Crawls subject-directories and spits out subject-specific fsf.