Skip to content

Commit

Permalink
DOC: update header related docs for new Function changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MateusStano committed Nov 29, 2023
1 parent 191ab9f commit d29dc02
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion docs/user/function.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Having the csv file, we can define a ``Function`` object with it:
print(f.source)

.. note::
A header in the csv file is optional, but if present must be in a string like format, i.e. beginning and ending with quotation marks.
A single header line in the csv file is optional.

b. Function Map
~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion docs/user/motors/thrust.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ specify a directory containing a .csv file.
.. note::

The first column of the .csv file must be time in seconds and the second
column must be thrust in Newtons. The file must contain no headers.
column must be thrust in Newtons. The file can contain a single line header.

That can be done as follows:

Expand Down
4 changes: 2 additions & 2 deletions docs/user/rocket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ Here is an example of a drag curve file:
0.9, 0.45696342
1.0, 0.62744566
.. important::
The CSV file must have **no headers**.
.. note::
The CSV file can contain a single line header.

.. tip::
Getting a drag curve can be a challenging task. To get really accurate
Expand Down
8 changes: 4 additions & 4 deletions rocketpy/motors/hybrid_motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ def __init__(
also be given as a callable function, whose argument is time in
seconds and returns the thrust supplied by the motor in the
instant. If a string is given, it must point to a .csv or .eng file.
The .csv file shall contain no headers and the first column must
specify time in seconds, while the second column specifies thrust.
Arrays may also be specified, following rules set by the class
Function. Thrust units are Newtons.
The .csv file can contain a single line header and the first column
must specify time in seconds, while the second column specifies
thrust. Arrays may also be specified, following rules set by the
class Function. Thrust units are Newtons.
.. seealso:: :doc:`Thrust Source Details </user/motors/thrust>`
dry_mass : int, float
Expand Down
8 changes: 4 additions & 4 deletions rocketpy/motors/liquid_motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ def __init__(
also be given as a callable function, whose argument is time in
seconds and returns the thrust supplied by the motor in the
instant. If a string is given, it must point to a .csv or .eng file.
The .csv file shall contain no headers and the first column must
specify time in seconds, while the second column specifies thrust.
Arrays may also be specified, following rules set by the class
Function. Thrust units are Newtons.
The .csv file can contain a single line header and the first column
must specify time in seconds, while the second column specifies
thrust. Arrays may also be specified, following rules set by the
class Function. Thrust units are Newtons.
.. seealso:: :doc:`Thrust Source Details </user/motors/thrust>`
dry_mass : int, float
Expand Down
10 changes: 5 additions & 5 deletions rocketpy/motors/motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ def __init__(
also be given as a callable function, whose argument is time in
seconds and returns the thrust supplied by the motor in the
instant. If a string is given, it must point to a .csv or .eng file.
The .csv file shall contain no headers and the first column must
specify time in seconds, while the second column specifies thrust.
Arrays may also be specified, following rules set by the class
Function. Thrust units are Newtons.
The .csv file can contain a single line header and the first column
must specify time in seconds, while the second column specifies
thrust. Arrays may also be specified, following rules set by the
class Function. Thrust units are Newtons.
.. seealso:: :doc:`Thrust Source Details </user/motors/thrust>`
Expand Down Expand Up @@ -1092,7 +1092,7 @@ def __init__(
also be given as a callable function, whose argument is time in
seconds and returns the thrust supplied by the motor in the
instant. If a string is given, it must point to a .csv or .eng file.
The .csv file shall contain no headers and the first column must
The .csv file can contain a single line header and the first column must
specify time in seconds, while the second column specifies thrust.
Arrays may also be specified, following rules set by the class
Function. Thrust units are Newtons.
Expand Down
8 changes: 4 additions & 4 deletions rocketpy/motors/solid_motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ def __init__(
also be given as a callable function, whose argument is time in
seconds and returns the thrust supplied by the motor in the
instant. If a string is given, it must point to a .csv or .eng file.
The .csv file shall contain no headers and the first column must
specify time in seconds, while the second column specifies thrust.
Arrays may also be specified, following rules set by the class
Function. Thrust units are Newtons.
The .csv file can contain a single line header and the first column
must specify time in seconds, while the second column specifies
thrust. Arrays may also be specified, following rules set by the
class Function. Thrust units are Newtons.
.. seealso:: :doc:`Thrust Source Details </user/motors/thrust>`
nozzle_radius : int, float
Expand Down
12 changes: 6 additions & 6 deletions rocketpy/rocket/aero_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,8 @@ def __init__(
Otherwise, if tuple, fins will be considered as airfoils. The
tuple's first item specifies the airfoil's lift coefficient
by angle of attack and must be either a .csv, .txt, ndarray
or callable. The .csv and .txt files must contain no headers
and the first column must specify the angle of attack, while
or callable. The .csv and .txt files can contain a single line
header and the first column must specify the angle of attack, while
the second column must specify the lift coefficient. The
ndarray should be as [(x0, y0), (x1, y1), (x2, y2), ...]
where x0 is the angle of attack and y0 is the lift coefficient.
Expand Down Expand Up @@ -1037,8 +1037,8 @@ def __init__(
Otherwise, if tuple, fins will be considered as airfoils. The
tuple's first item specifies the airfoil's lift coefficient
by angle of attack and must be either a .csv, .txt, ndarray
or callable. The .csv and .txt files must contain no headers
and the first column must specify the angle of attack, while
or callable. The .csv and .txt files can contain a single line
header and the first column must specify the angle of attack, while
the second column must specify the lift coefficient. The
ndarray should be as [(x0, y0), (x1, y1), (x2, y2), ...]
where x0 is the angle of attack and y0 is the lift coefficient.
Expand Down Expand Up @@ -1379,8 +1379,8 @@ def __init__(
Otherwise, if tuple, fins will be considered as airfoils. The
tuple's first item specifies the airfoil's lift coefficient
by angle of attack and must be either a .csv, .txt, ndarray
or callable. The .csv and .txt files must contain no headers
and the first column must specify the angle of attack, while
or callable. The .csv and .txt files can contain a single line
header and the first column must specify the angle of attack, while
the second column must specify the lift coefficient. The
ndarray should be as [(x0, y0), (x1, y1), (x2, y2), ...]
where x0 is the angle of attack and y0 is the lift coefficient.
Expand Down
8 changes: 4 additions & 4 deletions rocketpy/rocket/rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,8 @@ def add_trapezoidal_fins(
Otherwise, if tuple, fins will be considered as airfoils. The
tuple's first item specifies the airfoil's lift coefficient
by angle of attack and must be either a .csv, .txt, ndarray
or callable. The .csv and .txt files must contain no headers
and the first column must specify the angle of attack, while
or callable. The .csv and .txt files can contain a single line
header and the first column must specify the angle of attack, while
the second column must specify the lift coefficient. The
ndarray should be as [(x0, y0), (x1, y1), (x2, y2), ...]
where x0 is the angle of attack and y0 is the lift coefficient.
Expand Down Expand Up @@ -1036,8 +1036,8 @@ def add_elliptical_fins(
Otherwise, if tuple, fins will be considered as airfoils. The
tuple's first item specifies the airfoil's lift coefficient
by angle of attack and must be either a .csv, .txt, ndarray
or callable. The .csv and .txt files must contain no headers
and the first column must specify the angle of attack, while
or callable. The .csv and .txt files can contain a single line
header and the first column must specify the angle of attack, while
the second column must specify the lift coefficient. The
ndarray should be as [(x0, y0), (x1, y1), (x2, y2), ...]
where x0 is the angle of attack and y0 is the lift coefficient.
Expand Down

0 comments on commit d29dc02

Please sign in to comment.