autodeer.FieldSweep

Module Contents

Classes

FieldSweepAnalysis

Analysis and calculation of FieldSweep Experiment.

SpinSystem

Functions

create_Nmodel(mwFreq)

Create the field sweep model for a Nitroxide spin system.

erot(*args)

Passive rotation matrix.

eyekron(M)

Calculates the Kronecker product of the identity matrix with a matrix M.

kroneye(M)

Computes the Kronecker product of a matrix with the identity matrix of the same size.

ham(SpinSystem[, elspins, nucspins])

ham_ez(SpinSystem[, B, espins])

ham_nz(SpinSystem[, B, nspins])

resfields(system, Orientations, mwFreq[, ...])

build_spectrum(system, mwFreq, Range[, knots, ...])

Build a field sweep spectrum

autodeer.FieldSweep.create_Nmodel(mwFreq)[source]

Create the field sweep model for a Nitroxide spin system.

Parameters:
mwFreqfloat

The microwave frequency in MHz

class autodeer.FieldSweep.FieldSweepAnalysis(dataset)[source]

Analysis and calculation of FieldSweep Experiment.

Parameters:
datasetxarray.Dataarray

_description_

Parameters:

dataset (xarray.DataArray)

data[source]
find_max()[source]

Calculates the maximum field

Returns:
float

Max field

Return type:

float

calc_gyro(LO=None)[source]

Calculates the gyromagnetic ratio for a given frequency

Parameters:
det_frqfloat

The detection frequency for the field sweep.

Returns:
float

The gyromagnetic ratio in G/GHz.

Parameters:

LO (float)

Return type:

float

calc_noise_level(SNR_target=30)[source]
smooth(*args, **kwargs)[source]

Generates a smoothed version of the data using a 1D smoothing spline.

Returns:
np.ndarray

The smoothed data.

fit(spintype='N', **kwargs)[source]
plot(norm=True, axis='field', axs=None, fig=None)[source]

Generate a field sweep plot

Parameters:
normbool, optional

Nomarlisation of the plot to a maximum of 1, by default True

axisstr, optional

plot field sweep on either the “field” axis or “freq” axis

Returns:
Matplotlib.Figure

matplotlib figure

Parameters:
  • norm (bool)

  • axis (str)

Return type:

matplotlib.figure.Figure

class autodeer.FieldSweep.SpinSystem(espins, nspin, g, A)[source]
g[source]
A[source]
I[source]
S[source]
nElectrons[source]
nNuclei[source]
Spins[source]
nStates[source]
gnscale = '1'[source]
autodeer.FieldSweep.erot(*args)[source]

Passive rotation matrix.

autodeer.FieldSweep.eyekron(M)[source]

Calculates the Kronecker product of the identity matrix with a matrix M.

Parameters: M (np.ndarray): The matrix to be multiplied with the identity matrix.

Returns: np.ndarray: The Kronecker product of the identity matrix with M.

Parameters:

M (numpy.ndarray)

autodeer.FieldSweep.kroneye(M)[source]

Computes the Kronecker product of a matrix with the identity matrix of the same size.

Args:

M (numpy.ndarray): The matrix to compute the Kronecker product with.

Returns:

numpy.ndarray: The Kronecker product of M with the identity matrix of the same size.

autodeer.FieldSweep.ham(SpinSystem, elspins=None, nucspins=None)[source]
autodeer.FieldSweep.ham_ez(SpinSystem, B=None, espins=None)[source]
autodeer.FieldSweep.ham_nz(SpinSystem, B=None, nspins=None)[source]
autodeer.FieldSweep.resfields(system, Orientations, mwFreq, computeIntensities=True, RejectionRatio=1e-08, Range=(0, 100000000.0), Threshold=0, computeFreq2Field=True)[source]
autodeer.FieldSweep.build_spectrum(system, mwFreq, Range, knots=19, npoints=1000, Guass_broadening=0.25)[source]

Build a field sweep spectrum

Parameters:
systemSpinSystem

The spin system it must include: I & S spins, g, A, gn

mwFreqfloat

The microwave frequency in MHz

Rangefloat

The field range in mT

knotsint, optional

The number of knots of orientation averaging, by default 19

npointsint, optional

The number of points in the spectrum, by default 1000

Returns:
xAxis: np.ndarray

The xAxis in mT

y: np.ndarray

The spectrum intensities normalised to 1