helikite.classes.base
Attributes
Classes
Abstract base class for processing pipeline stages. |
Functions
|
A decorator to enforce that a method can only run if the required |
Reconstruct instrument objects from a dataframe and level 0 metadata. |
|
|
Execute dataframe-modifying operations in dependency order. |
Module Contents
- helikite.classes.base.logger
- helikite.classes.base.function_dependencies(required_operations: list[str | tuple[str, Ellipsis]], changes_df: bool, use_once: bool, complete_with_arg: Any | None = None, complete_req: bool = False)
A decorator to enforce that a method can only run if the required operations have been completed and not rerun.
- class helikite.classes.base.BaseProcessor(output_schema: helikite.classes.output_schemas.OutputSchema, instruments: list[helikite.instruments.Instrument], reference_instrument: helikite.instruments.Instrument)
Bases:
abc.ABCAbstract base class for processing pipeline stages.
Provides shared state tracking, dependency management, and utility helpers used by all processing levels.
- _output_schema
- _instruments: list[helikite.instruments.Instrument]
- _reference_instrument: helikite.instruments.Instrument
- _completed_operations: list[str] = []
- property level: helikite.classes.output_schemas.Level
- Abstractmethod:
Processing level identifier.
- property output_schema
Return the campaign output format specification.
- property instruments
Return instruments present in the current flight
- property reference_instrument
Return the instrument used as synchronization reference.
- property df: pandas.DataFrame | None
- Abstractmethod:
Return the current state of dataframe.
- _check_schema_contains_instrument(instrument: helikite.instruments.Instrument) bool
- property _flight_computer: helikite.instruments.flight_computer.FlightComputer | None
- abstractmethod _data_state_info() list[str]
- _operations_state_info() list[str]
- state()
Prints the current state of the class in a tabular format
- help()
Prints available methods in a clean format
- _outliers_file_state_info(outliers_file: str, add_all: bool = False) list[str]
- _print_success_errors(operation: str, success: list[str], errors: list[tuple[str, Any]]) None
- abstractmethod export_data(filepath: str | pathlib.Path | None = None)
Export dataframe in its final state.
- helikite.classes.base.get_instruments_from_cleaned_data(df: pandas.DataFrame, metadata: pydantic.BaseModel, flight_computer_version: str | None) tuple[list[helikite.instruments.Instrument], helikite.instruments.Instrument]
Reconstruct instrument objects from a dataframe and level 0 metadata.
- Parameters:
df – Level 0 dataframe.
metadata – Metadata model.
flight_computer_version – Optional flight computer version.
- Returns:
Tuple of instruments list and reference instrument.
- helikite.classes.base.launch_operations_changing_df(data_processor: BaseProcessor)
Execute dataframe-modifying operations in dependency order.
- Parameters:
data_processor – Processor instance.
- Returns:
Processor after execution.