helikite.plots
Attributes
Functions
|
Generates a 4x3 plot of quicklooks variables from several instruments |
|
|
With a given timestamp, generate an average of MSEM bin concentrations |
|
|
|
|
|
Generate a plot that sits above MSEMS with selected bins |
|
|
Generate a list of colours for a plot based on index of dataframe |
|
Defines all the plots for the 2023 campaigns |
Module Contents
- helikite.plots.logger
- helikite.plots.plot_scatter_from_variable_list_by_index(df: pandas.DataFrame, title: str, variables: List[str]) plotly.graph_objects.Figure
- helikite.plots.generate_grid_plot(df: pandas.DataFrame, all_instruments: List[helikite.instruments.Instrument], altitude_col: str = 'flight_computer_Altitude', resample_seconds: int | None = None) plotly.graph_objects.Figure
Generates a 4x3 plot of quicklooks variables from several instruments
Resample values to a time interval in seconds is possible, to decrease the total count of points in the plot. This is useful for large datasets where the plot is too slow to render, or too many points to be useful.
The resampling will not happen on the wind direction due to the nature of the data. The wind direction is a circular variable, and resampling will not work as expected.
- Parameters:
df (pd.DataFrame) – The dataframe containing the data to plot
all_instruments (List[instruments.Instrument]) – A list of all instruments to plot
altitude_col (str, optional) – The column name of the altitude variable, by default “flight_computer_Altitude”
resample_seconds (int, optional) – The number of seconds to resample the data to, by default None
- helikite.plots.generate_particle_heatmap(df: pandas.DataFrame, props_msems_inverted: Dict[str, Any], props_msems_scan: Dict[str, Any]) plotly.graph_objects.Figure
- helikite.plots.generate_average_bin_concentration_plot(df: pandas.DataFrame, title: str, timestamp_start: pandas.Timestamp, timestamp_end: pandas.Timestamp, bin_limit_col_prefix: str = 'msems_inverted_Bin_Lim', bin_concentration_col_prefix: str = 'msems_inverted_Bin_Conc', bin_quantity_col: str = 'msems_inverted_NumBins', y_logscale: bool = False) plotly.graph_objects.Figure
With a given timestamp, generate an average of MSEM bin concentrations
- Parameters:
df (pd.DataFrame) – Dataframe containing the data
title (str) – Title of plot
timestamp_start (str) – Start timestamp of period to average
timestamp_end (str) – End timestamp of period to average
bin_limit_col_prefix (str, optional) – Prefix of column containing bin limits, default: msems_inverted_Bin_Lim
bin_concentration_col_prefix (str, optional) – Prefix of column containing bin concentrations, default ‘msems_inverted_Bin_Conc’
bin_quantity_col (str, optional) – Column containing number of bins, default ‘msems_inverted_NumBins’
y_logscale (bool, optional) – Whether to use a log scale for the y axis, default False
- Returns:
Plotly figure
- Return type:
go.Figure
- helikite.plots.write_plots_to_html(figures: List[plotly.graph_objects.Figure], filename: str) None
- helikite.plots.generate_altitude_plot(df: pandas.DataFrame, at_ground_level: bool, altitude_col: str = 'flight_computer_Altitude') plotly.graph_objects.Figure
- helikite.plots.generate_altitude_concentration_plot(df: pandas.DataFrame, bins: List[Tuple[str, str, str]], at_ground_level: bool, height: int = 400, altitude_col: str = 'flight_computer_Altitude') plotly.graph_objects.Figure
Generate a plot that sits above MSEMS with selected bins
The bins represent the periods of time that the averaged plots are calculated from.
- helikite.plots.generate_normalised_colours(df: pandas.DataFrame, convert_nan_to: int = 0) List[str]
Generate a list of colours for a plot based on index of dataframe
- helikite.plots.campaign_2023(df: pandas.DataFrame, plot_props: Dict[str, Any], all_instruments: List[helikite.instruments.Instrument], output_path_with_time: str) None
Defines all the plots for the 2023 campaigns
Due to the plot specifications being bespoke according to plans defined in 2023, this function attemps to isolate these decisions from further plotting requirements in the future
- Parameters:
df (pd.DataFrame) – Dataframe containing all the merged data to be plotted
plot_props (Dict[str, Any]) – Dictionary containing all the properties for the plots originating from the runtime YAML
all_instruments (List[instruments.Instrument]) – List of all instruments that are available after merging all the data
output_path_with_time (str) – Path to the output directory for the plots, most likely the one generated in helikite.py with the current output time