diff --git a/rocketpy/environment/environment.py b/rocketpy/environment/environment.py index 8e4fb6fc4..b6b2f6aa3 100644 --- a/rocketpy/environment/environment.py +++ b/rocketpy/environment/environment.py @@ -95,7 +95,7 @@ class Environment: # pylint: disable=too-many-public-methods True if the user already set a topographic profile. False otherwise. Environment.max_expected_height : float Maximum altitude in meters to keep weather data. The altitude must be - above sea level (ASL). Especially useful for controlling plottings. + above sea level (ASL). Especially useful for controlling plots. Can be altered as desired by doing `max_expected_height = number`. Environment.pressure_ISA : Function Air pressure in Pa as a function of altitude as defined by the @@ -962,7 +962,7 @@ def set_atmospheric_model( # pylint: disable=too-many-branches .. note:: - Time referece for the Forecasts are: + Time reference for the Forecasts are: - ``GFS``: `Global` - 0.25deg resolution - Updates every 6 hours, forecast for 81 points spaced by 3 hours diff --git a/rocketpy/mathutils/function.py b/rocketpy/mathutils/function.py index d10ffe89a..d4dd6b806 100644 --- a/rocketpy/mathutils/function.py +++ b/rocketpy/mathutils/function.py @@ -1191,7 +1191,7 @@ def plot(self, *args, **kwargs): elif self.__dom_dim__ == 2: self.plot_2d(*args, **kwargs) else: - print("Error: Only functions with 1D or 2D domains are plottable!") + print("Error: Only functions with 1D or 2D domains can be plotted.") def plot1D(self, *args, **kwargs): """Deprecated method, use Function.plot_1d instead.""" @@ -2614,8 +2614,8 @@ def isbijective(self): return len(distinct_map) == len(x_data_distinct) == len(y_data_distinct) else: raise TypeError( - "Only Functions whose source is a list of points can be " - "checked for bijectivity." + "`isbijective()` method only supports Functions whose " + "source is an array." ) def is_strictly_bijective(self): @@ -2667,8 +2667,8 @@ def is_strictly_bijective(self): return np.all(y_data_diff >= 0) or np.all(y_data_diff <= 0) else: raise TypeError( - "Only Functions whose source is a list of points can be " - "checked for bijectivity." + "`is_strictly_bijective()` method only supports Functions " + "whose source is an array." ) def inverse_function(self, approx_func=None, tol=1e-4): @@ -2678,8 +2678,9 @@ def inverse_function(self, approx_func=None, tol=1e-4): and only if F is bijective. Makes the domain the range and the range the domain. - If the Function is given by a list of points, its bijectivity is - checked and an error is raised if it is not bijective. + If the Function is given by a list of points, the method + `is_strictly_bijective()` is called and an error is raised if the + Function is not bijective. If the Function is given by a function, its bijection is not checked and may lead to inaccuracies outside of its bijective region. diff --git a/rocketpy/simulation/monte_carlo.py b/rocketpy/simulation/monte_carlo.py index 0e3a06bd3..cbe7b6734 100644 --- a/rocketpy/simulation/monte_carlo.py +++ b/rocketpy/simulation/monte_carlo.py @@ -397,10 +397,10 @@ def __check_export_list(self, export_list): "lateral_surface_wind", } ) - # NOTE: exportables needs to be updated with Flight numerical properties - # example: You added the property 'inclination' to Flight, so you may - # need to add it to exportables as well. But don't add other types. - exportables = set( + # NOTE: this list needs to be updated with Flight numerical properties + # example: You added the property 'inclination' to Flight. + # But don't add other types. + can_be_exported = set( { "inclination", "heading", @@ -456,7 +456,7 @@ def __check_export_list(self, export_list): raise TypeError("Variables in export_list must be strings.") # Checks if attribute is not valid - if attr not in exportables: + if attr not in can_be_exported: raise ValueError( f"Attribute '{attr}' can not be exported. Check export_list." )