osl_ephys.source_recon.batch#
Batch processing for source reconstruction.
Attributes#
Functions#
|
Load config. |
|
Find a source reconstruction function. |
|
Source reconstruction. |
|
Batch source reconstruction. |
Module Contents#
- osl_ephys.source_recon.batch.load_config(config)[source]#
Load config.
- Parameters:
config (str or dict) – Path to yaml file or str to convert to dict or a dict.
- Returns:
config – Source reconstruction config.
- Return type:
dict
- osl_ephys.source_recon.batch.find_func(method, extra_funcs)[source]#
Find a source reconstruction function.
- Parameters:
method (str) – Function name.
extra_funcs (list of functions) – Custom functions.
- Returns:
func – Function to use.
- Return type:
function
- osl_ephys.source_recon.batch.run_src_chain(config, outdir, subject, preproc_file=None, smri_file=None, epoch_file=None, surface_extraction_method='fsl', logsdir=None, reportdir=None, gen_report=True, verbose='INFO', mneverbose='WARNING', extra_funcs=None, random_seed='auto')[source]#
Source reconstruction.
- Parameters:
config (str or dict) – Source reconstruction config.
outdir (str) – Source reconstruction directory.
subject (str) – Subject name.
surface_extraction_method (str) – Can be ‘fsl’ or ‘freesurfer’.
preproc_file (str) – Preprocessed fif file.
smri_file (str) – Structural MRI file.
epoch_file (str) – Epoched fif file.
logsdir (str) – Directory to save log files to.
reportdir (str) – Directory to save report files to.
gen_report (bool) – Should we generate a report?
verbose (str) – Level of verbose.
mneverbose (str) – Level of MNE verbose.
extra_funcs (list of functions) – Custom functions.
random_seed ('auto' (default), int or None) – Random seed to set. If ‘auto’, a random seed will be generated. Random seeds are set for both Python and NumPy. If None, no random seed is set.
- Returns:
flag – Flag indicating whether source reconstruction was successful.
- Return type:
bool
- osl_ephys.source_recon.batch.run_src_batch(config, outdir, subjects, preproc_files=None, smri_files=None, epoch_files=None, surface_extraction_method='fsl', logsdir=None, reportdir=None, gen_report=True, verbose='INFO', mneverbose='WARNING', extra_funcs=None, dask_client=False, random_seed='auto')[source]#
Batch source reconstruction.
- Parameters:
config (str or dict) – Source reconstruction config.
outdir (str) – Source reconstruction directory.
subjects (list of str) – Subject names.
surface_extraction_method (str) – Can be ‘fsl’ or ‘freesurfer’.
preproc_files (list of str) – Preprocessed fif files.
smri_files (list of str or str) – Structural MRI files. Can be ‘standard’ to use MNI152_T1_2mm.nii for the structural.
epoch_files (list of str) – Epoched fif file.
logsdir (str) – Directory to save log files to.
reportdir (str) – Directory to save report files to.
gen_report (bool) – Should we generate a report?
verbose (str) – Level of verbose.
mneverbose (str) – Level of MNE verbose.
extra_funcs (list of functions) – Custom functions.
dask_client (bool) – Are we using a dask client?
random_seed ('auto' (default), int or None) – Random seed to set. If ‘auto’, a random seed will be generated. Random seeds are set for both Python and NumPy. If None, no random seed is set.
- Returns:
flags – Flags indicating whether coregistration was successful.
- Return type:
list of bool