autodeer.classes

Module Contents

Classes

Interface

Represents the interface connection from autoEPR to the spectrometer.

Parameter

Represents a sequence or pulse parameter.

class autodeer.classes.Interface(log=None)[source]

Represents the interface connection from autoEPR to the spectrometer.

pulses[source]
savefolder[source]
savename = "''"[source]
resonator = 'None'[source]
connect()[source]
Return type:

None

acquire_dataset(data)[source]

Acquires the dataset.

launch(sequence, savename)[source]

Launches the experiment and initialises autosaving.

Parameters:
sequenceSequence

The sequence to be launched

savenamestr

The savename for this measurement. A timestamp will be added to the value.

Parameters:

savename (str)

isrunning()[source]
Return type:

bool

terminate()[source]

Terminates the experiment immediately.

Return type:

None

terminate_at(criterion, test_interval=2, keep_running=True, verbosity=0, autosave=True)[source]

Terminates the experiment upon a specific condition being satisified.

Parameters:
criterion_type_

The criteria to be tested.

test_intervalint, optional

How often should the criteria be tested in minutes, by default 10.

keep_runningbool, optional

If True, an error will not be raised if the experiment finishes before the criteria is met, by default True.

verbosityint, optional

The verbosity level, by default 0.

autosavebool, optional

If True, the data will be autosaved, by default True.

class autodeer.classes.Parameter(name, value, unit='', description='', virtual=False, **kwargs)[source]

Represents a sequence or pulse parameter.

A general parameter.

Parameters:
namestr

The parameter name

valuefloat or int

The parameter value, eithe initial or static

unitstr, optional

The unit of parameter, by default None. Leave as None if unitless.

descriptionstr, optional

A brief description of the parameter, by default None

axisnp.ndarray, optional

The difference from the intial value for each position in a dynamic axis. Can be n-dimensional, by default None.

ax_idlist, optional
virtual: bool, optional

A virtual paramter is only used to vary other parameters, it is not varied itself and will not be directly passed to a spectrometer. This parameter is never inherited. By default, False

Attributes:
progressivebool

Is the parameter used in any progression or is it constant

progdict

A dict containing progressive programs for this parameter. This list has two elements. 1) The axis_id”s and 2) the “axis” of values.

Examples

Creating a static parameter ``` Par1 = Parameter(

name=”Par1”, value=10, unit=”us”, description=”The first parameter”)

` Creating a dynamic parameter ` Par1 = Parameter(

name=”Par1”, value=10, unit=”us”, description=”The first parameter”, axis=np.arange(0,10,1), axis_id=0)

```

Adding a parameter and a number: ``` Par1 = Parameter(

name=”Par1”, value=10, unit=”us”, description=”The first parameter”)

Par2 = Par1 + 2

property dim[source]
name[source]
unit[source]
description[source]
virtual[source]
axis = '[]'[source]
ax_id = '[]'[source]
add_axis(axis_id, axis)[source]
get_axis()[source]
remove_dynamic()[source]
is_static()[source]
Return type:

bool

__eq__(__o)[source]
Parameters:

__o (object)

Return type:

bool

__add__(__o)[source]
Parameters:

__o (object)

__sub__(__o)[source]
Parameters:

__o (object)

__mul__(__o)[source]
Parameters:

__o (object)

__rmul__(__o)[source]
Parameters:

__o (object)

copy()[source]
_to_dict()[source]
_to_json()[source]
save(filename)[source]

Save the parameter to a JSON file.

Parameters:
filenamestr

Path to the JSON file.

Returns:
None
Raises:
TypeError

If the object cannot be serialized to JSON.

static _from_dict(dict)[source]
classmethod _from_json(JSONstring)[source]
classmethod load(filename)[source]

Load a Parameter object from a JSON file.

Parameters:
filenamestr

Path to the JSON file.

Returns:
objParameter

The Pulse loaded from the JSON file.

Raises:
FileNotFoundError

If the file does not exist.