pyepr.utils

Functions

build_table(source, params, params_widths)

sop(spins, comps)

Spin Operator Matricies.

transpose_dict_of_list(d)

Turns a dictionary of lists into a list of dictionaries.

transpose_list_of_dicts(d)

Turns a list of dictionaries into a dictionary of lists.

save_file(path, str)

autoEPRDecoder(dct)

gcd(values)

Generates the greatest common dividor on a list of floats

val_in_us(Param[, axis])

Returns the value or axis of a parameter in microseconds

val_in_ns(Param)

Returns the value or axis of a parameter in nanoseconds

add_phaseshift(data, phase)

Adds a phase shift to the data

_gen_ESEEM(t, freq, depth)

Add an ESEEM modulation to a time domain signal

round_step(value, step)

Module Contents

pyepr.utils.build_table(source, params, params_widths)[source]
pyepr.utils.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.utils.transpose_dict_of_list(d)[source]

Turns a dictionary of lists into a list of dictionaries.

pyepr.utils.transpose_list_of_dicts(d)[source]

Turns a list of dictionaries into a dictionary of lists.

pyepr.utils.save_file(path, str)[source]
pyepr.utils.autoEPRDecoder(dct)[source]
pyepr.utils.gcd(values)[source]

Generates the greatest common dividor on a list of floats

Parameters:
valueslist

_description_

Parameters:

values (list)

pyepr.utils.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.utils.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.utils.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.utils._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.utils.round_step(value, step)[source]