Script for mT to g-factor Conversion

General forum for EasySpin: questions, how to's, etc.
Post Reply
Dmytro Kravchuk
Newbie
Posts: 1
Joined: Tue Mar 21, 2023 9:33 pm

Script for mT to g-factor Conversion

Post by Dmytro Kravchuk »

Hello everyone!

I am new to both MatLab and EasySpin. I know that the g-factor for a singular point (mT) can be easily calculated via “eprconvert” if the frequency is known. But I was wondering if there is a script to convert the entire B into g-factor to be used on the x-axis?

I have been working on Magnettech (.XML) and old Bruker instruments (.SPC/.PAR) running variable temp studies. My only option to compare the spectra from each instrument is plotting the data as g-factors in bulk. Any way EasySpin can read parameters, find the experimental frequency, and use it to convert mT to g-factors for the entire dataset?

Thank you!

thanasis
Local Expert
Posts: 242
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Re: Script for mT to g-factor Conversion

Post by thanasis »

Something like:

Code: Select all

g = 714.477*Exp.mwFreq./B

might do the trick, where B is the magnetic field vector.

Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Script for mT to g-factor Conversion

Post by Stefan Stoll »

Here is a complete example:

Code: Select all

clear, clc

mwFreq = 9.5245;  % GHz
B = linspace(300,400,51);  % mT
g = planck*mwFreq*1e9/bmagn./(B*1e-3);
plot(B,g,'o-')
xlabel('magnetic field (mT)')
ylabel('g value')
title(sprintf('%g GHz',mwFreq));
grid on
Post Reply