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

Update fmri_data.m to avoid rezip #61

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update fmri_data.m to avoid rezip #61

wants to merge 2 commits into from

Conversation

jcf2
Copy link

@jcf2 jcf2 commented Sep 19, 2024

Rezip to get back to .gz can be avoided in fmri_data if have original .gz (which we always should).

Fixes #60

Rezip to get back to .gz can be avoided because we will have original .gz.
Update fmri_data.m to avoid rezip
Copy link
Contributor

@Michael-Sun Michael-Sun left a comment

Choose a reason for hiding this comment

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

system call to gunzip (unsafe) replaced with native matlab gzip() which is safe and non-destructive.

@jcf2
Copy link
Author

jcf2 commented Sep 30, 2024

To clarify, note that the use of native MATLAB 'gunzip' predates this change (was probably introduced ~5 years ago?). The issue (#60) fixed here is basically that when that switch was made, the "cleanup" should have changed but didn't. System 'gunzip' by default deletes the original .nii.gz, so the "cleanup" step up until now has included recreating the .nii.gz to counter that... when using MATLAB 'gunzip', however, the original .nii.gz is guaranteed to remain, so the only cleanup really needed is to remove the unpacked .nii file(s).

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.

Rezipping in fmri_data may be unnecessary
2 participants