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] Propagate TR to ref_image header #207

Merged
merged 2 commits into from
Jan 31, 2019
Merged

Conversation

dowdlelt
Copy link
Collaborator

Closes #206 .

Changes proposed in this pull request:

  • in load_data, the ref image now has a 4th dimension, TR in output is now correct

@dowdlelt dowdlelt changed the title Keep TR in ref image header Propagate TR to ref_image header Jan 30, 2019
@dowdlelt
Copy link
Collaborator Author

Travis is unhappy with that extra '1', unsurprisingly. Though I will admit this is the first time I have ever encountered continuous integration.

 assert ref.shape == (39, 50, 11)
E       assert (39, 50, 11, 1) == (39, 50, 11)
E         Left contains more items, first extra item: 1
E         Use -v to get the full diff

@tsalo
Copy link
Member

tsalo commented Jan 30, 2019

This looks good. Thank you!

It looks like you'll just need to update the test. You just need to change assert ref.shape == (39, 50, 11) to assert ref.shape == (39, 50, 11, 1) in the test function.

Could you also check to see if the 3D images being written out are still 3D? I just want to make sure that they aren't written out with a singleton fourth dimension.

Lastly, could you add the [FIX] prefix to this PR title and remove the [bug] one from the corresponding issue?

@dowdlelt dowdlelt changed the title Propagate TR to ref_image header [Fix] Propagate TR to ref_image header Jan 30, 2019
@dowdlelt dowdlelt changed the title [Fix] Propagate TR to ref_image header [FIX] Propagate TR to ref_image header Jan 30, 2019
@dowdlelt
Copy link
Collaborator Author

3dinfo reports that dn_ts_OC.nii has a time dimension, with the correct tr, whereas s0v.nii has no time dimension. Opens fine in AFNI as well. Let me know if you want another check of that.

@tsalo
Copy link
Member

tsalo commented Jan 30, 2019

If it has no time dimension then I think that should be fine. Thank you for checking!

@codecov
Copy link

codecov bot commented Jan 30, 2019

Codecov Report

Merging #207 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #207   +/-   ##
=======================================
  Coverage   51.42%   51.42%           
=======================================
  Files          32       32           
  Lines        1964     1964           
=======================================
  Hits         1010     1010           
  Misses        954      954
Impacted Files Coverage Δ
tedana/io.py 35.55% <100%> (ø) ⬆️
tedana/tests/test_io.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ebd3a93...93914f5. Read the comment docs.

Copy link
Member

@rmarkello rmarkello left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for catching this, @dowdlelt.

@emdupre
Copy link
Member

emdupre commented Jan 31, 2019

I'll go ahead and merge, then ! Thanks @dowdlelt

@emdupre emdupre merged commit 101ad21 into ME-ICA:master Jan 31, 2019
@dowdlelt dowdlelt deleted the patch-1 branch January 31, 2019 20:05
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.

TR isn't set correctly in output
4 participants