Skip to content

Commit a5f67b4

Browse files
DOC: add reference for reshaping thrust curve in documentation and improve method docstring
1 parent 07b9d57 commit a5f67b4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/user/motors/thrust.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ class also supports them. Let's see how to use it.
164164
)
165165
solid_lambda.info()
166166

167+
.. _reshaping_thrust_curve:
168+
167169
Reshaping and interpolating the thrust curve
168170
--------------------------------------------
169171

rocketpy/motors/motor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,8 @@ def propellant_I_23(self):
878878
def reshape_thrust_curve(thrust, new_burn_time, total_impulse):
879879
"""Transforms the thrust curve supplied by changing its total
880880
burn time and/or its total impulse, without altering the
881-
general shape of the curve.
881+
general shape of the curve. This method does not mutate the original
882+
object, it only returns a new thrust curve
882883
883884
Parameters
884885
----------
@@ -893,6 +894,11 @@ def reshape_thrust_curve(thrust, new_burn_time, total_impulse):
893894
-------
894895
Function
895896
Reshaped thrust curve.
897+
898+
See Also
899+
--------
900+
See :ref:`_reshaping_thrust_curve` for examples on how to use this
901+
reshaping method.
896902
"""
897903
# Retrieve current thrust curve data points
898904
time_array, thrust_array = thrust.x_array, thrust.y_array

0 commit comments

Comments
 (0)