helikite.processing.post.level1
Functions
|
|
|
Renames columns of the input DataFrame according to predefined rules and instrument-specific rules. |
|
|
|
Round numeric columns of the DataFrame with special handling for 'Lat' and 'Long', |
|
Fill missing values in mSEMS columns at takeoff and landing times using nearby values. |
|
|
|
|
|
|
|
|
|
Module Contents
- helikite.processing.post.level1.create_level1_dataframe(df: pandas.DataFrame, output_schema: helikite.classes.output_schemas.OutputSchema)
- helikite.processing.post.level1.rename_columns(df: pandas.DataFrame, output_schema: helikite.classes.output_schemas.OutputSchema, reference_instrument: helikite.instruments.base.Instrument)
Renames columns of the input DataFrame according to predefined rules and instrument-specific rules. See Instrument.rename_dict
- Parameters:
df (pd.DataFrame) – The DataFrame with columns to be renamed.
output_schema (OutputSchema) – The OutputSchema object containing the instruments.
reference_instrument (Instrument) – Reference instrument to take pressure values from.
- Returns:
DataFrame with renamed columns.
- Return type:
pd.DataFrame
- helikite.processing.post.level1._build_rename_dict(output_schema: helikite.classes.output_schemas.OutputSchema, reference_instrument: helikite.instruments.base.Instrument)
- helikite.processing.post.level1.round_flightnbr_campaign(df: pandas.DataFrame, metadata: pydantic.BaseModel, output_schema: helikite.classes.output_schemas.OutputSchema, decimals: int)
Round numeric columns of the DataFrame with special handling for ‘Lat’ and ‘Long’, and add columns for flight number and campaign.
- Parameters:
df (pd.DataFrame) – The DataFrame to be rounded and modified.
metadata (object) – Metadata object containing the ‘flight’ attribute.
output_schema (OutputSchema) – The OutputSchema object containing the campaign name.
decimals (int, optional) – The number of decimal places to round to (default is 2).
- Returns:
The rounded and modified DataFrame with additional columns.
- Return type:
pd.DataFrame
- helikite.processing.post.level1.fill_msems_takeoff_landing(df, metadata, time_window_seconds)
Fill missing values in mSEMS columns at takeoff and landing times using nearby values.
- Parameters:
df (pd.DataFrame) – DataFrame with a DateTimeIndex where filling should occur.
metadata (object) – An object containing takeoff_time and landing_time attributes.
time_window_seconds (int, optional) – Number of seconds before/after to search for replacement values (default: 90).
- helikite.processing.post.level1.flight_profiles(df: pandas.DataFrame, reference_instrument: helikite.instruments.base.Instrument, level: helikite.classes.output_schemas.Level, output_schema: helikite.classes.output_schemas.OutputSchema, variables: list[helikite.classes.output_schemas.FlightProfileVariable] | None, fig_title=None)
- helikite.processing.post.level1._get_series_bounds(x: pandas.Series, default_divider: numbers.Number, default_min: numbers.Number | None, default_max: numbers.Number | None) tuple[tuple[numbers.Number, numbers.Number], numbers.Number]
- helikite.processing.post.level1.plot_size_distributions(df: pandas.DataFrame, level: helikite.classes.output_schemas.Level, output_schema: helikite.classes.output_schemas.OutputSchema, fig_title: str, time_start: datetime.datetime | None, time_end: datetime.datetime | None, freq: str = '1s', min_loc_interval: int = 10)
- helikite.processing.post.level1.shade_flagged(shade_config: helikite.classes.output_schemas.FlightProfileVariableShade, axes: list[matplotlib.pyplot.Axes], df: pandas.DataFrame, level: helikite.classes.output_schemas.Level, shade_coord: str = 'y', other_coord_name: str | None = None, timedelta: pandas.Timedelta = pd.Timedelta(seconds=1))
- helikite.processing.post.level1.filter_data(df)