Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FIX: Use seconds as time units when converting PARRECHeader to Nifti1Header#931

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
effigies merged 2 commits intonipy:maint/3.1.xfromeffigies:fix/parrec2nii_t_units
Jul 13, 2020

Conversation

@effigies
Copy link
Member

parrec2nii produces NIfTI files with TRs in seconds but records the units as msec

#692 proposed retaining the PAR/REC msec units by removing a division by1000.. This PR instead proposes keeping things in seconds.

cc@Roosted7@epongpipat

Replaces#692.

@effigies
Copy link
MemberAuthor

Would be glad if anybody wants to weigh in on which of these two approaches is best. I think this one will specifically fix conversions and not break anybody's workflows that have been depending onPARRECImage providing TRs in seconds. I can see an argument for keeping things close to the image, but I think standardizing on seconds makes more sense.

@codecov
Copy link

codecovbot commentedJul 6, 2020
edited
Loading

Codecov Report

Merging#931 intomaint/3.1.x willdecrease coverage by0.08%.
The diff coverage is100.00%.

Impacted file tree graph

@@               Coverage Diff               @@##           maint/3.1.x     #931      +/-   ##===============================================- Coverage        91.86%   91.77%   -0.09%===============================================  Files               97       97                Lines            12360    12360                Branches          2177     2177              ===============================================- Hits             11354    11344      -10- Misses             675      681       +6- Partials           331      335       +4
Impacted FilesCoverage Δ
nibabel/parrec.py92.50% <100.00%> (ø)
nibabel/environment.py75.00% <0.00%> (-20.00%)⬇️
nibabel/casting.py85.28% <0.00%> (-0.87%)⬇️
nibabel/dft.py80.36% <0.00%> (-0.62%)⬇️
nibabel/nifti1.py92.12% <0.00%> (-0.31%)⬇️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update97a0467...7759954. Read thecomment docs.

@effigies
Copy link
MemberAuthor

Anybody care to have a look? If not I'll exercise supreme maintainer powers and hit merge tomorrow.

@Roosted7@epongpipat I would appreciate your opinions on this one.

@matthew-brett
Copy link
Member

Hmm - it's a tough call, I agree. In general, we try to report the file from nibabel as a native reader would have reported it, but here I guess we allowed ourselves to make the file appear more NIfTI-like. This fix seems better for back-compatibility, but you could also make an argument for converting to seconds only when converting the image to NIfTI format (so, not in_calc_zooms, but inas_analyze...). But - I do agree that we shouldn't make odd milliseconds NIfTI images, they would be very confusing.

@effigies
Copy link
MemberAuthor

How about going with this for a bug fix, and we can move PARRECImage to report msec TR in a feature release?

Maybe it would be worth revisiting#567. I ran into some conceptual problems trying to think through the API there.

@matthew-brett
Copy link
Member

matthew-brett commentedJul 13, 2020 via email

Sounds reasonable ...

@effigieseffigies merged commit6f5f766 intonipy:maint/3.1.xJul 13, 2020
@effigieseffigies deleted the fix/parrec2nii_t_units branchJuly 13, 2020 15:16
@effigieseffigies added this to the3.2.0 milestoneAug 16, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

3.2.0

Development

Successfully merging this pull request may close these issues.

2 participants

@effigies@matthew-brett

[8]ページ先頭

©2009-2025 Movatter.jp