cw-EPR spectra are common place in the lab, but often we report them simple as intensity against magnetic field in Gauss (G) or milli-Tesla (mT). However, in reality what we are actually interested is the frequency independent g-value.
The problem is that the g-factor by definition is a reciprocal scale (ie non linear, non logarithmic, and reverse scale), which causes a nightmare when trying to plot in MATLAB.
For this reason I have created two similar scripts. The first plotgx creates a new figure (such as that shown above)
plotgx(magnetic_field , intensity, microwave_frequency)
Arrays are used for magnetic field and intensity, and a number for the frequency in GHz, for example:
plotgx( x, y , 9.771)
If no microwave frequency is stated then the program assumes an X-band experiment at 9.75 GHz.
The second script, add_gx, adds a second g-value x-axis to the current figure (or the most recent figure returned by the gca command) and can be called with or without the microwave frequency.
add_gx( 83.2)
This page previously appeared on morganbye.net[^1][^2][^3]
[^1:] http://morganbye.net/plotting-cw-spectra-with-a-g-value-x-axis [^2:] http://morganbye.net/eprtoolbox/plotting-cw-spectra-with-a-g-value-x-axis) [^3:] http://morganbye.net/uncategorized/2011/09/plotting-cw-spectra-with-a-g-value-x-axis