sweep_design.axis
Module Contents
Classes
The representation of some array axis. |
Functions
|
Calculate actual sample. Use for self-test. Problem with floating point |
|
Create instance of Axis from some array of numbers. |
- class sweep_design.axis.ArrayAxis(start: sweep_design.help_types.RealNumber, end: sweep_design.help_types.RealNumber, sample: sweep_design.help_types.RealNumber)[source]
The representation of some array axis.
This is description of sequence. The start sequence. The end sequence. And the sample spacing between elements.
- Parameters
start (RealNumber) – is start of array.
end (RealNumber) – is end of array.
sample (RealNumber) – is sample of array.
- property array: numpy.ndarray
Representation of array axis into np.ndarray
- Returns
numpy array
- Return type
np.ndarray
- property start: sweep_design.help_types.RealNumber
- property end: sweep_design.help_types.RealNumber
- property actual_sample: sweep_design.help_types.RealNumber
- property sample: sweep_design.help_types.RealNumber
- property size: int
- sweep_design.axis.get_actual_sample(x: numpy.ndarray) sweep_design.help_types.RealNumber[source]
Calculate actual sample. Use for self-test. Problem with floating point in Python (https://docs.python.org/3/tutorial/floatingpoint.html).
- Parameters
x (np.ndarray) – array of numbers.
- Returns
an actual sample
- Return type
RealNumber
- sweep_design.axis.get_array_axis_from_array(x: sweep_design.help_types.ArrayLike, round_dx: bool = True) ArrayAxis[source]
Create instance of Axis from some array of numbers.
- Parameters
x (ArrayLike) – input array_like of numbers.
round_dx (bool, optional) – if True then round sample. Defaults to True.
- Returns
new ArrayAxis.
- Return type