spherical_to_centroids(r, phi, theta, sitecoords, proj=None)¶
Generate 3-D centroids of the radar bins from the sperical coordinates (r, phi, theta).
Both azimuth and range arrays are assumed to be equidistant and to contain only unique values. The ranges are assumed to define the exterior boundaries of the range bins (thus they must be positive). The angles are assumed to describe the pointing direction fo the main beam lobe.
For further information refer to the documentation of
- r (
numpy.ndarray) – Array of ranges [m]; r defines the exterior boundaries of the range bins! (not the centroids). Thus, values must be positive!
- phi (
numpy.ndarray) – Array of azimuth angles containing values between 0° and 360°. The angles are assumed to describe the pointing direction fo the main beam lobe! The first angle can start at any values, but make sure the array is sorted continuously positively clockwise and the angles are equidistant. An angle if 0 degree is pointing north.
- theta (float) – Elevation angle of scan
- sitecoords (a sequence of three floats) – the lon/lat/alt coordinates of the radar location
- proj (osr object) – Destination Projection
- output (centroids
numpy.ndarray) – A 3-d array of bin centroids with shape(num_rays, num_bins, 3). The last dimension carries the xyz-coordinates either in aeqd or given proj.
- proj (osr object) – only returned if proj is None
Azimuth angles of 360 deg are internally converted to 0 deg.
- r (