xradar.util.extract_angle_parameters#
- xradar.util.extract_angle_parameters(ds)[source]#
Extract sweep angle parameters from dataset.
- Parameters:
ds (
xarray.Dataset) – Dateset to reindex first angle.- Returns:
angle_dict (
dict) – Dictionary with parameters. The angle and time ranges,a1gateand the*_are_uniquechecks describe all rays ofds. The angle parameters fromuniform_angle_spacingon are estimated without duplicate rays, seeremove_duplicate_rays().angle_resis always positive, the sweep direction isdirection(1 for clockwise or ascending, -1 for counter-clockwise or descending).missing_raysandexcess_rayscompare the number of rays without duplicates withexpected_number_rays. Forsector,manual_ppiandmanual_rhisweeps the start and stop angle hold every measured ray anddirectionis the net travel of the rays in time order, rays without time or flagged inantenna_transitionleft out.- Raises:
ValueError – If
sweep_modehas no start and stop angle, a sector has fewer than two measured rays (with time, not flagged inantenna_transition) at different angles or crosses north, or amanual_rhisweep has azimuth as its first dimension.