Shortening the number of averages in FID-A or LCModel

Hi!
We’re currently trying to compare the SNR of 96 vs. 150 averages.
For that we have acquired data with 150 averages and are now trying to shorten the data to only use the first 96, to compare that directly to the file with 150.

For the preprocessing we are using FID-A and tried shortening the number of averages there, before the data gets preprocessed, so that it stays comparable.
We tried to change the line 165 Naverages=twix_oj.hdr.Meas.Averages;
to: Naverages=96;

FIDA-originalNaverages.pdf (24.6 KB)

The FID-A does not crash using this, but the preprocessed data we get afterwards still has 150 averages and is not shortened.

We also tried to insert a new block of code to shorten the averages right in the beginning of the script:

FID-A_extra_block_for_averages.pdf (46.3 KB)

but then the FID-A crashes and gives error messages, signaling problems with the op_alignAverages command.

Does anyone have experience with the shortening of averages? Would it also maybe be possible to preprocess the 150 averages in FID-A as usual but then only use the first 96 using LCModel as a way to shorten and re-preprocess it? So the shortening would not be happening in the FID-A but in LCModel afterwards?
Thank you in advance!

The function op_takeaverages is your friend! You can replace the entire extra block with that function (out=op_takeaverages(in,1:96)).

However, you must perform coil combination first.

You can take some inspiration from the example processing scripts

% %read in both datasets:
[raw,raww]=io_loadspec_twix([filestring '/' filename]);
if water && isempty(fields(raww))
    raww=io_loadspec_twix([filestring '_w/' filenamew]);
elseif ~water && ~isempty(raww)
    water=true;
end

%first step should be to combine coil channels.  To do this find the coil
%phases from the water unsuppressed data.
if water
    coilcombos=op_getcoilcombos(raww,1);
    [outw_cc,fidw_pre,specw_pre]=op_addrcvrs(raww,1,'w',coilcombos);
else
    coilcombos=op_getcoilcombos(op_averaging(raw),1);  
end
[out_cc,fid_pre,spec_pre]=op_addrcvrs(raw,1,'w',coilcombos);
[out_av_cc,fid_av_pre,spec_av_pre]=op_addrcvrs(op_averaging(raw),1,'w',coilcombos);

Afterwards, you can select your subset of transients with op_takeaverages as described above, then use op_alignAverages to align them, and then use op_averaging to combine them.

I will try that, thank you so much!

It worked! Thank you for your fast reply and the easy solution!

1 Like