Skip to content

Commit

Permalink
Update parser.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Sep 18, 2024
1 parent 5301442 commit 6126a29
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions xcp_d/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,16 +1042,12 @@ def _validate_parameters(opts, build_log, parser):
opts.dcan_correlation_lengths = [c for c in opts.dcan_correlation_lengths if c != "all"]

# Load the confound configuration file
confounds_config = opts.confounds_config
if isinstance(confounds_config, str) and confounds_config != "none":
confounds_config = load_data.readable(f"nuisance/{confounds_config}.yml")
elif isinstance(confounds_config, str):
confounds_config = Path(confounds_config)

if confounds_config != "none":
opts.confounds_config = confounds_config
else:
if isinstance(opts.confounds_config, str) and opts.confounds_config != "none":
opts.confounds_config = load_data.readable(f"nuisance/{opts.confounds_config}.yml")
elif opts.confounds_config == "none":
opts.confounds_config = None
else:
opts.confounds_config = Path(opts.confounds_config).resolve()

# Bandpass filter parameters
if opts.high_pass <= 0 and opts.low_pass <= 0:
Expand Down

0 comments on commit 6126a29

Please sign in to comment.