radarx.retrieve.noise.noise_level#

radarx.retrieve.noise.noise_level(obj, dbz=None, *, method='hildebrand', by='sweep', n_samples=64.0, percentile=1.0, snr_threshold=0.0, min_count=50, range_limits=None, n_threads=None, engine='auto')[source]#

Noise level of a sweep as the equivalent reflectivity of the noise at 1 km.

The receiver noise has the same power at every range, so in reflectivity it grows as 20 log10(r). The range-corrected reflectivity Z - 20 log10(r / km) of the gates that hold noise only is constant and equal to the noise level \(Z_N\). Two methods find it; see radarx.retrieve.noise for the details and the radarx choices.

"hildebrand" applies the objective noise determination of Hildebrand and Sekhon (1974) to the gates (reflectivity that still holds gates without signal is needed). "floor" takes a low percentile of the range-corrected reflectivity of the reported gates, for data that were thresholded on SNR.

Parameters:
  • obj (xarray.DataArray, xarray.Dataset or xarray.DataTree) – The reflectivity (a DataArray with range and ray dimensions), a sweep, or a volume of sweeps (processed sweep by sweep; sweeps without the field are skipped).

  • dbz (str, optional) – Name of the reflectivity. By default the first of DBZH, DBZ, reflectivity and corrected_reflectivity.

  • method ({"hildebrand", "floor"}, optional) – Noise determination, default "hildebrand".

  • by ({"sweep", "ray"}, optional) – One noise level for the whole sweep (default) or one per ray.

  • n_samples (float, optional) – "hildebrand": number of independent samples averaged in a gate (pulses per ray for a gate power). A value that is too small accepts signal as noise (biased high); one that is too large rejects noise (biased low), and NaN results if no set of gates is steady enough. Default 64 (radarx choice).

  • percentile (float, optional) – "floor": the percentile of the range-corrected reflectivity, 0 to 100. Default 1.

  • snr_threshold (float, optional) – "floor": the SNR (dB) of the lowest reported gate, subtracted from the percentile. Default 0.

  • min_count (int, optional) – Fewest gates for an estimate; NaN otherwise. Default 50.

  • range_limits (tuple of float, optional) – Use only gates between these ranges (km), for example the far ranges where there is little signal.

  • n_threads (int, optional) – Threads for the compiled kernel. Default: all cores.

  • engine ({"auto", "compiled", "numpy"}, optional) – Implementation to use. "auto" prefers the compiled kernel and falls back to NumPy.

Returns:

xarray.Dataset or xarray.DataTree – NOISE_LEVEL (dBZ, at 1 km) and NOISE_SAMPLES (gates used), with the dimension of the rays if by="ray"; a DataTree with one such node per sweep for a volume.

Raises:
  • KeyError – If the reflectivity is not found.

  • ValueError – For unknown options or a field without range and ray dimensions.

  • ImportError – If engine="compiled" and the compiled kernel is not available.

Notes

The noise level is a property of the receiver and the signal processing, so it changes little from one sweep to the next, except between waveforms (a long pulse for surveillance and a short one for Doppler cuts have different noise levels). The estimate is only as good as the data: with "hildebrand" the sweep must contain gates without signal.

Dask and extra dimensions. The fields may have extra leading dimensions (for example time or volume): each sweep is processed on its own and the result has the same extra dimensions. Dask arrays stay lazy: the result is a dask array and nothing is computed until it is (the sweep dimensions are rechunked into one chunk).

References

Hildebrand, P. H., and R. S. Sekhon, 1974: Objective determination of the noise level in Doppler spectra. J. Appl. Meteor., 13 (7), 808-811, https://doi.org/10.1175/1520-0450(1974)013<0808:ODOTNL>2.0.CO;2

Kollias, P., I. Jo, P. Borque, A. Tatarevic, K. Lamer, N. Bharadwaj, K. Widener, K. Johnson, and E. E. Clothiaux, 2014: Scanning ARM cloud radars. Part II: Data quality control and processing. J. Atmos. Oceanic Technol., 31 (3), 583-598, https://doi.org/10.1175/JTECH-D-13-00045.1 (range-corrected reflectivity and the noise-statistics criterion; not checked against the paper).

Doviak, R. J., and D. S. Zrnic, 1993: Doppler Radar and Weather Observations, 2nd ed. Academic Press (the r-squared dependence of the reflectivity of the noise).

Examples

>>> noise = radarx.retrieve.noise_level(sweep)
>>> noise = dtree.radarx.noise_level(method="floor")