Im working on a detecting alogrythm for detecting storm cells on a radar imagery. I have radar data in 2d numpy arrays that we plot on a basemap. We got azymuth and rangebins data that we put in a polargrid with lat/lon coordinates.
The values in our numpy array are based on dBZ height in range from zero till maximum 80.
Here a printout of our numpy array named data:
[[-31.5 -31.5 16.5 ..., -31.5 -31.5 -31.5]
[-31.5 -31.5 -31.5 ..., -31.5 -31.5 -31.5]
[-31.5 -31.5 -31.5 ..., -31.5 -31.5 -31.5]
...,
[-31.5 -31.5 -31.5 ..., -31.5 -31.5 -31.5]
[-31.5 -31.5 -31.5 ..., -31.5 -31.5 -31.5]
[-31.5 11.5 -31.5 ..., -31.5 -31.5 -31.5]]
While -31.5 stands for null or hidden values. We only need the positive values. Even decimals make no sense.
So what do we want to do:
Detect the clusters of high values, and make them a red square around that cell. I have tried something with a image mask but i got stuck there. Even i dont know if an image mask is a good solution for this issue.
Here is my code to process the data.
gain = 0.5
offset = -31.5
az = np.arange(0.,360.,360./scan["scan_number_azim"])
r = np.arange(scan["scan_start_azim"], (scan["scan_start_azim"] + scan["scan_number_range"] * rscale), rscale)
data = gain * raw["scan2/scan_Z_data"] + offset
So the count of the detections would fluctuate very often. Maybe i need something like DBscan also ?
Can someone help me up with this ?