wavespectra.partition.partition.Partition.bbox#

Partition.bbox(bboxes)[source]#

Partition based on user-defined bounding boxes in frequency-direction space.

BBOX partitions the spectra based on user-defined bounding boxes in frequency-direction space.

Parameters:

bboxes (-) – List of dictionaries with keys fmin, fmax, dmin and dmax specifying the boundaries of each bounding box.

Returns:

Partitioned spectra with extra part dimension

with indices ordered as in the list of dictionaries.

Return type:

  • dspart (xr.DataArray, xr.Dataset)

Note

  • Non-specified bounds in each bbox dict are defined from the bounds of the freq / dir bounds in the spectrum, e.g., fmin=min(freq).

  • Bounding boxes must not overlap.

  • Bounding boxes cannot wrap across the 360-degree discontinuity, i.e., dmin must be smaller than dmax.

  • Last part index is defined by spectral bins not covered by any bboxes.