diff --git a/docs/user/function.rst b/docs/user/function.rst index bd40d4dad..ed78fdd13 100644 --- a/docs/user/function.rst +++ b/docs/user/function.rst @@ -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 ~~~~~~~~~~~~~~~ diff --git a/docs/user/motors/thrust.rst b/docs/user/motors/thrust.rst index 0642247af..e83e70617 100644 --- a/docs/user/motors/thrust.rst +++ b/docs/user/motors/thrust.rst @@ -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: diff --git a/docs/user/rocket.rst b/docs/user/rocket.rst index ddd6fbfb4..9846ac9b5 100644 --- a/docs/user/rocket.rst +++ b/docs/user/rocket.rst @@ -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 diff --git a/rocketpy/motors/hybrid_motor.py b/rocketpy/motors/hybrid_motor.py index 92f386177..63c84e4de 100644 --- a/rocketpy/motors/hybrid_motor.py +++ b/rocketpy/motors/hybrid_motor.py @@ -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 ` dry_mass : int, float diff --git a/rocketpy/motors/liquid_motor.py b/rocketpy/motors/liquid_motor.py index 68da73fbe..ac525b379 100644 --- a/rocketpy/motors/liquid_motor.py +++ b/rocketpy/motors/liquid_motor.py @@ -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 ` dry_mass : int, float diff --git a/rocketpy/motors/motor.py b/rocketpy/motors/motor.py index 1af08d7f1..72797a641 100644 --- a/rocketpy/motors/motor.py +++ b/rocketpy/motors/motor.py @@ -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 ` @@ -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. diff --git a/rocketpy/motors/solid_motor.py b/rocketpy/motors/solid_motor.py index fc7109392..b63b416a7 100644 --- a/rocketpy/motors/solid_motor.py +++ b/rocketpy/motors/solid_motor.py @@ -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 ` nozzle_radius : int, float diff --git a/rocketpy/rocket/aero_surface.py b/rocketpy/rocket/aero_surface.py index 82cafdd2a..7333ce028 100644 --- a/rocketpy/rocket/aero_surface.py +++ b/rocketpy/rocket/aero_surface.py @@ -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. @@ -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. @@ -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. diff --git a/rocketpy/rocket/rocket.py b/rocketpy/rocket/rocket.py index 947c82acd..693952b60 100644 --- a/rocketpy/rocket/rocket.py +++ b/rocketpy/rocket/rocket.py @@ -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. @@ -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.