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: Runwise bold reference generation #268

Merged
merged 10 commits into from
Jan 19, 2023

Conversation

mgxd
Copy link
Collaborator

@mgxd mgxd commented Jan 6, 2023

Closes #253

This PR reverts bold reference generation to being calculated per run.

Included is a new workflow init_infant_epi_reference_wf that uses the following heuristic is used to generate the reference map:

  1. Matching single-band reference to BOLD image
  2. BOLD image (first 16 volumes dropped to avoid excessive motion if participant is startled)

@mgxd mgxd marked this pull request as ready for review January 9, 2023 14:41
# SLICE-TIME CORRECTION (or bypass) #############################################
if run_stc:
bold_stc_wf = init_bold_stc_wf(name="bold_stc_wf", metadata=metadata)
# fmt:off
workflow.connect([
(inputnode, bold_stc_wf, [('n_dummy_scans', 'inputnode.skip_vols')]),
(nss_detector, bold_stc_wf, [('n_dummy', 'inputnode.skip_vols')]),
Copy link
Member

Choose a reason for hiding this comment

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

At least in fMRIPrep, we allow this to be set manually by setting boldref_wf.inputnode.dummy_scans. Is this not implemented in nibabies?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch - It is, I guess we should prioritize user input, and default to calculating it with the nonsteadystates detector otherwise.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@effigies did the latest commit (7718b99) adequately address this?

@mgxd mgxd force-pushed the enh/runwise-reference-image branch from 9bf9d4b to 7718b99 Compare January 18, 2023 17:41
@mgxd mgxd merged commit b7c4e3c into nipreps:master Jan 19, 2023
@mgxd mgxd deleted the enh/runwise-reference-image branch January 19, 2023 18:39
@mgxd mgxd added this to the 23.0.0 milestone Jan 20, 2023
@mgxd mgxd mentioned this pull request Jan 20, 2023
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.

Change in reference frame for motion correction in single echo and multi echo data
2 participants