Plotting cw spectra with a g-value x-axis

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

What distinguishes you from other developers?

I've built data pipelines across 3 continents at petabyte scales, for over 15 years. But the data doesn't matter if we don't solve the human problems first - an AI solution that nobody uses is worthless.

Are the robots going to kill us all?

Not any time soon. At least not in the way that you've got imagined thanks to the Terminator movies. Sure somebody with a DARPA grant is always going to strap a knife/gun/flamethrower on the side of a robot - but just like in Dr.Who - right now, that robot will struggle to even get out of the room, let alone up some stairs.

But AI is going to steal my job, right?

A year ago, the whole world was convinced that AI was going to steal their job. Now, the reality is that most people are thinking 'I wish this POC at work would go a bit faster to scan these PDFs'.

When am I going to get my self-driving car?

Humans are complicated. If we invented driving today - there's NO WAY IN HELL we'd let humans do it. They get distracted. They text their friends. They drink. They make mistakes. But the reality is, all of our streets, cities (and even legal systems) have been built around these limitations. It would be surprisingly easy to build self-driving cars if there were no humans on the road. But today no one wants to take liability. If a self-driving company kills someone, who's responsible? The manufacturer? The insurance company? The software developer?