Im is working on a detection alogrim for the detection of storm cells in radar images. I have radar data in 2d numpy arrays that we build on a base map. We have data on azimuth and rangefinders, which we put in a half-grid with lat / lon coordinates.
The values โโin our numpy array are based on dBZ heights ranging from zero to a maximum of 80.
Here's a listing of our numpy array with 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]]
So far, a value of -31.5 means null or hidden values. We need only positive values. Even decimal places make no sense.
So what we want to do:
Detect clusters with high values โโand make them a red square around this cell. I tried something with an image mask, but I was stuck there. Even I do not know if an image mask is a good solution to this problem.
Here is my data processing code.
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
Thus, the count of detections will fluctuate very often. Maybe I also need something like DBscan?
Can someone help me with this?