netsse.base#
Class definitions for the NetSSE software.
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.2). Technical University of Denmark,
GitLab. February 2026. https://doi.org/10.11583/DTU.26379811.
Last updated on 20-02-2026 by R.E.G. Mounet
Classes#
Initialises the buoy as a platform. |
|
Initialises the data collection. |
|
Initialises the network. |
|
Initialises the operation. |
|
Initialises the platform. |
|
Initialises the sea state at a given time and geographical position in the ocean. |
|
Initialises the sea state collection. |
|
Initialises the wave radar as a platform. |
|
Initialises the wave radar as a platform. |
|
Initialises the wave sequence. |
|
Initialises the sea state at a given time and geographical position in the ocean. |
Module Contents#
- class netsse.base.Buoy(name=None, owner='undefined', operations=[], seastate_collections=[], type='undefined')[source]#
Bases:
PlatformInitialises the buoy as a platform.
- Parameters:
Example
>>> buoy1 = netsse.base.Buoy()
- class netsse.base.Collection(area='undefined', nature='undefined', origin='undefined', datetime_start=datetime.now(), datetime_end=datetime.now(), lat_min=0, lat_max=0, lon_min=0, lon_max=0)[source]#
Initialises the data collection.
- Parameters:
area (str, default 'undefined') β Area of data collection.
nature (str, default 'undefined') β Nature of the data collection.
origin (str or object, default 'undefined') β Origin or source of the data collection.
datetime_start (datetime object, default datetime.now()) β Time coverage of the data collection.
datetime_end (datetime object, default datetime.now()) β Time coverage of the data collection.
lat_min (float, default 0) β Latitude [deg North] at the southern/northern edge of the geographical domain covered by the data collection.
lat_max (float, default 0) β Latitude [deg North] at the southern/northern edge of the geographical domain covered by the data collection.
lon_min (float, default 0) β Longitude [deg East] at the western/eastern edge of the geographical domain covered by the data collection.
lon_max (float, default 0) β Longitude [deg East] at the western/eastern edge of the geographical domain covered by the data collection.
See also
Example
>>> collec1 = netsse.base.Collection()
- class netsse.base.Network(name=None, nature='undefined', platforms=[])[source]#
Initialises the network.
- Parameters:
See also
Example
>>> plaform1 = netsse.base.Platform() >>> network = netsse.base.Network(platforms=[plaform1])
- add_platform(*args, ignore_msg=False)[source]#
Add a Platform instance to the list of platforms in the network.
- Parameters:
*args (Platform object) β Platform to be added to the network.
ignore_msg (bool, default False) β If False, messages are printed to inform about any changes made to the network. If True, thoses messages are turned off.
Example
>>> plaform2 = netsse.base.Platform() >>> network.add_platform(platform2,ignore_msg=True)
- class netsse.base.Operation(id=None, area='undefined', nature='undefined', origin='undefined', datetime_start=datetime.now(), datetime_end=datetime.now(), lat_min=0, lat_max=0, lon_min=0, lon_max=0, segments=[])[source]#
Initialises the operation.
- Parameters:
id (str, optional) β Operation identifier. By default, the id string is generated randomly in the format
OperXXXXX.segments (list, default []) β
List of segments (as Segment instances) gathered during the operation.
Note
Consult
netsse.base.Collection.__init__()for information on the other parameters.area (str)
nature (str)
lat_min (float)
lat_max (float)
lon_min (float)
lon_max (float)
See also
Collection,Platform,SegmentExample
>>> operation1 = netsse.base.Operation()
- class netsse.base.Platform(name=None, owner='undefined', operations=[], seastate_collections=[])[source]#
Initialises the platform.
- Parameters:
name (str, optional) β Name of the platform. By default, the name string is generated randomly in the format
PlatformXXXXX.owner (str, default 'undefined') β Platform owner.
operations (list, default []) β List of operations.
seastate_collections (list, default []) β List of sea state collections (as SeaStateCollec instances).
Example
>>> operation1 = netsse.base.Operation() >>> seastatecollec1 = netsse.base.SeaStateCollec() >>> platform1 = netsse.base.Platform(name='MyPlatform',owner='SomeCompany', ... operations=[operation1], ... seastate_collections=[seastatecollec1])
- add_operation(*args, ignore_msg=False)[source]#
Add an Operation instance to the list of operations of the platform.
- Parameters:
*args (Operation object) β Operation to be added to the platform.
ignore_msg (bool, default False) β If False, messages are printed to inform about any changes made to the platform. If True, thoses messages are turned off.
Example
>>> operation2 = netsse.base.Operation() >>> platform1.add_operation(operation2,ignore_msg=True)
- add_seastatecollec(*args, ignore_msg=False)[source]#
Add a SeaStateCollec instance to the list of sea state collections of the platform.
- Parameters:
*args (SeaStateCollec object) β Collections to be added to the platform.
ignore_msg (bool, default False) β If False, messages are printed to inform about any changes made to the platform. If True, thoses messages are turned off.
Example
>>> seastatecollec2 = netsse.base.SeaStateCollec() >>> platform1.add_seastatecollec(seastatecollec2,ignore_msg=True)
- remove_operation(*args, ignore_msg=False)[source]#
Remove an existing Operation instance from the list of operations of the platform.
- Parameters:
*args (Operation object or str) β Operation to be removed from the network. Identified by the corresponding identifier or Operation instance.
ignore_msg (bool, default False) β If False, messages are printed to inform about any changes made to the platform. If True, thoses messages are turned off.
Example
>>> platform1.remove_operation(platform1,ignore_msg=True)
- remove_seastatecollec(*args, ignore_msg=False)[source]#
Remove an existing SeaStateCollec instance from the list of sea state collections of the platform.
- Parameters:
*args (SeaStateCollec object or str) β Collections to be removed from the network. Identified by the corresponding identifier or SeaStateCollec instance.
ignore_msg (bool, default False) β If False, messages are printed to inform about any changes made to the platform. If True, thoses messages are turned off.
Example
>>> platform1.remove_seastatecollec(seastatecollec1,ignore_msg=True)
- class netsse.base.SeaState(Hs=0, Tp=0, timestamp=datetime.now(), lat=0, lon=0, depth=0, duration=30 * 60)[source]#
Initialises the sea state at a given time and geographical position in the ocean.
- Parameters:
Hs (float, default 0) β Significant wave height [m].
Tp (float, default 0) β Peak wave period [s].
timestamp (datetime object, default datetime.now()) β Timestamp at which the sea state applies.
lat (float, default 0) β Latitude [degrees North].
lon (float, default 0) β Longitude [degrees East].
depth (float, default 0) β Water depth [m] at the studied location.
duration (float, optional) β Time duration of the sea state [s], by default 30*60 = 1800 s.
Examples
>>> seastate = SeaState(Hs,Tp,timestamp,lat,lon,depth,duration)
- class netsse.base.SeaStateCollec(id=None, area='undefined', nature='undefined', origin='undefined', datetime_start=datetime.now(), datetime_end=datetime.now(), lat_min=0, lat_max=0, lon_min=0, lon_max=0, seastates=[])[source]#
Initialises the sea state collection.
- Parameters:
id (str, optional) β Data collection identifier. By default, the id string is generated randomly in the format
CollecXXXXX.seastates (list, default []) β
List of sea states (as SeaState instances) gathered in the data collection.
Note
Consult
netsse.base.Collection.__init__()for information on the other parameters.area (str)
nature (str)
lat_min (float)
lat_max (float)
lon_min (float)
lon_max (float)
See also
Example
>>> seastatecollec1 = netsse.base.SeaStateCollec()
- class netsse.base.Spectrum(freq=np.linspace(0, 1, 100), ord=np.zeros((100,)), unit_freq='Hz')[source]#
- class netsse.base.Vessel(name=None, owner='undefined', operations=[], seastate_collections=[], type='undefined', params={}, raos=[])[source]#
Bases:
PlatformInitialises the wave radar as a platform.
- Parameters:
type (str, default 'undefined') β Wave radar type.
params (dict, default {}) β Vessel main dimensions and other geometrical parameters.
raos (list, default []) β
Vessel response amplitude operators.
Note
Consult
netsse.base.Platform.__init__()for information on the other parameters.name (str)
owner (str)
operations (list)
seastate_collections (list)
Example
>>> vessel1 = netsse.base.Vessel(params={'L':200,'B':25,'T':30})
- class netsse.base.WaveRadar(name=None, owner='undefined', operations=[], seastate_collections=[], type='undefined')[source]#
Bases:
PlatformInitialises the wave radar as a platform.
- Parameters:
Example
>>> radar1 = netsse.base.WaveRadar()
- class netsse.base.WaveSequence(Hs=0, Tp=0, timestamp=datetime.now(), lat=0, lon=0, depth=0, wave=None, time=None, fs=10)[source]#
Bases:
SeaStateInitialises the wave sequence.
- Parameters:
wave (array-like of shape (Nt,), optional) β Sea surface elevation time-series [m]. By default
None.time (array-like of shape (Nt,), optional) β Vector of time [s], by default
None.fs (float, default 10) β
Sampling frequency [Hz].
Note
Consult
netsse.base.SeaState.__init__()for information on the other parameters.
- Raises:
ValueError β In case the input
timeandwavevectors do not have the same length.
Examples
>>> waveseq = ... WaveSequence(Hs, Tp, timestamp, lat, lon, depth, wave, time)
- class netsse.base.WaveSpectrum(Hs=np.nan, Tp=np.nan, freq=np.linspace(0, 1, 100), ord=np.zeros((100,)), unit_freq='Hz', timestamp=datetime.now(), lat=0, lon=0, depth=0, duration=30 * 60)[source]#
-
Initialises the sea state at a given time and geographical position in the ocean.
- Parameters:
Hs (float, default 0) β Significant wave height [m].
Tp (float, default 0) β Peak wave period [s].
timestamp (datetime object, default datetime.now()) β Timestamp at which the sea state applies.
lat (float, default 0) β Latitude [degrees North].
lon (float, default 0) β Longitude [degrees East].
depth (float, default 0) β Water depth [m] at the studied location.
duration (float, optional) β Time duration of the sea state [s], by default 30*60 = 1800 s.
Examples
>>> seastate = SeaState(Hs,Tp,timestamp,lat,lon,depth,duration)