spinal-cord-7t / coil-qc-code

7T Spinal Cord Coil QC Analysis Code
0 stars 0 forks source link

Should normalization of SNR be done based on the average B1+ map or voxelwise #100

Open jcohenadad opened 2 weeks ago

jcohenadad commented 2 weeks ago

in ef5e3f99e037e2edef0a3ed0efd722a3818445c9, normalization is based on the mean B1+ map. But two very different B1+ map could yield the same mean, and what we are interested in is how SNR is affected by B1+ along the S-I axis (ie: not as a scaling factor for the whole SNR map, but rather seeing a correction factor applied for each voxel).

I suggest we instead estimate B1+ slicewise, and then apply the correction factor to the SNR.

evaalonsoortiz commented 2 weeks ago

This is now done with https://github.com/spinal-cord-7t/coil-qc-code/commit/4d236951412afab91329ddfd1a7c7c31fd8b2714

Below are the newly output SNR along the cord figures:

Screenshot 2024-10-07 at 7 08 35 PM

The order of magnitude seems to agree with what was published here for the same coil (although our numbers are a bit higher).

jcohenadad commented 2 weeks ago

Great! But I think this created another issue related to unreliable B1+ values. For example, subject 2 on the MGH curve shows an SNR of >1100 around the T2 region, which is quite unlikely given that this region is covered by ~3 coils, vs. ~10 coils around C3-C4 where SNR is at 800. We might need to do some digging there...

jcohenadad commented 2 weeks ago

Also, Seeing e.g. an SNR that is almost doubled sub 2 vs sub 3 (esp. for CRMBM) is suspicious. This also warrants further digging and discussion in the paper.

jcohenadad commented 2 weeks ago

although our numbers are a bit higher

SNR is scaled by voxel size, bandwidth, phantom water content, relaxation parameters, etc. so it's difficult to make a one-to-one comparison with literature

evaalonsoortiz commented 2 weeks ago

I'm trying to debug ...

Can you confirm that the slice-wise division of SNR by TFL B1+ values (https://github.com/spinal-cord-7t/coil-qc-code/blob/453b88897fa66d5c8e902fbe24ab20026aed7b4a/data_processing-human.ipynb#L717) is indeed taking values that correspond to the same cervical levels?

The interpolation to PAM50 cervical levels is done in the cell above and was implemented by someone else (code from the 7T RF shimming project I think, maybe by you or Daniel). I'm not sure I understand how that interpolation is done, given that the images are not in PAM50 space, but in native space.

jcohenadad commented 2 weeks ago

I'm confused by the code. data is declared here but it is made up with empty dictionaries:

https://github.com/spinal-cord-7t/coil-qc-code/blob/453b88897fa66d5c8e902fbe24ab20026aed7b4a/data_processing-human.ipynb#L591-L594

And later in the cell, it is not updated:

https://github.com/spinal-cord-7t/coil-qc-code/blob/453b88897fa66d5c8e902fbe24ab20026aed7b4a/data_processing-human.ipynb#L597-L644

Then in the next cell, its values are used, but it should still be empty:

https://github.com/spinal-cord-7t/coil-qc-code/blob/453b88897fa66d5c8e902fbe24ab20026aed7b4a/data_processing-human.ipynb#L677-L678

I'm happy to work on refactoring the notebook (see notably #104), which will allow for a much easier debugging.

jcohenadad commented 2 weeks ago

~@evaalonsoortiz can you please show the figure you obtained before the B1+ normalization? It will be helpful for the debugging process~

Nevermind, i figured out