Page 1 of 1

Give a field array to garlic

Posted: Sat Sep 30, 2017 8:14 am
by pegli
Hello,
currently I'm trying to get into Easyspin for doing simulations with garlic. In the documentation I found only information how to provide (for a field swept spectrum) either center frequency + sweep with + npoints or lowest freq + highest freq + npoints. That's not what I want to give to the simulation. Is it possible to provide an array of field values which is then used to simulate the spectrum? My problem is, that I don't want to use equispaced field values.

Thank's a lot for any informations!

Yours,

Peter

Re: Give a field array to garlic

Posted: Sat Sep 30, 2017 2:11 pm
by Stefan Stoll
Simulate the spectrum with sufficient resolution and use 1D interpolation to obtain it over the field values you are interested in.

Code: Select all

myB = .. % insert your non-uniform field vector here (in mT)
Exp.Range = [min(myB) max(myB)];
[B,spc] = garlic(...);
myspc = interp1(B,spc,myB);