radarx.retrieve.biology.biological_echo#
- radarx.retrieve.biology.biological_echo(obj, model=None, *, fields=('DBZH', 'VRADH', 'WRADH'), elevations=(0.5, 1.5, 2.5, 3.5, 4.5), weather_threshold=0.45, size=608, resolution=500.0, providers=None)[source]#
Biology and weather probabilities from MistNet (ONNX).
- Parameters:
obj (
xarray.DataTree) – A WSR-88D volume withsweep_*groups (xradar). For each ofelevationsthe sweep nearest in fixed angle that holds allfieldsis used (the Doppler cut of NEXRAD split cuts).model (
strorpathorradarx.ml.Model, optional) – Default"mistnet-nexrad", the published MistNet weights converted to ONNX on first use; or an ONNX file with the same input and output, a registry name or a loaded model.fields (
tupleofstr, optional) – Reflectivity (dBZ), radial velocity and spectrum width (m s⁻¹), as measured (velocities need not be dealiased). Default("DBZH", "VRADH", "WRADH").elevations (
tupleoffloat, optional) – The five input elevations (degrees). Default 0.5° to 4.5° in 1° steps.weather_threshold (
float, optional) – Weather probability above which a gate is weather, on its own sweep or on the mean of the five sweeps. Default 0.45, the value ofMISTNET_WEATHER_THRESHOLDandMISTNET_SCAN_AVERAGE_WEATHER_THRESHOLDin vol2bird (lib/constants.h), the reference implementation of Lin et al. (2019) [1]; not checked against the paper.size, resolution (
int,float, optional) – Cells per side and cell size (m) of the Cartesian input grid. Default 608 and 500 m,MISTNET_DIMENSIONandMISTNET_RESOLUTIONof vol2bird, the grid of the network input.providers (
listofstr, optional) – ONNX Runtime execution providers. Default: CPU.
- Returns:
xarray.DataTree– The root of the input and, for each of the five sweeps used,biology_probabilityandweather_probability(0-1) andbiological_echo(bool: reflectivity present and not weather) on the sweep’s dimensions and coordinates (NaN / False beyond ±150 km). Merge them into the volume with.radarx.assign(products). Attributesml_model,ml_model_version,ml_model_licenceandml_model_citation.
Notes
Inputs, grid, thresholds and the network follow the vol2bird implementation and the upstream weights, see the module documentation for what was checked against which file; the paper of Lin et al. (2019) [1] was not checked. Model licence: MIT (github.com/adokter/ MistNet); the licence and citation are written to the
ml_model_licenceandml_model_citationattributes of the output.Dask. This function computes the dask array: the network classifies the whole volume at once. The input is loaded into memory and the result is held in memory.
References
Examples
>>> bio = radarx.retrieve.biological_echo(dtree) >>> dtree = dtree.radarx.assign(bio)