attune.Tune

class attune.Tune(independent, dependent, *, dep_units=None, **kwargs)[source]

Bases: object

__init__(independent, dependent, *, dep_units=None, **kwargs)[source]

A Tune which maps one set of inputs to associated output points.

Currently all tunes are assumed to have “nm” as their independent array units. All mappings are linear interpolations

Parameters
  • independent (1D array-like) – The independent axis for input values to be mapped. Must be the same shape as dependent.

  • dependent (1D array-like) – The depending axis for the mapping. Must be the same shape as independent.

  • dep_units (str (optional)) – Units for the dependent axis

  • Note (kwargs are provided to make the serialized dictionary with ind_units) –

  • object (easy to initialize into a Tune) –

  • ignored. (but are currently) –

as_dict()[source]

Serialize this Tune as a python dictionary.

property dep_units

The units of the dependent (output) values.

property dependent

The dependent (output) values for the tune points.

property ind_max

The maximum independent (input) value for the tune.

property ind_min

The minimum independent (input) value for the tune.

property ind_units

The units of the independent (input) values.

property independent

The independent (input) values for the tune points.