wradlib.verify.PolarNeighbours#

class wradlib.verify.PolarNeighbours(r, az, site, crs, x, y, *, nnear=9)[source]#

Bases: object

For a set of projected point coordinates, extract the neighbouring bin values from a data set in polar coordinates.

Use as follows:

First, create an instance of PolarNeighbours by passing all the information needed to georeference the polar radar data to the points of interest (see parameters).

Second, use the method extract in order to extract the values from a data array which corresponds to the polar coordinates.

Parameters:

Examples

See Routine verification measures for radar-based precipitation estimates.

extract(vals)[source]#

Extracts the values from an array of shape (azimuth angles, range gages) which correspond to the indices computed during initialisation

Parameters:

vals (numpy.ndarray) – array of shape (…, number of azimuth, number of range gates)

Returns:

output (numpy.ndarray) – array of shape (…, number of points, nnear)

get_bincoords()[source]#

Returns all bin coordinates in map projection

Returns:

output (tuple) – array of x coordinates, array of y coordinates

get_bincoords_at_points()[source]#

Returns bin coordinates only in the neighbourhood of points

Returns:

output (tuple) – array of x coordinates, array of y coordinates

extract(vals)

Extracts the values from an array of shape (azimuth angles, range gages) which correspond to the indices computed during initialisation

get_bincoords()

Returns all bin coordinates in map projection

get_bincoords_at_points()

Returns bin coordinates only in the neighbourhood of points