FeatureChunk#
- class rojak.atmosphere.feature_composite.extension.FeatureChunk(centres, labels)[source]#
The centres of a feature found in one time chunk, as returned by a
FeatureTabulator.- Parameters:
centres (pd.DataFrame)
labels (np.ndarray | None)
- centres#
One row per centre, with the columns named by
Column:CENTRE_ID(unique across all chunks, e.g. encoded from the time and grid indices),FEATURE_ID(equal toCENTRE_IDfor aPOINTfeature; shared by the centres along one instance of aLINEfeature),TIME_INDEX(along the whole time axis, seeChunkInfo.first_time_index),CENTRE_TIME,CENTRE_LATandCENTRE_LON. A feature found on the grid also fillsCENTRE_LAT_INDEXandCENTRE_LON_INDEX, andCENTRE_VALUEwhere the feature has a value at its centre.- Type:
pandas.DataFrame
- labels#
Integer array with the shape
(time, lat, lon)of the chunk’s blocks, holding theCENTRE_IDof the centre that owns each grid cell, or 0 where no centre does.Noneif the feature does not label regions, seeFeatureSource.has_labels.- Type:
numpy.ndarray | None
- __init__(centres, labels)[source]#
- Parameters:
centres (pd.DataFrame)
labels (np.ndarray | None)
- Return type:
None
Methods
__init__(centres, labels)Attributes