Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Update CSV Header Related Docs #495

Merged
merged 5 commits into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ straightforward as possible.
### Changed

- ENH: Function Reverse Arithmetic Priority [#488](https://github.com/RocketPy-Team/RocketPy/pull/488)
- DOC: Update Header Related Docs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MateusStano you don't need to include this in the change log. From the user's perspective, it's irrelevant.


### Fixed

Expand Down
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
3 changes: 0 additions & 3 deletions docs/user/rocket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ 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**.

.. tip::
Getting a drag curve can be a challenging task. To get really accurate
drag curves, you can use CFD software or wind tunnel data.
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
Loading