Skip to content

Commit b7b2ddf

Browse files
Address code review: improve docstrings and add explicit None defaults
Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
1 parent b4d723b commit b7b2ddf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

rocketpy/rocket/parachute.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ class Parachute:
9494
Function of clean_pressure_signal.
9595
Parachute.radius : float
9696
Length of the non-unique semi-axis (radius) of the inflated hemispheroid
97-
parachute in meters. Estimated from ``cd_s`` if not explicitly provided.
97+
parachute in meters. Estimated from ``cd_s`` using the formula
98+
``R = sqrt(cd_s / (1.4 * π))`` if not explicitly provided.
9899
Parachute.height : float
99100
Length of the unique semi-axis (height) of the inflated hemispheroid
100101
parachute in meters.
@@ -352,8 +353,8 @@ def from_dict(cls, data):
352353
sampling_rate=data["sampling_rate"],
353354
lag=data["lag"],
354355
noise=data["noise"],
355-
radius=data.get("radius"),
356-
height=data.get("height"),
356+
radius=data.get("radius", None),
357+
height=data.get("height", None),
357358
porosity=data.get("porosity", 0.0432),
358359
)
359360

0 commit comments

Comments
 (0)