-
Notifications
You must be signed in to change notification settings - Fork 297
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
ENH: Add SliceTimingCorrected and StartTime fields to BOLD metadata #2540
Conversation
Hi Chris, I just remember that SPM defines TA as |
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.
Just a reminder of the option we talked about in a meeting some days ago. Once that idea is set back, this LGTM.
{'VolumeTiming': [0.0, 1.0, 2.0, 5.0, 6.0, 7.0], 'SliceTimingCorrected': True, | ||
'AcquisitionDuration': 1.0, 'StartTime': 0.4} |
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.
{'VolumeTiming': [0.0, 1.0, 2.0, 5.0, 6.0, 7.0], 'SliceTimingCorrected': True, | |
'AcquisitionDuration': 1.0, 'StartTime': 0.4} | |
{'VolumeTiming': [0.0, 1.0, 2.0, 5.0, 6.0, 7.0], 'SliceTiming'=[0.4, 0.4, 0.4, 0.4, 0.4], | |
'AcquisitionDuration': 1.0} |
What are your thoughts about making it explicit that the SliceTiming
metadata is a list of uniform values? This would be readily supported by BIDS and leaves no room for confusion - even if you try to run STC over again on these data, the algorithm should notice you are sampling on-grid all the time.
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 opened an issue on BIDS: bids-standard/bids-specification#879
This ports over nipreps/fmriprep#2540, allowing for control of the slice timing reference used during correction. Additionally, add SliceTimingCorrected and StartTime fields to the BOLD metadata
Changes proposed in this pull request
Closes #2539.
Addresses #2477.
Implements provisional bids-standard/bids-specification#836
This does not update the
toffset
field in NIfTI at present.One thing to address: when we're calculating the acquisition time (TA), we use
st[-1] + (st[1] - st[0])
, which treats each slice as having a duration. When we're calculating tzero, we use(st[-1] - st[0]) * frac + st[0]
, which treats each slice as an instantaneous acquisition. So tzero is a half "slice duration" less than half TA (tzero = (t[0] + TA) / 2 - (t[1] - t[0]) / 2
).Our tzero calculation is consistent with AFNI's default, but while we're here, maybe we want to adjust it to be
tzero = (t[0] + TA) / 2
. Or is the calculation of TA incorrect?cc @MartinHebert @theoschaefer @nitschalex @oliver-contier @kellyhennigan