Creation basis set of MEGA

Hello,
I am trying to simulate a basis set with the ‘sim_megapress.m’ in FID-A. The output .RAW file without 0ppm reference was read with makebasis.in. However, when I run makebasis to create LCModel’s basis, the peaks are shifted in the ppm axis. Please let me know what you think.

sim_megapress.m with modification
%metabolite="GABA";
out=sim_megapress(n,sw,Bfield,linewidth,sys,taus,refoc1Flip,refoc2Flip,editFlip)
RF=io_writelcmraw(out,[metab '.RAW'],metab);

makebasis.in
...
 $nmall
 hzpppm=127.73
 deltat=.0005
 nunfil=1024
 filbas='mega-press.basis'
 filps='mega-press.ps'
 autosc=.false.
 autoph=.false.
 $end

 $nmeach
 filraw='mega-press/GABA.RAW'
 metabo='GABA'
 degzer=0.
 degppm=0.
 conc=1.
 ppmapp=2.4, 2.0
 ppmpk=0.
 $end
...

Hi Jason,

I don’t know if your problem has been solved? I haven’t had success using makebasis.in, but I’ve been able to successfully generate a .basis for LCModel using Osprey functions. Here’s my experience. I hope it can help you.
https://forum.mrshub.org/t/title-issues-with-converting-raw-basis-sets-to-basis-file-using-lcmodels-makebasis-function/1471/6?u=yushan
If you encounter any problems during this process, feel free to discuss them with me.

Best,
Yushan

Hi @Jason, and thanks @Yushan for reviving this thread!

Your makebasis.in as it’s written is telling makebasis to expect a reference peak (ppmpk) at 0.0 ppm, which is typical for DSS in phantom studies but meaningless if you didn’t simulate that peak… ppmapp is then telling makebasis to search for that peak (which doesn’t exist in your simulated data) around 2.0-2.4 ppm on the unreferenced frequency scale (the one you would see if you just preview the raw data in LCMgui… so the value is typically tuned manually to help with the starting estimate if necessary). Unless I’m missing something, I don’t think this configuration is at all meaningful in this scenario.

I suggest you try disabling referencing altogether, with these settings for each of the metabolite components:

 degzer=0.
 degppm=0.
 conc=1.
 noshif=.true.
 ppmapp=0.2, -.2

The key here is noshif=.true., which suppresses referencing altogether. Quoting the LCModel manual (section 8.6):

This can be useful with simulated basis spectra that are already referenced. You still have to
input sensible values for PPMAPP, although they will not be used.

Hope this helps!