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
Switch to using mean magnitude for output moco_params.tsv
file used for QC
#4396
Conversation
The purpose of this QC file is to identify the amount of motion in each volume (that is, at each time point), so that motion-related fluctuation in the signal can be corrected for. Having the average of the signed X and Y values is not useful for this, because a lot of left-right motion (or front-back motion) could mostly cancel out, and look the same as not having much motion at all. This is potentially confusing, and prone to misuse. In contrast, the mean magnitude is only small when there is not much total motion, and it is scale-invariant with the number of Z slices.
I fixed the description of the output files in the help message for |
Ah, I forgot to update the tests. Sorry! |
I just used the current outputs, since we don't really have any principled values to compare with.
Bug fixed, tests updated, ready for review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have two miniscule suggestions -- the bulk of my comments are just double-checking my own understanding. But, this mostly LGTM!
moco_params.tsv
file used for QC
((Updated the PR title, just because there also exists a "QC Report" for motion correction, and I was a little confused at first, hehe.)) |
Co-authored-by: Joshua Newton <joshuacwnewton@gmail.com>
The columns were changed in #4396, but the tutorial changes should only be merged when SCT v6.3 gets released, since the website updates immediately.
The purpose of this QC file is to identify the amount of motion in each volume (that is, at each time point), so that motion-related fluctuation in the signal can be corrected for.
Having the average of the signed X and Y values is not useful for this, because a lot of left-right motion (or front-back motion) could mostly cancel out, and look the same as not having much motion at all. This is potentially confusing, and prone to misuse.
In contrast, the mean magnitude is only small when there is not much total motion, and it is scale-invariant with the number of Z slices.
Note: the formula for magnitude,$\sqrt{X^2+Y^2}$ , only makes sense when $X$ and $Y$ have the same units (that is, millimeters, not voxels). So, I considered whether we should also use the voxel dimensions in the calculation, and concluded that we shouldn't:
sct_fmri_moco
command from our tutorial to get a baseline filemoco_params.tsv
.moco_params.tsv
approximately doubled. Which means that the coordinates are in physical units, not integer array coordinates.moco_params.tsv
were very different, basically unrelated. Which further confirms that ANTS registration takes into account physical units, I guess.Fixes #4344.