def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> BunchConst: cfg = BunchConst(task=config.get_task(), datatype=config.get_datatype(), runs=config.get_runs(subject=subject), acq=config.acq, rec=config.rec, space=config.space, deriv_root=config.get_deriv_root(), interactive=config.interactive, ica_l_freq=config.ica_l_freq, ica_algorithm=config.ica_algorithm, ica_n_components=config.ica_n_components, ica_max_iterations=config.ica_max_iterations, ica_decim=config.ica_decim, ica_reject=config.get_ica_reject(), ica_eog_threshold=config.ica_eog_threshold, ica_ctps_ecg_threshold=config.ica_ctps_ecg_threshold, random_state=config.random_state, ch_types=config.ch_types, l_freq=config.l_freq, decim=config.decim, resample_sfreq=config.resample_sfreq, event_repeated=config.event_repeated, epochs_tmin=config.epochs_tmin, epochs_tmax=config.epochs_tmax, eeg_reference=config.get_eeg_reference(), eog_channels=config.eog_channels) return cfg
def get_config( subject: Optional[str] = None, session: Optional[str] = None ) -> BunchConst: cfg = BunchConst( subjects=config.get_subjects(), task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, proc=config.proc, deriv_root=config.get_deriv_root(), conditions=config.conditions, contrasts=config.contrasts, decode=config.decode, decoding_metric=config.decoding_metric, decoding_n_splits=config.decoding_n_splits, random_state=config.random_state, n_boot=config.n_boot, analyze_channels=config.analyze_channels, interpolate_bads_grand_average=config.interpolate_bads_grand_average, ch_types=config.ch_types, eeg_reference=config.get_eeg_reference(), interactive=config.interactive ) return cfg
def get_config( subject: Optional[str] = None, session: Optional[str] = None ) -> BunchConst: cfg = BunchConst( process_er=config.process_er, runs=config.get_runs(subject=subject), use_maxwell_filter=config.use_maxwell_filter, proc=config.proc, task=config.get_task(), datatype=config.get_datatype(), session=session, acq=config.acq, rec=config.rec, space=config.space, bids_root=config.get_bids_root(), deriv_root=config.get_deriv_root(), interactive=config.interactive, epochs_tmin=config.epochs_tmin, epochs_tmax=config.epochs_tmax, epochs_metadata_tmin=config.epochs_metadata_tmin, epochs_metadata_tmax=config.epochs_metadata_tmax, epochs_metadata_keep_first=config.epochs_metadata_keep_first, epochs_metadata_keep_last=config.epochs_metadata_keep_last, event_repeated=config.event_repeated, decim=config.decim, ch_types=config.ch_types, eeg_reference=config.get_eeg_reference() ) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> BunchConst: cfg = BunchConst(datatype=config.get_datatype(), deriv_root=config.get_deriv_root(), PIPELINE_NAME=config.PIPELINE_NAME, VERSION=config.VERSION, CODE_URL=config.CODE_URL) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> SimpleNamespace: cfg = SimpleNamespace(datatype=config.get_datatype(), deriv_root=config.get_deriv_root(), PIPELINE_NAME=config.PIPELINE_NAME, VERSION=config.VERSION, CODE_URL=config.CODE_URL) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> BunchConst: cfg = BunchConst( task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, deriv_root=config.get_deriv_root(), ) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> SimpleNamespace: cfg = SimpleNamespace(task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, deriv_root=config.get_deriv_root(), interactive=config.interactive, baseline=config.baseline, ica_reject=config.get_ica_reject()) return cfg
def get_config( subject: Optional[str] = None, session: Optional[str] = None ) -> SimpleNamespace: cfg = SimpleNamespace( task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, deriv_root=config.get_deriv_root(), ) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> SimpleNamespace: # Deal with configurations where `deriv_root` was specified, but not # `fs_subjects_dir`. We normally raise an exception in this case in # `get_fs_subjects_dir()`. However, in situations where users only run the # sensor-space scripts, we never call this function, so everything works # totally fine at first (which is expected). Yet, when creating the # reports, the pipeline would fail with an exception – which is # unjustified, as it would not make sense to force users to provide an # `fs_subjects_dir` if they don't care about source analysis anyway! So # simply assign a dummy value in such cases. # `get_fs_subject()` calls `get_fs_subjects_dir()`, so take care of this # too. try: fs_subjects_dir = config.get_fs_subjects_dir() except ValueError: fs_subjects_dir = None fs_subject = None else: fs_subject = config.get_fs_subject(subject=subject) cfg = SimpleNamespace( task=config.get_task(), runs=config.get_runs(subject=subject), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, proc=config.proc, analyze_channels=config.analyze_channels, process_er=config.process_er, find_noisy_channels_meg=config.find_noisy_channels_meg, h_freq=config.h_freq, spatial_filter=config.spatial_filter, ica_reject=config.ica_reject, conditions=config.conditions, contrasts=config.contrasts, time_frequency_conditions=config.time_frequency_conditions, decode=config.decode, decoding_metric=config.decoding_metric, n_boot=config.n_boot, inverse_method=config.inverse_method, fs_subject=fs_subject, fs_subjects_dir=fs_subjects_dir, deriv_root=config.get_deriv_root(), bids_root=config.get_bids_root(), use_template_mri=config.use_template_mri, interactive=config.interactive, plot_psd_for_runs=config.plot_psd_for_runs, ) return cfg
def get_config() -> BunchConst: cfg = BunchConst( task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, proc=config.proc, conditions=config.conditions, inverse_method=config.inverse_method, fs_subjects_dir=config.get_fs_subjects_dir(), deriv_root=config.get_deriv_root(), ) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> BunchConst: cfg = BunchConst( task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, ch_types=config.ch_types, conditions=config.conditions, inverse_method=config.inverse_method, deriv_root=config.get_deriv_root(), ) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> BunchConst: cfg = BunchConst(task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, baseline=config.baseline, reject_tmin=config.reject_tmin, reject_tmax=config.reject_tmax, spatial_filter=config.spatial_filter, ica_reject=config.get_ica_reject(), deriv_root=config.get_deriv_root(), decim=config.decim) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> BunchConst: cfg = BunchConst( task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, proc=config.proc, noise_cov=config.noise_cov, spatial_filter=config.spatial_filter, ch_types=config.ch_types, deriv_root=config.get_deriv_root(), ) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> SimpleNamespace: cfg = SimpleNamespace( task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, deriv_root=config.get_deriv_root(), time_frequency_conditions=config.time_frequency_conditions, analyze_channels=config.analyze_channels, spatial_filter=config.spatial_filter, ch_types=config.ch_types, eeg_reference=config.get_eeg_reference(), time_frequency_freq_min=config.time_frequency_freq_min, time_frequency_freq_max=config.time_frequency_freq_max) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> BunchConst: cfg = BunchConst(task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, deriv_root=config.get_deriv_root(), conditions=config.conditions, contrasts=config.contrasts, decode=config.decode, decoding_metric=config.decoding_metric, decoding_n_splits=config.decoding_n_splits, random_state=config.random_state, analyze_channels=config.analyze_channels, ch_types=config.ch_types, eeg_reference=config.get_eeg_reference(), n_jobs=config.get_n_jobs()) return cfg
def get_config( subject: Optional[str] = None, session: Optional[str] = None ) -> SimpleNamespace: cfg = SimpleNamespace( task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, source_info_path_update=config.source_info_path_update, inverse_targets=config.inverse_targets, noise_cov=config.noise_cov, ch_types=config.ch_types, conditions=config.conditions, inverse_method=config.inverse_method, deriv_root=config.get_deriv_root(), ) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> SimpleNamespace: cfg = SimpleNamespace( runs=config.get_runs(subject=subject), task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, eog_channels=config.eog_channels, deriv_root=config.get_deriv_root(), ssp_reject_ecg=config.ssp_reject_ecg, ecg_proj_from_average=config.ecg_proj_from_average, ssp_reject_eog=config.ssp_reject_eog, eog_proj_from_average=config.eog_proj_from_average, n_proj_eog=config.n_proj_eog, n_proj_ecg=config.n_proj_ecg, ) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> SimpleNamespace: cfg = SimpleNamespace( task=config.get_task(), runs=config.get_runs(subject=subject), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, mindist=config.mindist, spacing=config.spacing, use_template_mri=config.use_template_mri, source_info_path_update=config.source_info_path_update, ch_types=config.ch_types, fs_subject=config.get_fs_subject(subject=subject), fs_subjects_dir=config.get_fs_subjects_dir(), deriv_root=config.get_deriv_root(), bids_root=config.get_bids_root(), n_jobs=config.get_n_jobs()) return cfg
def get_config(subject: Optional[str] = None, session: Optional[str] = None) -> BunchConst: cfg = BunchConst( process_er=config.process_er, runs=config.get_runs(subject=subject), use_maxwell_filter=config.use_maxwell_filter, proc=config.proc, task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, bids_root=config.get_bids_root(), deriv_root=config.get_deriv_root(), l_freq=config.l_freq, h_freq=config.h_freq, l_trans_bandwidth=config.l_trans_bandwidth, h_trans_bandwidth=config.h_trans_bandwidth, resample_sfreq=config.resample_sfreq, crop_runs=config.crop_runs, interactive=config.interactive, rename_events=config.rename_events, eeg_bipolar_channels=config.eeg_bipolar_channels, eeg_template_montage=config.eeg_template_montage, fix_stim_artifact=config.fix_stim_artifact, stim_artifact_tmin=config.stim_artifact_tmin, stim_artifact_tmax=config.stim_artifact_tmax, find_flat_channels_meg=config.find_flat_channels_meg, find_noisy_channels_meg=config.find_noisy_channels_meg, reference_run=config.get_mf_reference_run(), drop_channels=config.drop_channels, find_breaks=config.find_breaks, min_break_duration=config.min_break_duration, t_break_annot_start_after_previous_event=config. t_break_annot_start_after_previous_event, # noqa:E501 t_break_annot_stop_before_next_event=config. t_break_annot_stop_before_next_event, # noqa:E501 ) return cfg
def get_config( subject: Optional[str] = None, session: Optional[str] = None ) -> BunchConst: cfg = BunchConst( task=config.get_task(), runs=config.get_runs(subject=subject), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, mindist=config.mindist, spacing=config.spacing, use_template_mri=config.use_template_mri, ch_types=config.ch_types, fs_subject=config.get_fs_subject(subject=subject), fs_subjects_dir=config.get_fs_subjects_dir(), deriv_root=config.get_deriv_root(), bids_root=config.get_bids_root(), n_jobs=config.get_n_jobs() ) return cfg
def get_config( subject: Optional[str] = None, session: Optional[str] = None ) -> BunchConst: cfg = BunchConst( mf_cal_fname=config.get_mf_cal_fname(subject, session), mf_ctc_fname=config.get_mf_ctc_fname(subject, session), mf_st_duration=config.mf_st_duration, mf_head_origin=config.mf_head_origin, process_er=config.process_er, runs=config.get_runs(subject=subject), # XXX needs to accept session! use_maxwell_filter=config.use_maxwell_filter, proc=config.proc, task=config.get_task(), datatype=config.get_datatype(), acq=config.acq, rec=config.rec, space=config.space, bids_root=config.get_bids_root(), deriv_root=config.get_deriv_root(), crop_runs=config.crop_runs, interactive=config.interactive, rename_events=config.rename_events, eeg_template_montage=config.eeg_template_montage, fix_stim_artifact=config.fix_stim_artifact, stim_artifact_tmin=config.stim_artifact_tmin, stim_artifact_tmax=config.stim_artifact_tmax, find_flat_channels_meg=config.find_flat_channels_meg, find_noisy_channels_meg=config.find_noisy_channels_meg, mf_reference_run=config.get_mf_reference_run(), drop_channels=config.drop_channels, find_breaks=config.find_breaks, min_break_duration=config.min_break_duration, t_break_annot_start_after_previous_event=config.t_break_annot_start_after_previous_event, # noqa:E501 t_break_annot_stop_before_next_event=config.t_break_annot_stop_before_next_event, # noqa:E501 ) return cfg