-
Notifications
You must be signed in to change notification settings - Fork 124
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
Resample to n_vols for sampling_rate == 'TR' #713
Conversation
We already have a test which catches the situation in which round does not return the expected index length. I'm going to implement the special case scenario instead. |
Failing test introduced in #365. |
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 don't think this is currently testing the edge case you brought up? Or can you comment on the lines that do?
Otherwise looks good.
Co-authored-by: Chris Markiewicz <[email protected]>
@effigies yep, still need to add a test. turned out to be a bit cumbersome but it seemed like adding |
@effigies I added a test that sort of gets at it by setting a scan_length that is off by .1 (simulating the rounding error you sometimes see IRL). It's not the most robust test since it's not being read directly from the dataset. I think to do that however, we'd need to a new dataset with a TR below 1 and with some real images to read |
This seems to be working for me. Care to review @tyarkoni ? |
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.
LGTM!
WIP Fix to #712
n_vols
inRunInfo
(might be a good idea anyways)n_vols
to compute the number of resample volumes inresample
ifsampling_rate
==TR
TR
value one level up (instead of computing true sampling_rate atCollection
level).