Skip to content

Commit

Permalink
Fix volume selection and temporarily remove --dummy-scans parameter (
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo authored Nov 26, 2024
1 parent 19df836 commit dbc5716
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
24 changes: 12 additions & 12 deletions aslprep/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,18 +351,18 @@ def _bids_filter(value, parser):
default=None,
help='Do not use boundary-based registration (no goodness-of-fit checks)',
)
g_conf.add_argument(
'--dummy-scans',
required=False,
action='store',
default=None,
type=int,
help=(
'Number of non-steady-state volumes. '
'Note that this indicates the number of volumes, not the number of control-label '
'pairs in the ASL file.'
),
)
# g_conf.add_argument(
# '--dummy-scans',
# required=False,
# action='store',
# default=None,
# type=int,
# help=(
# 'Number of non-steady-state volumes. '
# 'Note that this indicates the number of volumes, not the number of control-label '
# 'pairs in the ASL file.'
# ),
# )
g_conf.add_argument(
'--random-seed',
dest='_random_seed',
Expand Down
3 changes: 2 additions & 1 deletion aslprep/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ class workflow(_Config):
cifti_output = None
"""Generate HCP Grayordinates, accepts either ``'91k'`` (default) or ``'170k'``."""
dummy_scans = 0
"""Number of label-control volume pairs to delete before CBF computation."""
"""Number of label-control volume pairs to delete before CBF computation. Not currently used.
"""
fmap_bspline = None
"""Regularize fieldmaps with a field of B-Spline basis."""
fmap_demean = None
Expand Down
1 change: 1 addition & 0 deletions aslprep/workflows/asl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ def init_asl_wf(
(asl_native_wf, cbf_wf, [
('outputnode.asl_native', 'inputnode.asl_file'),
('outputnode.aslcontext', 'inputnode.aslcontext'),
('outputnode.metadata', 'inputnode.metadata'),
('outputnode.m0scan_native', 'inputnode.m0scan'),
]),
]) # fmt:skip
Expand Down
11 changes: 9 additions & 2 deletions aslprep/workflows/asl/cbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def init_cbf_wf(
name_source : :obj:`str`
Path to the raw ASL file.
metadata : :obj:`dict`
BIDS metadata for asl file
BIDS metadata for asl file.
List-type fields in this dict have not been reduced based on selected volumes,
so this should only be used for metadata that is not affected by volume selection.
scorescrub
basil
m0_scale
Expand All @@ -89,6 +91,10 @@ def init_cbf_wf(
asl_file
asl series NIfTI file, after preprocessing
aslcontext : :obj:`str`
metadata : :obj:`dict`
Metadata dictionary associated with asl_file, after preprocessing.
List-type fields in this dict *have* been reduced based on selected volumes,
so this is the dictionary that should be used to select volumes.
m0scan : :obj:`str` or None
An M0 scan (if available as a separate file) in aslref space.
m0scan_metadata : :obj:`dict` or None
Expand Down Expand Up @@ -224,6 +230,7 @@ def init_cbf_wf(
fields=[
'asl_file',
'aslcontext',
'metadata',
'm0scan',
'm0scan_metadata',
'asl_mask',
Expand Down Expand Up @@ -371,7 +378,6 @@ def _getfiledir(file):
name_source=name_source,
dummy_scans=dummy_scans,
fwhm=smooth_kernel,
metadata=metadata,
),
mem_gb=0.2,
run_without_submitting=True,
Expand All @@ -381,6 +387,7 @@ def _getfiledir(file):
workflow.connect([
(inputnode, extract_deltam, [
('asl_file', 'asl_file'),
('metadata', 'metadata'),
('aslcontext', 'aslcontext'),
('m0scan_metadata', 'm0scan_metadata'),
]),
Expand Down

0 comments on commit dbc5716

Please sign in to comment.