Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Allow --use-syn-sdc to take a "warn" option to avoid exiting when PE dir is unavailable #2680

Merged
merged 2 commits into from
Jan 6, 2022

Conversation

effigies
Copy link
Member

@effigies effigies commented Jan 6, 2022

The main use case here is when writing a script to run fMRIPrep on heterogeneous datasets. This avoids having to pre-check each dataset/subject for whether PhaseEncodingDirection is available; you just run it if you can.

Also simplifies the (probably vanishingly rare) case where PhaseEncodingDirection may be available for some tasks/runs within a subject but not others.

The old behaviors are preserved, so this is bug-fix safe. --use-syn-sdc and --use-syn-sdc error are synonyms. --use-syn-sdc warn is the new feature.

Happy to consider alternative approaches, but I think this is useful functionality.

default=False,
help="EXPERIMENTAL: Use fieldmap-free distortion correction",
help="EXPERIMENTAL: Use fieldmap-free distortion correction; "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

random thought - when do we plan on removing the "EXPERMENTAL" tag?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there's a ground truth. :-P

IDK. Maybe let's discuss at next bimonthly?

@effigies effigies merged commit c86c772 into nipreps:maint/21.0.x Jan 6, 2022
@effigies effigies deleted the enh/opportunistic-syn-flag branch January 6, 2022 21:26
@mgxd
Copy link
Collaborator

mgxd commented Jan 6, 2022

tests are now failing...

Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/cli/workflow.py", line 118, in build_workflow
    retval["workflow"] = init_fmriprep_wf()
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/workflows/base.py", line 85, in init_fmriprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/workflows/base.py", line 337, in init_single_subject_wf
    raise ValueError(message)
ValueError: Fieldmap-less (SyN) estimation was requested, but PhaseEncodingDirection information appears to be absent.
fMRIPrep: Please report errors to https://github.com/nipreps/fmriprep/issues

@effigies
Copy link
Member Author

effigies commented Jan 6, 2022

Completely failed to look at the test failures. That's really weird, though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants