BrkRaw / brkraw

BrkRaw: A comprehensive tool to access raw Bruker Biospin MRI data
https://brkraw.github.io
GNU General Public License v3.0
44 stars 28 forks source link

BIDS - Computation of SliceTiming #124

Open gjpcbecq opened 1 year ago

gjpcbecq commented 1 year ago

Description of be the bug The SliceTiming computation in version 0.3.8 of brkraw seems to give a wrong result.

In /lib/reference.py the formulation is:

         SliceTiming                    = dict(TR           = 'VisuAcqRepetitionTime',
                                               Num_of_Slice = 'VisuCoreFrameCount',
                                               Order        = 'ACQ_obj_order',
                                               Equation     = 'np.linspace(0, TR/1000, Num_of_Slice + 1)[Order]'),

For example, I have a fMRI with 3600 volumes, a TR of 0.5 s, each volume is 64 x 64 x 9, with volume acquisition over the 9 slices.

The bruker parameters are

for visu_pars:

VisuCoreFrameCount            :  32400
VisuAcqRepetitionTime         :  500

for acqp:

NR                            :  3600
ACQ_obj_order                 :  [0, 2, 4, 6, 8, 1, 3, 5, 7]

applying print_bids to the recording gives:

[0.0, 3.08641975308642e-05, 6.17283950617284e-05, 9.25925925925926e-05, 0.0001234567901234568, 1.54320987654321e-05, 4.62962962962963e-05, 7.716049382716049e-05, 0.0001080246913580247]

It seems that you divide the TR by the total number of acquisitions ($32400 = 3600 \times 9$) and not the number of acquisition for one volume.

Do you agree with that or do I am wrong ?

araikes commented 1 year ago

You're correct @gjpcbecq, the slice timing definition should be the timing of a slice acquisition within a TR.

dvm-shlee commented 8 months ago

Thank you for your input, this will be corrected on next update