Skip to main content

class pyvariant.InterpolationType

Enumeration

Linear = pyvariant.InterpolationType.Linear

Quadratic = pyvariant.InterpolationType.Quadratic

Spline = pyvariant.InterpolationType.Spline

class pyvariant.VariantD

__add__(arg2: VariantD) → object

__complex__() → object

__eq__(arg2: VariantD) → object

__ge__(arg2: VariantD) → object

__getinitargs__() → tuple

__getstate__() → tuple

__getstate_manages_dict__ = True

__gt__(arg2: VariantD) → object

__init__()

__init__(arg2: float, arg3: float)

__init__(scalar_value: object) → object

__init__(row: list) → object

__init__(channels: list, abscissa: list) → object

__init__(channels: list, abscissa: list, transpose: bool) → object

[2] Create a scalar variant using Python’s builtin types. Accepts bool, integer, float and complex. [3] Create a vector or matrix by passing a list. Use a nested list to create a matrix. [4] Create a signal or xydata by passing channels and abscissa as nested lists resp. list. [5] Create a signal or xydata by passing channels and abscissa as nested lists resp. list. The matrix containing the channels can be transposed on demand.

__le__(arg2: VariantD) → object

__lt__(arg2: VariantD) → object

__mul__(arg2: VariantD) → object

__repr__() → object

__safe_for_unpickling__ = True

__setstate__(arg2: tuple)

__str__() → object

__sub__(arg2: VariantD) → object

__truediv__(arg2: VariantD) → object

get_value(row: int) → complex

get_value(row: int, col: int) → complex

[0] Return the complex value from index (row).
[1] Return the complex value from index (row, col).

size1() → int

Return the length of dimension 1. If VariantD is a scalar, size1 is equal to ‘1’. If VariantD is a vector, size1 returns the number of vector entries. If VariantD is a matrix, size1 returns the number of matrix rows. If VariantD is xy-data or a signal, size1 returns the number of y-axes.

size2() → int

Return the length of dimension 2. If VariantD is a scalar or vector, size2 is equal to ‘1’. If VariantD is a matrix, size2 returns the number of matrix columns. If VariantD is xydata or a signal, size2 returns the number of y-axis entries.

pyvariant.extract_abscissae(item: VariantD) → VariantD

Extract the abscissae from ‘item’ and returns a VariantD vector. If ‘item’ is a matrix, the first matrix row will be extracted. If ‘item’ is xydata or a signal, the x-axis will be extracted.

pyvariant.extract_channel(item: VariantD, axis_nr: int) → VariantD

Extract a channel ‘axis_nr’ from ‘item’ and returns a VariantD vector. If ‘item’ is a matrix, extract_channel returns the row number ‘axis_nr’. If item is xydata or a signal, extract_channel returns the channel number ‘axis_nr’.

pyvariant.get_boolean(item: VariantD) → bool

Return the value if ‘item’ is a boolean.

pyvariant.get_scalar(item: VariantD) → complex

Return the complex value if ‘item’ is a scalar.

pyvariant.interpolate(signal: VariantD) → VariantD

Perform interpolation on input signal. Optionally pass a value for x-increment and interpolation type.

pyvariant.is_boolean(item: VariantD) → bool

Return ‘True’ if ‘item’ is a bool value and ‘False’ otherwise.

pyvariant.is_matrix(item: VariantD) → bool

Return ‘True’ if ‘item’ is a matrix and ‘False’ otherwise.

pyvariant.is_scalar(item: VariantD) → bool

Return ‘True’ if ‘item’ is a scalar value and ‘False’ otherwise.

pyvariant.is_signal(item: VariantD) → bool

Return ‘True’ if ‘item’ is a signal and ‘False’ otherwise.

pyvariant.is_uninitialized(item: VariantD) → bool

Return ‘True’ if ‘item’ is a uninitialized and ‘False’ otherwise.

pyvariant.is_vector(item: VariantD) → bool

Return ‘True’ if ‘item’ is a vector and ‘False’ otherwise.

pyvariant.is_xy_data(item: VariantD) → bool

Return ‘True’ if ‘item’ is a xy-data and ‘False’ otherwise.

pyvariant.list_2_variant_vector(values: list) → VariantD

Convert a python list of values into VariantD vector type.

pyvariant.list_2_variant_xy_data(y_axis: list, x_axis: list) → VariantD

Convert a python list of x-values and a list of y-values into VariantD xy-data type.

pyvariant.list_list_2_variant_matrix(values: list) → VariantD

Convert a python list of lists of values into VariantD matrix type.

pyvariant.list_list_2_variant_signal(y_axes: list, x_axis: list) → VariantD

Convert a python list of x-values and a list of lists of y-values into VariantD signal type.

pyvariant.size1(item: VariantD) → int

Return the length of dimension 1. If ‘item’ is a scalar, size1 is equal to ‘1’. If ‘item’ is a vector, size1 returns the number of vector entries. If ‘item’ is a matrix, size1 returns the number of matrix rows. If ‘item’ is xy-data or a signal, size1 returns the number of y-axes.

pyvariant.size2(item: VariantD) → int

Return the length of dimension 2. If ‘item’ is a scalar or vector, size2 is equal to ‘1’. If ‘item’ is a matrix, size2 returns the number of matrix columns. If ‘item’ is xydata or a signal, size2 returns the number of y-axis entries.