BinSpec#

class rojak.atmosphere.feature_composite.BinSpec(*, max_km_extent, spacing_km)[source]#

The bins that pairs are counted on, in the km frame of their centre.

Create it with a named constructor, grid().

max_km_extent#

Distance in km from the centre to the outermost bin centres along each axis.

Type:

float

spacing_km#

Distance in km between neighbouring bin centres.

Type:

float

Raises:

ValueError – If max_km_extent or spacing_km is not positive and finite, or max_km_extent is not a whole multiple of spacing_km.

Parameters:
__init__(*, max_km_extent, spacing_km)[source]#
Parameters:
Return type:

None

Methods

__init__(*, max_km_extent, spacing_km)

grid(max_km_extent, spacing_km)

A 2D (y_km, x_km) grid of square bins centred on the centre, as the gridded composites use.

Attributes

coords

Bin centres in km, by dimension.

dims

Names of the binned dimensions, which are also the pair-table columns that are binned; y_km first.

edges

midpoints between the bin centres, extended by half a spacing at each end.

shape

Number of bins along each dimension, in the order of dims.

max_km_extent

spacing_km