LabelledRegionPairing#

class rojak.atmosphere.feature_composite.LabelledRegionPairing[source]#

Pair each observation with the centre that owns the grid cell nearest to it, if any.

The owner is read from the feature’s labels at the observation’s time step, so each observation is paired with at most one centre. Observations more than half a grid cell beyond the outermost grid points are not paired. Observation longitudes are converted to the grid’s convention for the lookup only; the pair table keeps the original values.

Compatible with any feature that labels regions (has_labels), whatever its geometry.

__init__()[source]#
Return type:

None

Methods

__init__()

check_compatible(feature)

Raise if feature does not label regions.

pair(observations, feature_chunk, chunk, *, ...)

Pair each observation with the centre owning its nearest grid cell; see PairingStrategy.pair().