Last updated on Jun 04, 2026.

netsse.dataset#

Functions for handling example datasets that are used in the example scripts included in the NetSSE documentation for illustration purposes.

Copyright (C) 2023-2026 Technical University of Denmark, R.E.G. Mounet

This code is part of the NetSSE software.

NetSSE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

NetSSE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

To credit the author, users are encouraged to use below reference:

Mounet, R. E. G., & Nielsen, U. D. NetSSE: An open-source Python package
for network-based sea state estimation from ships, buoys, and other
observation platforms (version 2.3). Technical University of Denmark,
GitLab. July 2026. https://doi.org/10.11583/DTU.26379811.

Last updated on 04-06-2026 by R.E.G. Mounet

Functions#

load_example_data(name, **kwargs)

Load an example dataset from the NetSSE package's data directory.

Module Contents#

netsse.dataset.load_example_data(name, **kwargs)[source]#

Load an example dataset from the NetSSE package’s data directory.

Parameters:
  • name (str) – Name of the dataset file, including the extension (e.g., "example_WP_meas.csv").

  • **kwargs – Additional keyword arguments to pass to the data loading function (e.g., index_col=0 for pd.read_csv).

Returns:

The loaded dataset as a pandas DataFrame (for CSV files) or a NumPy array (for TXT files).

Return type:

pd.DataFrame or np.ndarray

Raises:

ValueError – If the file format is unsupported (not CSV or TXT).

Examples

Load a CSV dataset as a pandas DataFrame:

>>> df = load_example_data("example_WP_meas.csv", index_col=0)

Load a TXT dataset as a NumPy array:

>>> arr = load_example_data("example_spectrum.txt", delimiter="\t")