|
|
Telescience Resource Kit
TReK Python
5.4.0 ART
|
This class calibrates a value using a mathematical equation. More...
Inherits Calibrator.
Public Member Functions | |
Initialize / Finalize | |
Functions handling class initialization and finalization. | |
| def | MathCalibrator ( Optional[MathCalibrator] math_cal=None, Optional[c_void_p] native_ptr=None, is_clone: bool=False -> def ) -> def |
| Class initializer. More... | |
| def | clone ( -> MathCalibrator ) -> def |
| Creates a new instance of the object with the same contents. More... | |
| def | copy (copy_from: object -> None ) -> def |
| Copies the contents of the provided 'copy_from' MathCalibrator. More... | |
| def | initialize ( -> None ) -> def |
| Initializes the object. More... | |
| def | load_file (filename: str -> None ) -> def |
| Loads the MathCalibrator definition from the specified file. More... | |
| def | save_file (filename: str -> None ) -> def |
| Saves the MathCalibrator definition to the specified file. More... | |
Calibration | |
Functions for handling calibration. | |
| def | add_another_parameter_value (name: str, instance: int, calibrated: bool -> None ) -> def |
| Adds the value for another parameter to the calibration. More... | |
| def | add_constant (constant: float -> None ) -> def |
| Adds a constant value for the calibration. More... | |
| def | add_operator (operator: MathCalOpType -> None ) -> def |
| Adds a mathematical operator to the calibration. More... | |
| def | add_this_value ( -> None ) -> def |
| Adds the value for this parameter to the calibration. | |
| def | calibrate (input_value: float -> float ) -> def |
| Performs the calibration on the input value. More... | |
| def | get_item (item_no: int -> MathCalibratorItem ) -> def |
| Gets the specified item for the calibration. More... | |
| def | get_number_of_items ( -> int ) -> def |
| Returns the number of items in the calibration. More... | |
| def | get_validation_error ( -> str ) -> def |
| Return a string for any errors discovered by is_valid. More... | |
| def | is_valid ( -> bool ) -> def |
| Validates the math calibrator. More... | |
| def | MathCalibrator ( -> def ) -> def |
| Class initializer. More... | |
| def | initialize ( -> None ) -> def |
| Initializes the object. More... | |
| def | calibrate (input_value: float -> float ) -> def |
| Virtual method for derived classes to calibrate an input value. More... | |
| def | clone ( -> Calibrator ) -> def |
| Creates and returns an extact copy of the object. More... | |
Public Member Functions inherited from NamedItem | |
| def | remove_all_attributes ( -> None ) -> def |
| Removes all attributes. | |
| def | remove_attribute (name: str -> None ) -> def |
| Removes the attribute by name. More... | |
| def | __eq__ (named_item: object -> bool ) -> def |
| Equality operator "==". More... | |
| def | add_attribute (name: str, value: str -> None ) -> def |
| Adds an attribute to the item. More... | |
| def | get_alias ( -> str ) -> def |
| Returns the alias of the item. More... | |
| def | get_attribute (name: str -> str ) -> def |
| Get the value of the specified attribute. More... | |
| def | get_attribute_list ( -> list[str] ) -> def |
| Gets a list of the attribute names. More... | |
| def | get_name ( -> str ) -> def |
| Returns the name of the item. More... | |
| def | get_long_description ( -> str ) -> def |
| Returns the long description of the item. More... | |
| def | get_short_description ( -> str ) -> def |
| Returns the short description of the item. More... | |
| def | get_user_description ( -> str ) -> def |
| Returns the user description of the item. More... | |
| def | get_owner ( -> str ) -> def |
| Returns the owner of the item. More... | |
| def | get_path ( -> str ) -> def |
| Returns the path for the item. More... | |
| def | set_name (name: str -> None ) -> def |
| Sets the name of the item. More... | |
| def | set_alias (alias: str -> None ) -> def |
| Sets the alias of the item. More... | |
| def | set_short_description (description: str -> None ) -> def |
| Sets the short description of the item. More... | |
| def | set_long_description (description: str -> None ) -> def |
| Sets the long description of the item. More... | |
| def | set_user_description (description: str -> None ) -> def |
| Sets the user description of the item. More... | |
| def | set_owner (owner: str -> None ) -> def |
| Sets the owner of the item. More... | |
| def | set_path (path: str -> None ) -> def |
| Sets the path of the item. More... | |
This class calibrates a value using a mathematical equation.
The math calibrator uses reverse polish notation and is limited to the following operators: +, -, *, /, ^ and ln. The math calibrator can use the value of this parameter, the converted or calibrated value of another parameter in the same packet, and constants.
| ( | math_cal | : Optional[MathCalibrator] | |
| native_ptr | : Optional[c_void_p] | ||
| is_clone | : bool | ||
| ) | -> def |
Class initializer.
| [in] | math_cal | MathCalibrator to create a copy (optional). By default, initializes a new instance. |
| [in] | native_ptr | (Optional) Internal parameter, do not provide. |
| [in] | is_clone | (Optional) Internal parameter, do not provide. |
Reimplemented from Calibrator.
| ( | name | : str | |
| instance | : int | ||
| calibrated | : bool | ||
| ) | -> None |
Adds the value for another parameter to the calibration.
| [in] | name | The name of the other parameter. |
| [in] | instance | The sample number to use (first sample is 1). |
| [in] | calibrated | Indicates to use the calibrated value. |
| TrekError | TREK_DATA_INVALID_INSTANCE |
| ( | constant | : float | ) | -> None |
Adds a constant value for the calibration.
| [in] | constant | The value to add. |
| ( | operator | : MathCalOpType | ) | -> None |
Adds a mathematical operator to the calibration.
| [in] | operator | The math operator to add. |
| ( | input_value | : float | ) | -> float |
Performs the calibration on the input value.
| [in] | input_value | Value to calibrate. |
Reimplemented from Calibrator.
| ( | ) | -> MathCalibrator |
Creates a new instance of the object with the same contents.
Reimplemented from Calibrator.
| ( | copy_from | : object | ) | -> None |
Copies the contents of the provided 'copy_from' MathCalibrator.
| [in] | copy_from | MathCalibrator to copy from. |
| TypeError | if 'copy_from' is not a MathCalibrator. |
Reimplemented from NamedItem.
| ( | item_no | : int | ) | -> MathCalibratorItem |
Gets the specified item for the calibration.
| TrekError | 15007 - TREK_DATA_DOES_NOT_EXIST |
| ( | ) | -> int |
Returns the number of items in the calibration.
| ( | ) | -> str |
Return a string for any errors discovered by is_valid.
| ( | ) | -> None |
Initializes the object.
Reimplemented from Calibrator.
| ( | ) | -> bool |
Validates the math calibrator.
See get_validation_errors.
| ( | filename | : str | ) | -> None |
Loads the MathCalibrator definition from the specified file.
Reads an XML MathCalibrator.
| [in] | filename | The file from which to load the MathCalibrator object. |
| ( | filename | : str | ) | -> None |
Saves the MathCalibrator definition to the specified file.
Writes an XML MathCalibrator.
| [in] | filename | The file to save the and dependency object. |