Skip to content

Commit a018735

Browse files
Update workflows.py
1 parent 7a5126e commit a018735

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

phys2cvr/workflows.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,13 +451,16 @@ def phys2cvr(
451451

452452
_, basename_co2, _ = utils.check_ext(
453453
io.EXT_ALL, os.path.basename(fname_co2), scan=True, remove=True
454-
)[1]
454+
)
455455

456456
outprefix = os.path.join(outdir, basename_co2)
457457

458-
petco2hrf = compute_petco2hrf(
459-
co2, pidx, freq, outprefix, comp_endtidal, response_function
460-
)
458+
if comp_endtidal:
459+
petco2hrf = compute_petco2hrf(
460+
co2, pidx, freq, outprefix, comp_endtidal, response_function
461+
)
462+
else:
463+
petco2hrf=co2
461464

462465
# If a regressor dir is specified, try load the data,
463466
# If failing or otherwise, compute the regressors.

0 commit comments

Comments
 (0)