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

Add voxel-wise option to Brain_Data.scale #285

Open
ejolly opened this issue May 30, 2019 · 0 comments
Open

Add voxel-wise option to Brain_Data.scale #285

ejolly opened this issue May 30, 2019 · 0 comments

Comments

@ejolly
Copy link
Collaborator

ejolly commented May 30, 2019

Looking back at how the "big 3" do scaling, it looks like both FSL and SPM do what we do, scaling the full time-series by a single value: the grand-mean across the acquisition. AFNI, on the other hand, has some compelling reasons to instead, normalize each voxel separately by its own acquisition mean. In practice, the difference is likely not that huge but could be easily added with an optional axis flag. If we do add this, we need to account for voxels who's mean maybe 0 (e.g. out of brain voxels) as scaling will produce NaNs

b = Brain_Data('some_file.nii.gz')
b.scale() # default axis=None, scale each voxel's time-series by the grand-mean
b.scale(axis=0) # AFNI style, scale each voxel by it's own mean
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

No branches or pull requests

1 participant