Skip to content

Commit

Permalink
Update fit.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Nov 20, 2023
1 parent 2dace47 commit 3a660e9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion aslprep/workflows/asl/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import bids
import nibabel as nb
import numpy as np
from fmriprep.interfaces.reports import FunctionalSummary
from fmriprep.workflows.bold.registration import init_bold_reg_wf
from nipype.interfaces import utility as niu
Expand Down Expand Up @@ -193,6 +194,14 @@ def init_asl_fit_wf(
# Get metadata from ASL file(s)
entities = extract_entities(asl_file)
metadata = layout.get_metadata(asl_file)
# Patch RepetitionTimePreparation into RepetitionTime,
# for the sake of BOLD-based interfaces and workflows.
# This value shouldn't be used for anything except figures and reportlets.
metadata["RepetitionTime"] = metadata.get(
"RepetitionTime",
np.mean(metadata["RepetitionTimePreparation"]),
)

orientation = "".join(nb.aff2axcodes(nb.load(asl_file).affine))

_, mem_gb = estimate_asl_mem_usage(asl_file)
Expand Down Expand Up @@ -273,7 +282,7 @@ def init_asl_fit_wf(
mem_gb=config.DEFAULT_MEMORY_MIN_GB,
run_without_submitting=True,
)
summary.inputs.dummy_scans = config.workflow.dummy_scans
summary.inputs.dummy_scans = config.workflow.dummy_vols

asl_fit_reports_wf = init_asl_fit_reports_wf(
sdc_correction=not (fieldmap_id is None),
Expand Down

0 comments on commit 3a660e9

Please sign in to comment.