CIC-methods / FID-A

Toolbox for simulation and processing of in-vivo magnetic resonance spectroscopy (MRS) data
BSD 3-Clause "New" or "Revised" License
80 stars 72 forks source link

Reference` to non-existent field `'gamma' #105

Closed shaokunzhao closed 1 year ago

shaokunzhao commented 1 year ago

Hello, I'm having trouble generating the basis set for the PR-STEAM sequence when running the "run_simExampleBasisSet.m" program. Can you please help me troubleshoot this error? Thank you.

Referenceto non-existent field'gamma'.

Error in op_complexConj (line 30) ppm = -f/(in.Bo*in.gamma);

Error in io_writelcmraw (line 40) data_struct=op_complexConj(data_struct);

Error in sim_lcmrawbasis (line 112) RF=io_writelcmraw(out,[metab '.RAW'],metab);

Error in run_simExampleBasisSet (line 65) [RF,H2O]=sim_lcmrawbasis(np,sw,Bo,lb,'H2O',te1,te2,ref,'y',seq);

basab-gupta commented 1 year ago

Hi @shaokunzhao,

I am having the same issue when I run run_simExampleBasisSet.m. I tried looking into the documentation, but can't seem to figure out what gamma is. I was wondering if you were able to find a solution to this issue?

basab-gupta commented 1 year ago

Okay, so upon going through the other run scripts in the repo, I realized that gamma is most probably the gyromagentic ratio.

@jamienear I think the issue is that the struct passed to the function in op_complexConj.m does not have any fields for the nucleus type and the gamma so it throws an error.

jamienear commented 1 year ago

So sorry for the long delay in responding. I think this issues should be fixed now, thanks to a recent pull request from Peter Truong. Please let me know if the issue persists.