Basically, my experimental program is trying to find the number of points that fall within a (e.g., 50km) radius of a valid point at a given time. My data is structured (but I can restructure if need-be) in three separate arrays such:
1_LAT,1_LON,1_TIM
Where 1_LAT,1_LON,1_TIM all contain roughly ~250 values corresponding to Latitude, Longitude (decimal degrees), and time respectively.
I have 20 sets of these arrays (i.e., 1_LAT,1_LON,1_TIM...20_LAT,20_LON,20_TIM).
Here is what I would like to accomplish:
1) Figure out the number of lat/lon sets that fall within a particular radius of each set. For example, how many points fall within a 50km radius of 1_LAT,1_LON at the valid time of 1_TIM from the other 19 sets of points. I would then like to iterate through each valid time to figure out the number of points in the valid radius at each specific point and valid time.
I have attached a picture below to help visually describe.
The black squares represent all the points in the LAT_1/LON_1 arrays. The blue squares represent all the points in the LAT_n/LAT_n arrays.
I would like to count the number of points in each radius at each valid time for each set of lat/lon arrays. The final display would be a summed raster or meshgrid of the denisty (i.e., number of counts / 20) for each grid spot on a geographic basemap image.
I have a feeling that a KDEtree may be the best way to accomplish this, but I have little/no experience with such. Any ideas or suggestions would be greatly appreciated.