wavespectra.partition.tracking.match_consecutive_partitions#
- wavespectra.partition.tracking.match_consecutive_partitions(fp, dpm, dfp_sea_max, dfp_swell_max, ddpm_sea_max, ddpm_swell_max)[source]#
Match partitions of consecutive spectra based on evolution of peak frequency and peak direction.
Parameters#
- fp: np.ndarray
Array containing the peak wave frequency for all partitions and the two consecutive time steps. Shape (npartitions, 2).
- dpm: np.ndarray
Array containing the mean peak wave direction for all partitions and the two consecutive time steps. Shape (npartitions, 2).
- dfp_sea_max: float
Maximum delta fp for sea partitions.
- dfp_swell_max: float
Maximum delta fp for swell partitions.
- ddpm_sea_max: float
Maximum delta dpm for sea partitions.
- ddpm_swell_max: float
Maximum delta dpm for swell partitions.
Returns#
- matches: np.ndarray
Array of matches between partitions of consecutive spectra. Array contains value in nth position contains the partition number in the previous time step that matches the partition number n in the current time step. -999 is for nans and -888 is for partitions that have no match.