EnvironmentAnalysis Plots Class#

class rocketpy.plots.environment_analysis_plots._EnvironmentAnalysisPlots[source]#

Class that holds plot methods for EnvironmentAnalysis class.

Variables:
  • _EnvironmentAnalysisPlots.env_analysis (EnvironmentAnalysis) – EnvironmentAnalysis object that will be used for the plots.

  • _EnvironmentAnalysisPlots.surface_level_dict (dict) – Dictionary with all surface level data.

  • _EnvironmentAnalysisPlots.pressure_level_dict (dict) – Dictionary with all pressure level data.

__init__(env_analysis)[source]#

Initializes the class.

Parameters:

env_analysis (rocketpy.EnvironmentAnalysis) – Instance of the rocketpy EnvironmentAnalysis class

Return type:

None

wind_gust_distribution()[source]#

Get all values of wind gust speed (for every date and hour available) and plot a single distribution. Expected result is a Weibull distribution, however, the result is not always a perfect fit, and sometimes it may look like a normal distribution.

Return type:

None

surface10m_wind_speed_distribution(wind_speed_limit=False)[source]#

Get all values of sustained surface wind speed (for every date and hour available) and plot a single distribution. Expected result is a Weibull distribution. The wind speed limit is plotted as a vertical line.

Parameters:

wind_speed_limit (bool, optional) – If True, plots the wind speed limit as a vertical line. The default is False.

Return type:

None

average_surface_temperature_evolution()[source]#

Plots average temperature progression throughout the day, including sigma contours.

Return type:

None

average_surface10m_wind_speed_evolution(wind_speed_limit=False)[source]#

Plots average surface wind speed progression throughout the day, including sigma contours.

Parameters:

wind_speed_limit (bool, optional) – If True, plots the wind speed limit as a horizontal line. The default is False.

Return type:

None

average_surface100m_wind_speed_evolution()[source]#

Plots average surface wind speed progression throughout the day, including sigma contours.

Return type:

None

average_wind_speed_profile(clear_range_limits=False)[source]#

Average wind speed for all datetimes available. The plot also includes sigma contours.

Parameters:

clear_range_limits (bool, optional) – If True, clears the range limits. The default is False.

Return type:

None

average_wind_velocity_xy_profile(clear_range_limits=False)[source]#

Average wind X and wind Y for all datetimes available. The X component is the wind speed in the direction of East, and the Y component is the wind speed in the direction of North.

Parameters:

clear_range_limits (bool, optional) – If True, clears the range limits. The default is False.

Return type:

None

average_wind_heading_profile(clear_range_limits=False)[source]#

Average wind heading for all datetimes available.

Parameters:

clear_range_limits (bool, optional) – If True, clears the range limits. The default is False.

Return type:

None

average_pressure_profile(clear_range_limits=False)[source]#

Average pressure profile for all datetimes available. The plot also includes sigma contours.

Parameters:

clear_range_limits (bool, optional) – If True, clears the range limits. The default is False.

Return type:

None

average_temperature_profile(clear_range_limits=False)[source]#

Average temperature profile for all datetimes available. The plot also includes sigma contours.

Parameters:

clear_range_limits (bool, optional) – If True, clears the range limits. The default is False.

Return type:

None

static plot_wind_rose(wind_direction, wind_speed, bins=None, title=None, fig=None, rect=None)[source]#

Plot a windrose given the data.

Parameters:
  • wind_direction (list[float]) – The wind direction.

  • wind_speed (list[float]) – The wind speed

  • bins (1D array or integer, optional) – number of bins, or a sequence of bins variable. If not set, bins=6, then bins=linspace(min(var), max(var), 6)

  • title (str, optional) – Title of the plot

  • fig (matplotlib.pyplot.figure, optional) – Figure to plot the windrose

Return type:

WindroseAxes

average_wind_rose_specific_hour(hour, fig=None)[source]#

Plot a specific hour of the average windrose

Parameters:
  • hour (int) – Hour to be plotted

  • fig (matplotlib.pyplot.figure) – Figure to plot the windrose

Return type:

None

average_wind_rose_grid()[source]#

Plot wind roses for all hours of a day, in a grid like plot.

Return type:

None

animate_average_wind_rose(figsize=(5, 5), filename='wind_rose.gif')[source]#

Animates the wind_rose of an average day. The inputs of a wind_rose are the location of the place where we want to analyze, (x,y,z). The data is assembled by hour, which means, the windrose of a specific hour is generated by bringing together the data of all of the days available for that specific hour. It’s possible to change the size of the gif using the parameter figsize, which is the height and width in inches.

Parameters:
  • figsize (tuple, optional) – Size of the figure in inches, (width, height). The default is (8, 8).

  • filename (str) – Name of the file to save the gif. The default is “wind_rose.gif”.

Returns:

Image

Return type:

ipywidgets.widget_media.Image

wind_gust_distribution_grid()[source]#

Plots shown in the animation of how the wind gust distribution varies throughout the day.

Return type:

None

animate_wind_gust_distribution()[source]#

Animation of how the wind gust distribution varies throughout the day. Each frame is a histogram of the wind gust distribution for a specific hour.

Returns:

HTML – The animation as an HTML object

Return type:

IPython.core.display.HTML

surface_wind_speed_distribution_grid(wind_speed_limit=False)[source]#

Plots shown in the animation of how the sustained surface wind speed distribution varies throughout the day. The plots are histograms of the wind speed distribution for a specific hour. The plots are arranged in a grid like plot.

Parameters:

wind_speed_limit (bool, optional) – Whether to plot the wind speed limit as a vertical line

Return type:

None

animate_surface_wind_speed_distribution(wind_speed_limit=False)[source]#

Animation of how the sustained surface wind speed distribution varies throughout the day. Each frame is a histogram of the wind speed distribution for a specific hour.

Parameters:

wind_speed_limit (bool, optional) – Whether to plot the wind speed limit as a vertical line

Returns:

HTML

Return type:

IPython.core.display.HTML

wind_speed_profile_grid(clear_range_limits=False)[source]#

Creates a grid of plots with the wind profile over the average day. Each subplot represents a different hour of the day.

Parameters:

clear_range_limits (bool, optional) – Whether to clear the sky range limits or not, by default False

Return type:

None

wind_heading_profile_grid(clear_range_limits=False)[source]#

Creates a grid of plots with the wind heading profile over the average day. Each subplot represents a different hour of the day.

Parameters:

clear_range_limits (bool, optional) – Whether to clear the sky range limits or not, by default False. This is useful when the launch site is constrained in terms or altitude.

Return type:

None

animate_wind_speed_profile(clear_range_limits=False)[source]#

Animation of how wind profile evolves throughout an average day.

Parameters:

clear_range_limits (bool, optional) – Whether to clear the sky range limits or not, by default False. This is useful when the launch site is constrained in terms or altitude.

animate_wind_heading_profile(clear_range_limits=False)[source]#

Animation of how the wind heading profile evolves throughout an average day. Each frame is a different hour of the day.

Parameters:

clear_range_limits (bool, optional) – Whether to clear the sky range limits or not, by default False. This is useful when the launch site is constrained in terms or altitude.

all_animations()[source]#

Plots all the available animations together

Return type:

None

all_plots()[source]#

Plots all the available plots together, this avoids having animations

Return type:

None

info()[source]#

Plots only the most important plots together. This method simply invokes the wind_gust_distribution, average_wind_speed_profile, wind_speed_profile_grid and wind_heading_profile_grid methods.

Return type:

None

_EnvironmentAnalysisPlots__beaufort_wind_scale(units, max_wind_speed=None)#

Returns a list of bins equivalent to the Beaufort wind scale in the desired unit system.

Parameters:
  • units (str) – Desired units for wind speed. Options are: “knot”, “mph”, “m/s”, “ft/s: and “km/h”.

  • max_wind_speed (float) – Maximum wind speed to be included in the scale. Should be expressed in the same unit as the units parameter.

Return type:

list[float]

all()[source]#

Plots all the available plots and animations together. This method simply invokes the all_plots and all_animations methods.

Return type:

None