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

GE Direct field mapping (TE1/TE2) (#617) #619

Merged
merged 2 commits into from
Jul 20, 2022
Merged

GE Direct field mapping (TE1/TE2) (#617) #619

merged 2 commits into from
Jul 20, 2022

Conversation

mr-jaemin
Copy link
Collaborator

Please review the changes, especially for the "only set for GE fieldmaphz", please let me know if you have any suggestions.

if ((d.TE > 0.0) && (!d.isXRay)) {
if ((d.manufacturer == kMANUFACTURER_GE) && (d.isRealIsPhaseMapHz) && (d.velocityEncodeScaleGE < 0)) { //issue617, only set for GE fieldmaphz
json_Float(fp, "\t\"EchoTime1\": %g,\n", d.TE / 1000.0 );
json_Float(fp, "\t\"EchoTime2\": %g,\n", d.TE / 1000.0 - 1/(2 * M_PI * d.velocityEncodeScaleGE));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can I suggest you change

json_Float(fp, "\t\"EchoTime2\": %g,\n", d.TE / 1000.0 - 1/(2 * M_PI * d.velocityEncodeScaleGE));

to read

json_Float(fp, "\t\"EchoTime2\": %g,\n", d.TE / 1000.0 - 1.0/(2.0 * M_PI * d.velocityEncodeScaleGE));

I think for C the constant 1 is an integer and the constant 1.0 is a float. I think it gets promoted by the computation, but it keeps your code more consistent with my style.

@mr-jaemin
Copy link
Collaborator Author

Here are the updates. Please let me know if you have any comments. Thanks!

@neurolabusc neurolabusc merged commit f2ceab6 into rordenlab:development Jul 20, 2022
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