pyepr¶
Submodules¶
Attributes¶
Classes¶
Represents a sequence or pulse parameter. |
|
Represents the interface connection from autoEPR to the spectrometer. |
|
Represents a sequence or pulse parameter. |
|
Represents a general experimental pulse. |
|
Represents a detection pulse. |
|
DEPRECATION WARNING: THIS WILL BE REMOVED SOON. |
|
Represents a rectangular monochromatic pulse. |
|
Represents an experimental pulse sequence. |
|
Represents a Hahn-Echo sequence. |
|
Represents a T2 relaxation sequence. A Hahn Echo where the interpulse delay increases |
|
Represents a Field Sweep (EDFS) sequence. |
|
Represents a reptime scan of a Hahn Echo Sequence. |
|
Represents a Carr-Purcell sequence. |
|
Builds nutation based Resonator Profile sequence. |
|
Builds TWT based Resonator Profile sequence. |
|
Represents a sequence or pulse parameter. |
|
Represents a general experimental pulse. |
|
Represents a detection pulse. |
|
DEPRECATION WARNING: THIS WILL BE REMOVED SOON. |
|
Represents a rectangular monochromatic pulse. |
|
Represents a Gaussian monochromatic pulse. |
|
A general parent class for Frequency Swept Pulses. |
|
Represents a hyperboilc secant frequency-swept pulse. |
|
Represents a linear frequency-swept pulse. |
|
Represents a general experimental pulse. |
|
A class for defining criteria for terminating experiments. This should |
|
A class for defining criteria for terminating experiments. This should |
|
A class for defining criteria for terminating experiments. This should |
|
Represents a sequence or pulse parameter. |
|
Analysis and calculation of FieldSweep Experiment. |
|
Represents an experimental pulse sequence. |
|
Analysis and calculation of Carr Purcell decay. |
|
Analysis, fitting and plotting for the HahnEchoRelaxation Sequence. |
|
Analysis and calculation of Reptime based saturation recovery. |
|
Analysis and calculation of resonator profiles. |
Functions¶
|
|
|
Spin Operator Matricies. |
Turns a dictionary of lists into a list of dictionaries. |
|
Turns a list of dictionaries into a dictionary of lists. |
|
|
|
|
|
|
Generates the greatest common dividor on a list of floats |
|
Returns the value or axis of a parameter in microseconds |
|
Returns the value or axis of a parameter in nanoseconds |
|
Adds a phase shift to the data |
|
Add an ESEEM modulation to a time domain signal |
|
|
|
Returns the value or axis of a parameter in nanoseconds |
|
Returns the value or axis of a parameter in microseconds |
|
Adds a phase shift to the data |
|
Add an ESEEM modulation to a time domain signal |
|
Create the field sweep model for a Nitroxide spin system. |
|
|
|
|
|
|
|
Spin Operator Matricies. |
|
|
|
|
|
|
|
Spin Operator Matricies. |
|
Create the field sweep model for a Nitroxide spin system. |
|
Passive rotation matrix. |
|
Calculates the Kronecker product of the identity matrix with a matrix M. |
|
Computes the Kronecker product of a matrix with the identity matrix of the same size. |
|
|
|
|
|
|
|
|
|
Build a field sweep spectrum |
|
Detect if the dataset is an ESEEM experiment. |
|
Create a superimposed plot of relaxation data and fits. |
|
|
|
|
|
Calcuates the overlap between two functions. |
|
|
|
Package Contents¶
- pyepr.sop(spins, comps)[source]¶
Spin Operator Matricies.
This function is ported from EasySpin (https://easyspin.org/easyspin/documentation/sop.html)
References:¶
[1] Stefan Stoll, Arthur Schweiger EasySpin, a comprehensive software package for spectral simulation and analysis in EPR J. Magn. Reson. 178(1), 42-55 (2006)
[2] Stefan Stoll, R. David Britt General and efficient simulation of pulse EPR spectra Phys. Chem. Chem. Phys. 11, 6614-6625 (2009)
- Parameters:
- spinslist
A list of each spin and its spin qunatum number
- compsstr
The type of spin operator matrix to create. Options are: x,y,z,+,-,e
- pyepr.gcd(values)[source]¶
Generates the greatest common dividor on a list of floats
- Parameters:
- valueslist
_description_
- Parameters:
values (list)
- pyepr.val_in_us(Param, axis=True)[source]¶
Returns the value or axis of a parameter in microseconds
- Parameters:
- Paramautodeer.Parameter
The parameter to be converted
- Returns:
- float or numpy.ndarray
- pyepr.val_in_ns(Param)[source]¶
Returns the value or axis of a parameter in nanoseconds
- Parameters:
- Paramautodeer.Parameter
The parameter to be converted
- Returns:
- float or numpy.ndarray
- pyepr.add_phaseshift(data, phase)[source]¶
Adds a phase shift to the data
- Parameters:
- datanumpy.ndarray
The data to be phase shifted
- phasefloat
The phase shift in degrees
- Returns:
- numpy.ndarray
- pyepr._gen_ESEEM(t, freq, depth)[source]¶
Add an ESEEM modulation to a time domain signal
- Parameters:
- tnumpy.ndarray
The time domain signal
- freqfloat
The modulation frequency
- depthfloat
The modulation depth
- Returns:
- numpy.ndarray
The
- pyepr.val_in_ns(Param)[source]¶
Returns the value or axis of a parameter in nanoseconds
- Parameters:
- Paramautodeer.Parameter
The parameter to be converted
- Returns:
- float or numpy.ndarray
- pyepr.val_in_us(Param, axis=True)[source]¶
Returns the value or axis of a parameter in microseconds
- Parameters:
- Paramautodeer.Parameter
The parameter to be converted
- Returns:
- float or numpy.ndarray
- pyepr.add_phaseshift(data, phase)[source]¶
Adds a phase shift to the data
- Parameters:
- datanumpy.ndarray
The data to be phase shifted
- phasefloat
The phase shift in degrees
- Returns:
- numpy.ndarray
- pyepr._gen_ESEEM(t, freq, depth)[source]¶
Add an ESEEM modulation to a time domain signal
- Parameters:
- tnumpy.ndarray
The time domain signal
- freqfloat
The modulation frequency
- depthfloat
The modulation depth
- Returns:
- numpy.ndarray
The
- pyepr.create_Nmodel(mwFreq)[source]¶
Create the field sweep model for a Nitroxide spin system.
- Parameters:
- mwFreqfloat
The microwave frequency in MHz
- pyepr.sop(spins, comps)[source]¶
Spin Operator Matricies.
This function is ported from EasySpin (https://easyspin.org/easyspin/documentation/sop.html)
References:¶
[1] Stefan Stoll, Arthur Schweiger EasySpin, a comprehensive software package for spectral simulation and analysis in EPR J. Magn. Reson. 178(1), 42-55 (2006)
[2] Stefan Stoll, R. David Britt General and efficient simulation of pulse EPR spectra Phys. Chem. Chem. Phys. 11, 6614-6625 (2009)
- Parameters:
- spinslist
A list of each spin and its spin qunatum number
- compsstr
The type of spin operator matrix to create. Options are: x,y,z,+,-,e
- pyepr.sop(spins, comps)[source]¶
Spin Operator Matricies.
This function is ported from EasySpin (https://easyspin.org/easyspin/documentation/sop.html)
References:¶
[1] Stefan Stoll, Arthur Schweiger EasySpin, a comprehensive software package for spectral simulation and analysis in EPR J. Magn. Reson. 178(1), 42-55 (2006)
[2] Stefan Stoll, R. David Britt General and efficient simulation of pulse EPR spectra Phys. Chem. Chem. Phys. 11, 6614-6625 (2009)
- Parameters:
- spinslist
A list of each spin and its spin qunatum number
- compsstr
The type of spin operator matrix to create. Options are: x,y,z,+,-,e
- pyepr.create_Nmodel(mwFreq)[source]¶
Create the field sweep model for a Nitroxide spin system.
- Parameters:
- mwFreqfloat
The microwave frequency in MHz
- pyepr.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)
- pyepr.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.
- pyepr.resfields(system, Orientations, mwFreq, computeIntensities=True, RejectionRatio=1e-08, Range=(0, 100000000.0), Threshold=0, computeFreq2Field=True)[source]¶
- pyepr.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
- pyepr.detect_ESEEM(dataset, type='deuteron', threshold=1.5)[source]¶
Detect if the dataset is an ESEEM experiment.
- Parameters:
- datasetxr.DataArray
The dataset to be analyzed.
- typestr, optional
The type of ESEEM experiment, either deuteron or proton, by default ‘deuteron’
- thresholdfloat, optional
The SNR threshold for detection, by default 1.5
- Returns:
- bool
True if ESEEM is detected, False if not.
- pyepr.plot_1Drelax(*args, fig=None, axs=None, cmap=cmap)[source]¶
Create a superimposed plot of relaxation data and fits.
- Parameters:
- argsad.Analysis
The 1D relaxation data to be plotted.
- figFigure, optional
The figure to plot to, by default None
- axsAxes, optional
The axes to plot to, by default None
- cmaplist, optional
The color map to use, by default ad.cmap