ECC and freq/phase correction

Hello experts

I am writing a matlab code to do MRS analysis using FID-A functions.
I was wondering if the order of eddy corrent correction and average realignment is important.!!

Which one should I do first? I saw in some papers that they do ECC first and then average alignment. This is also the order that chatGPT told me. :slight_smile:

But for doing ecc in FID-A you have to use the averaged data. This means you need to align averages and do averging first and then do eddy current correction.

I would appreciate if you could let me know what the standard procedure is. And if the order of doing them actually matters.

Thanks
Shah

Hi Shah,

I don’t think there is a standard procedure (after all, there is still no such thing in contemporary MRS world), but I don’t think that the order matters too much and it’s especially fine to align first, then average, then ECC. Feel free to take some inspiration from our OspreyProcess module, which heavily leans on modified FID-A functions and also does the alignment first and the ECC afterwards.

Good luck!
Georg

1 Like

Thank you so much Georg.
Good that I have confirmation from an expert before setting up the pipeline.

Best
Shah

1 Like

Just a follow up on this question about freq/phase correction using Osprey.

There are three options in Osprey for doing this: “ProbSpecReg”, “RobSpecReg”, and “RestrSpecReg”.
I was wondering if all of them are developed based on editted sequences and would they fail on non-editted ones like sLASER?

I have 128 averages (transients) of semiLASER SVS acquisition.

When I use Sperctral registration in time domain (using “op_alignAverages” function of FID-A), I can see a reasonable freq estimation as seen here and the results of alignment is visually good:

But these are the results from Osprey methods. Their Freq estimation trend are the same but different from that of the FID-A method’s, and the result of realignmnet is not good visually.

Am I right in understanding that I should always stick to spectral registration in time domain for sLASER?

Hi Shah,

Looking at the frequency traces in the top right plot all three options perform equally well (the dark circles are less variable then the open circles which means the frequency correction worked as intended).

The SNR for the RestrSpecReg seems to be a bit higher, so maybe this is the best option for your data.

For some inexplicable reason, the pre- and post-alignment plots look identical, which makes it look like the correction is not doing anynthing. I will take a look at the code and keep you posted about a fix.

Best,
Helge

1 Like

Hi @Shah,

I have just pushed a fix for the incorrect plotting behavior to the develop branch.

Best,
Helge

1 Like

Hi Helge

I see. so the post-alignment plots had a problem. Thank you so much for the fix.

One thing that still remains is the difference between Osprey and FID-A.
I Was wonering if you have any comment why the Freq estimation from FID-A is different from that of Osprey methods.
If you look at the FID-A estimation (first figure) it starts from 12 Hz and goes down almost linearly to -5 Hz, which is in agreement with the trend of motion that I have estimated using SPM. See below:

image

(I have used concurrent SVS-3DEPI sequnce, that is why I have a 3D EPI image per repetition with which I have estimated the motion.)

Maybe I need to calculate the SNR(Cr) for the FID-A output as well so to be able to quantitatively say which one is better.

Thanks
Shah

Hi @Shah,

I haven’t used FID-A for a while now, but when I looked through the processing examples on difference is what FID-A and Osprey are plotting in the drift plot. FID-A plots the frequency shift estimates from the spectral registration optimization (so what is actually applied to the data during correction).

Osprey uses the measure_Drift function to run a creatine/choline fit to estimate the creatine peak position at 3 ppm once before correction and once after correction. This is what the plot shows.

You could compare the frequency and phase shifts from both FID-A and Osprey directly if you look at the output from both registration algorithms. These should be fsCum and phsCum in FID-A and can be found in the processed data struct under specReg.fs/phs in Osprey.

I agree that comparing the SNR using the same function would be helpful. Without ground truth values for frequency or phase, I would look at the SNR and linewidth to determine which one works better.

Best,
Helge

1 Like

I see.
Thank you so much for pointing out the functions.

Best,
Shah