ogstools.ogs6py.curves module#
- class ogstools.ogs6py.curves.Curves[source]#
Bases:
BuildTreeClass to create the curve section of the project file.
- coords(name)[source]#
Return the coords of a named curve as a numpy array.
- Parameters:
name (
str) – Curve name as defined in the <name> element.- Return type:
- Returns:
1-D array of coordinate values.
- Raises:
KeyError – If no curve with the given name exists.
FileNotFoundError – If the binary file for a file-based curve is not resolved.
- values(name)[source]#
Return the values of a named curve as a numpy array.
- Parameters:
name (
str) – Curve name as defined in the <name> element.- Return type:
- Returns:
1-D array of curve values corresponding to each coord.
- Raises:
KeyError – If no curve with the given name exists.
FileNotFoundError – If the binary file for a file-based curve is not resolved.
- add_curve_from_file(name, coords, values)[source]#
Add a curve whose data is read from binary files.
The binary files must be in little-endian double precision format. Only the file basenames are stored in the project file; if full paths are given,
Project.save()copies the files to the project directory.