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

FIX: Treat missing field maps as empty list instead of None #1820

Merged
merged 3 commits into from Nov 22, 2019

Conversation

tsalo
Copy link
Collaborator

@tsalo tsalo commented Oct 12, 2019

Changes proposed in this pull request

When field maps are ignored or unavailable, the associated variable is an empty list, but most bools associated with the field maps (i.e., use_fieldwarp) assume that they're None.

Documentation that should be reviewed

The generated boilerplate should now have "the transforms to correct for head-motion" instead of "a single, composite transform to correct for head-motion and susceptibility distortions" when field maps are ignored or not present in the dataset.

@auto-comment
Copy link

auto-comment bot commented Oct 12, 2019

Thank your for raising your pull request.

Some of the fMRIPRep maintainers will review your changes as soon as time permits.
I'm attaching below a Review Checklist for the reviewers, to copy and paste
it in their review comment.

## PR Review

*Please check off boxes as applicable, and elaborate in comments below.  Your review is not limited to these topics, as described in the reviewer guide*

- [ ] As the reviewer I confirm that there are no conflicts of interest for me to review this work.

Please check what applies in the following aspects of the PR:

#### Code documentation

- [ ] New functions and modules are documented following the guidelines.
- [ ] Existing code required amendments in documentation and has been updated.
- [ ] Sufficient inline comments ensure readability by other contributors in the long term.

#### Documentation site

- [ ] The modifications to *fMRIPrep* in this PR **do not require extra documentation**. This is a common situation when a bug fix that does not change the code base substantially is submitted.
- [ ] This PR requires documentation. The corresponding documentation will be submitted as an additional PR in the future.
- [ ] This PR requires extra documentation, and will be included within this PR. Please check the boxes that apply best:
  - [ ] An existing feature is substantially modified, changing the interface and/or logic of a module.
  - [ ] A new feature is being added, therefore full documentation of it will be included
  - [ ] This PR addresses an error in existing documentation.
- [ ] Yes, all expected sections of documentation were generated by the CI build, and look as expected

#### Tests

- [ ] The new functionalities in this PR are covered by the existing tests
- [ ] New test batteries have been included with this PR

#### Data

- [ ] This PR does not require any additional data to be uploaded to OSF.
- [ ] This PR requires additional data for tests.

#### Dependencies: smriprep

- [ ] This PR does not require any update on `smriprep`; or
- [ ] `smriprep` has correctly been pinned.

#### Dependencies: niworkflows

- [ ] This PR does not require any update on `niworkflows`; or
- [ ] `niworkflows` has correctly been pinned.

#### Dependencies: sdcflows

- [ ] This PR does not require any update on `sdcflows`; or
- [ ] `sdcflows` has correctly been pinned.

#### Dependencies: Nipype

- [ ] This PR does not require any update on `nipype`; or
- [ ] `nipype` has correctly been pinned.

#### Dependencies: other

- [ ] This PR does not require any update on other dependencies; or
- [ ] other dependencies have correctly been pinned.

#### Reports generated within CI tests

- [ ] Yes, I have checked the reports of ds005 and they are not modified or the changes are as expected
- [ ] Yes, I have checked the reports of ds054 and they are not modified or the changes are as expected
- [ ] Yes, I have checked the reports of ds010 and they are not modified or the changes are as expected

### Review Comments (other than those left inline with the code)

@tsalo tsalo changed the title [FIX] Treat missing field maps as empty list instead of None FIX: Treat missing field maps as empty list instead of None Oct 12, 2019
@tsalo
Copy link
Collaborator Author

tsalo commented Oct 12, 2019

Tests appear to be failing because of the bump of sdcflows to 0.1.2, where init_sdc_wf dropped the bold_meta argument.

EDIT: It looks like that's already being dealt with elsewhere.

Copy link
Member

@oesteban oesteban left a comment

Choose a reason for hiding this comment

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

Hi @tsalo this looks good overall. Could you confirm on your end that the boilerplate is correct when no fieldmaps are present (or ignored)?

Our tests on circle have all susceptibility correction (probably that's one reason we didn't address this earlier).

Thanks a lot!

@tsalo
Copy link
Collaborator Author

tsalo commented Oct 19, 2019

Yes, when field maps are ignored the generated boilerplate now has

The BOLD time-series (including slice-timing correction when applied)
were resampled onto their original, native space by applying
the transforms to correct for head-motion.

instead of

The BOLD time-series (including slice-timing correction when applied)
were resampled onto their original, native space by applying
a single, composite transform to correct for head-motion and
susceptibility distortions
.

I don't know the downstream effects in init_bold_std_trans_wf, init_ica_aroma_wf, init_bold_t1_trans_wf, but they can only fix possible bugs, right?

@oesteban oesteban merged commit 543827b into nipreps:master Nov 22, 2019
@tsalo tsalo deleted the fmap-boilerplate branch November 23, 2019 14:19
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.

Boilerplate says it used SDC transforms even with --ignore fieldmaps
2 participants