xradar.util.is_sweep#
- xradar.util.is_sweep(obj, strict=False)[source]#
Check whether a Dataset holds a radar sweep.
The check is based on the structure, not on names:
a
rangedimension and one ray dimension (time,azimuthorelevation),azimuthandelevationvariables along the ray dimension,at least one data variable with dimensions (ray,
range).
With
strict=Truethe mandatory sweep metadata variables are required, too (sweep_number,sweep_mode,follow_mode,prt_mode,sweep_fixed_angle, see FM301 Table 301-7a). Not all backends fill these yet (e.g. HPL and Metek), so their sweeps are only recognized withstrict=False.- Parameters:
obj (
xarray.Datasetorxarray.DataTree) – Dataset or DataTree node to check.strict (
bool, optional) – Also require the mandatory sweep metadata variables. Defaults to False.
- Returns:
sweep (
bool) – True ifobjholds a radar sweep.