Skip to content

[RTM] RF: Assume phase-encoding direction is A-P unless specified L-R #740

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

Merged
merged 12 commits into from
Oct 7, 2017

Conversation

effigies
Copy link
Member

@effigies effigies commented Oct 6, 2017

As discussed in #714, the simplest way to build in a prior of A-P phase-encoding is to always use A-P unless otherwise specified. When this produces a discernible error, the correct response would be to update the dataset metadata.

With this change, we can eliminate the cost function machinery from the BBR workflows, which should simplify #694, if this goes in first.

Closes #714.

@effigies effigies force-pushed the original_syn branch 2 times, most recently from 3ff6c3a to ad2ec5d Compare October 6, 2017 14:24
@effigies
Copy link
Member Author

effigies commented Oct 6, 2017

To review this PR, separately review #741, and then look at effigies/fmriprep@fsfix_common...original_syn.

@effigies effigies force-pushed the original_syn branch 4 times, most recently from 7c29adf to 465f751 Compare October 6, 2017 18:48
@effigies effigies changed the title [WIP] RF: Assume phase-encoding direction is A-P unless specified L-R [RTM] RF: Assume phase-encoding direction is A-P unless specified L-R Oct 6, 2017
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.

This simplifies a lot these workflows, great job. Left some stylistic comments.

@@ -33,6 +33,7 @@

FUNCTIONAL_TEMPLATE = """\t\t<h3 class="elem-title">Summary</h3>
\t\t<ul class="elem-desc">
\t\t\t<li>Detected phase-encoding (PE) direction: {pedir}</li>
Copy link
Member

Choose a reason for hiding this comment

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

Remove "Detected"? since now it is the default AP or manually set

bold_pe = None
else:
bold_pe = layout.get_metadata(bold_file).get("PhaseEncodingDirection")

restrict_i = [[1, 0, 0], [1, 0, 0]]
Copy link
Member

Choose a reason for hiding this comment

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

restrict = [[int(bold_pe[0] == 'i'), int(bold_pe[0] == 'j'), 0]] * 2

And then use restrict_deformation=restrict down in L1371

@oesteban
Copy link
Member

oesteban commented Oct 7, 2017

One more thing: the sdc-syn method is one method to estimate the fieldmap. Could we move the code to its proper module under the fieldmap/ folder?

@effigies
Copy link
Member Author

effigies commented Oct 7, 2017

Yeah, I can do that. Can do that here or in a separate PR. Up to you.

@effigies
Copy link
Member Author

effigies commented Oct 7, 2017

Actually I'll go ahead an say: Let's do that in a separate PR. We can move a lot of logic that's currently in bold.py into a fieldmap/, which could take a little work and we want to get this in ASAP, unless I'm mistaken.

Will merge on tests passing.

@effigies effigies merged commit bf906d7 into nipreps:master Oct 7, 2017
@effigies effigies deleted the original_syn branch October 7, 2017 13:41
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.

2 participants