noads.gam_jax.utils.data_analysis#

Created on Thu Jan 20 20:20:20 2020.

author:

Conceptual Airplane Design & Operations (CADO team) Nicolas PETEILH, Pascal ROCHES, Nicolas MONROLIN, Thierry DRUOT AircraftOperation & Systems, Air Transport Department, ENAC

noads.gam_jax.utils.data_analysis.do_regression(df, un, abs, ord, colors, order, title=None)[source]#

Perform regression and draw the corresponding graph.

noads.gam_jax.utils.data_analysis.draw_colored_cloud_on_axis(ax, df, un, abs, ord, colors, xrange=None, yrange=None, leg_loc='lower right')[source]#

Build a colored scatter plot according to given colors categories. :param ax: a figure axis to plot on :param df: a dataframe :param un: the dict of units to use for the axis scale :param abs: the label of the dataframe column to plot on x-axis :param ord: the label of the dataframe column to plot on y-axis :param colors: a dictionary with label of the category as a key, and the color of the category as value. {‘turboprop’:’red’} :param xrange: list of 2 value for the x-axis range. Matplotlib default if not specified. :param yrange: list of 2 value for the y-axis range. Matplotlib default if not specified. :return:

noads.gam_jax.utils.data_analysis.draw_grid(file_name, data_grid, title)[source]#

Draw the figure of the flight grid and store it in a file.

Parameters:
  • file_name – file to store the figure

  • data_grid – data source

Returns:

noads.gam_jax.utils.data_analysis.draw_hist(rer, title)[source]#

Draw the histogram of relative errors given into “reg” as [abs_list, ord_list].

noads.gam_jax.utils.data_analysis.draw_markers_and_colormap_cloud_on_axis(ax, df, un, abs, ord, markers, color_by='nominal_range', xrange=None, yrange=None, leg_loc='upper left')[source]#

Build a colored scatter plot according to a given color scale, with a colorbar on the side. :param ax: a figure axis to plot on :param df: a dataframe :param un: the dict of units to use for the axis scale :param abs: the label of the dataframe column to plot on x-axis :param ord: the label of the dataframe column to plot on y-axis :param markers: a dictionary with label of the category as a key, and the matplotlib marker as value. :param color_by: the label of the dataframe column for the color mapping :param xrange: list of 2 value for the x-axis range. Matplotlib default if not specified. :param yrange: list of 2 value for the y-axis range. Matplotlib default if not specified. :return:

noads.gam_jax.utils.data_analysis.draw_reg(df, un, abs, ord, reg, colors, title=None, leg_loc='lower right', file_name=None)[source]#

Draw the cloud of point in perspective of the regression given into “reg” as [abs_list, ord_list] Coloration of each airplane type is given into “colors”.

noads.gam_jax.utils.data_analysis.get_error(df, un, abs, ord, reg, abs_interval)[source]#
noads.gam_jax.utils.data_analysis.lin_lst_reg(df, abs, ord, order)[source]#

Linear least square regression of “ord” versus “abs” with given order order is the list of exponents to apply.

noads.gam_jax.utils.data_analysis.load_data_from_file(file_name)[source]#
noads.gam_jax.utils.data_analysis.plot_without_reg(df, un, abs, ord, markers=None, color_by='nominal_range', colors=None, leg_loc='lower right', file_name=None)[source]#

Plot figure with colormap and markers cloud OR with only categories of color cloud.

noads.gam_jax.utils.data_analysis.read_db(file)[source]#

Read data base and convert to standard units WARNING: special treatment for cruise_speed and max_speed which can be Mach number.

noads.gam_jax.utils.data_analysis.store_data_to_file(data, file_name)[source]#
noads.gam_jax.utils.data_analysis.subplots_by_varname(df, un, var_names, figwidth=12, savefig=False)[source]#

Create set of subplots for each variable in the list var_name.

Functions

do_regression(df, un, abs, ord, colors, order)

Perform regression and draw the corresponding graph.

draw_colored_cloud_on_axis(ax, df, un, abs, ...)

Build a colored scatter plot according to given colors categories.

draw_grid(file_name, data_grid, title)

Draw the figure of the flight grid and store it in a file.

draw_hist(rer, title)

Draw the histogram of relative errors given into "reg" as [abs_list, ord_list].

draw_markers_and_colormap_cloud_on_axis(ax, ...)

Build a colored scatter plot according to a given color scale, with a colorbar on the side.

draw_reg(df, un, abs, ord, reg, colors[, ...])

Draw the cloud of point in perspective of the regression given into "reg" as [abs_list, ord_list] Coloration of each airplane type is given into "colors".

get_error(df, un, abs, ord, reg, abs_interval)

lin_lst_reg(df, abs, ord, order)

Linear least square regression of "ord" versus "abs" with given order order is the list of exponents to apply.

load_data_from_file(file_name)

plot_without_reg(df, un, abs, ord[, ...])

Plot figure with colormap and markers cloud OR with only categories of color cloud.

read_db(file)

Read data base and convert to standard units WARNING: special treatment for cruise_speed and max_speed which can be Mach number.

store_data_to_file(data, file_name)

subplots_by_varname(df, un, var_names[, ...])

Create set of subplots for each variable in the list var_name.