4Subsea / waveresponse-python

Vessel motion and wave utilities
https://docs.4insight.io/waveresponse/python/latest/
MIT License
12 stars 4 forks source link

Future plans, possible contribution #54

Open RubendeBruin opened 1 year ago

RubendeBruin commented 1 year ago

Hi, I just stumbled upon this repository. Looks promising and well maintained! I'm the author of MaFreDo (https://mafredo.readthedocs.io/en/latest/index.html) which has some of the same functionality in terms of RAO regridding but with only me as contributor. I made it just because I needed it at that time, but it may be open for merging it into this repository instead if you are open for it.

Would you be open to discuss merging the MaFreDo functionality into this repository? That would involve (in due time):

For myself I would use the repository for post-processing RAOs generated with DAVE (usedave.nl) to plot and visualize vessel responses.

vegard-solum-4ss commented 1 year ago

Hi, thanks for your feedback @RubendeBruin. And sorry for the late reply.

I’m glad that you find the package useful! Any suggestions and/or contributions are very welcome! Regarding your suggestions:

Adding a "heading" property to 1d spectra to indicate their direction:

Adding Hs/Tp calculation from spectrum data (edit: already present):

Making an import function for wavespectra from the wavespectra package (for reading model or measurement data):

Rewriting the interpolate functions such that phase and amplitude are interpolated independently:

Adding some definitions about phase angle definitions (leading, lagging):

A squash function to transform a 2d spectrum into a 1d (edit: already present):

RubendeBruin commented 5 months ago

Importing from wavespectra

Making an import function for wavespectra from the wavespectra package (for reading model or measurement data):

Can you elaborate a bit more on this?

I've implemented this here:.

Phase interpolation

Closed here, continues in #60

Adding a "heading" property to 1d spectra to indicate their direction:

Where do you suggest to add such heading information?

Currently, the package does not have a designated class to handle 1-D spectra (but we may implement it in the future). As it is now, 1-D spectra are simply handled as numpy arrays of frequency and spectrum values.

However, the package has functionality for converting a 1-D spectrum into a 2-D spectrum, and it has functionality for squashing a 2-D spectrum into a 1-D spectrum (as you have pointed out). And when you construct a 2-D spectrum from 1-D, you must provide a peak direction (as well as a spreading function).

Maybee it is sufficient to have a 2D spectrum with only a single heading. Will test and get back to this.