pysteps.feature.tstorm.detection¶
-
pysteps.feature.tstorm.
detection
(input_image, minref=35, maxref=48, mindiff=6, minsize=50, minmax=41, mindis=10, output_feat=False, time='000000000')¶ This function detects thunderstorms using a multi-threshold approach. It is recommended to use a 2-D Cartesian maximum reflectivity composite, however the function will process any 2-D array. The thunderstorm cell detection requires both scikit-image and pandas.
- Parameters
- input_image: array-like
Array of shape (m,n) containing input image, usually maximum reflectivity in dBZ with a resolution of 1 km. Nan values are ignored.
- minref: float, optional
Lower threshold for object detection. Lower values will be set to NaN. The default is 35 dBZ.
- maxref: float, optional
Upper threshold for object detection. Higher values will be set to this value. The default is 48 dBZ.
- mindiff: float, optional
Minimal difference between two identified maxima within same area to split area into two objects. The default is 6 dBZ.
- minsize: float, optional
Minimal area for possible detected object. The default is 50 pixels.
- minmax: float, optional
Minimum value of maximum in identified objects. Objects with a maximum lower than this will be discarded. The default is 41 dBZ.
- mindis: float, optional
Minimum distance between two maxima of identified objects. Objects with a smaller distance will be merged. The default is 10 km.
- output_feat: bool, optional
Set to True to return only the cell coordinates.
- time: string, optional
Date and time as string. Used to label time in the resulting dataframe. The default is ‘000000000’.
- Returns
- cells_id: pandas dataframe
Pandas dataframe containing all detected cells and their respective properties corresponding to the input image. Columns of dataframe: ID - cell ID, time - time stamp, x - array of all x-coordinates of cell, y - array of all y-coordinates of cell, cen_x - x-coordinate of cell centroid, cen_y - y-coordinate of cell centroid, max_ref - maximum (reflectivity) value of cell, cont - cell contours
- labels: array-like
Array of shape (m,n), grid of labelled cells.