DistancePairing#
- class rojak.atmosphere.feature_composite.DistancePairing(max_distance_km, *, shape='circle')[source]#
Pair each observation with every centre at the same time step within
max_distance_kmof it.With
shape="circle", the great-circle (haversine) distance to the centre is at mostmax_distance_km. Withshape="square",|x_km|and|y_km|in the centre’s km frame are both at mostmax_distance_km, the support of the gridded composites. An observation can be paired with several centres.Compatible with
POINTfeatures only: neighbouring centres along aLINEfeature would count the same observation many times.- shape#
Whether the distance is great-circle or per axis of the km frame.
- Type:
Literal[“circle”, “square”]
- Raises:
ValueError – If
max_distance_kmis not positive, orshapeis neither"circle"nor"square".- Parameters:
Methods
__init__(max_distance_km, *[, shape])check_compatible(feature)Raise if
featureis aLINEfeature.pair(observations, feature_chunk, chunk, *, ...)Pair each observation with every centre within the distance; see
PairingStrategy.pair().Attributes