autodeer.utils

Module Contents

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

round_step(value, step)

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

autodeer.utils.transpose_dict_of_list(d)[source]

Turns a dictionary of lists into a list of dictionaries.

autodeer.utils.transpose_list_of_dicts(d)[source]

Turns a list of dictionaries into a dictionary of lists.

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

Generates the greatest common dividor on a list of floats

Parameters:
valueslist

_description_

Parameters:

values (list)

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