factory module
Define a class to create the proper IMeasurementPoint.
- class IMeasurementPointFactory(is_raw=False, create_virtual_instruments=True, commented_lines=None, **kwargs)[source]
Bases:
objectClass to create the proper
GlobalDiagnosticsPickUp.It infers the proper type, position of instruments as well as the measured data from the configuration
TOMLfile and the measurementsCSVfile.- Parameters:
- run_single(config_key, config_value, df_data, color)[source]
Create a single measurement point.
- Parameters:
config_key (
str) – A key from theTOMLfile. If ‘global’ keyword is in the key, we return aGlobalDiagnostics. Else, we return aPickUp.config_value (
dict) – Values from theTOMLfile corresponding toconfig_key, which will passed down to the createdIMeasurementPoint.df_data (
DataFrame) – Full data from theCSVfile.
- Return type:
- Returns:
A
GlobalDiagnosticsorPickUp.
- _filter_global_diagnostics(measurement_points, verbose=False)[source]
Ensure that we have only one
GlobalDiagnosticsobject.- Parameters:
measurement_points (
list[IMeasurementPoint])verbose (
bool, default:False)
- Return type: