I need to combine wave-spectra with vessel RAOs to calculate vessel responses. In order to do so I may need to interpolate the wave-spectrum to a different frequency grid.
I can not find what the exact definition of the spectrum is. Is it defined by
connecting the efth/freq values?
or
by energy bins with the centers defined by freq, width by dfarr and height by efth:
The code to calculate the spectral energy seems to use 2. But the _interp_freq method seems to assume 1.
If definition 2 is used, then I need to use a slightly different interpolation formula to correctly account for the difference in bin-widths. Tried to sketch it below:
For the energy to be conserved when interpolating, the areas A and B need to be identical. This can be done by placing an additional point on the intersection of the bins when interpolating.
I need to combine wave-spectra with vessel RAOs to calculate vessel responses. In order to do so I may need to interpolate the wave-spectrum to a different frequency grid.
I can not find what the exact definition of the spectrum is. Is it defined by
or
The code to calculate the spectral energy seems to use 2. But the _interp_freq method seems to assume 1.
If definition 2 is used, then I need to use a slightly different interpolation formula to correctly account for the difference in bin-widths. Tried to sketch it below:
For the energy to be conserved when interpolating, the areas A and B need to be identical. This can be done by placing an additional point on the intersection of the bins when interpolating.