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, a1gate and the *_are_unique checks describe all rays of ds. The angle parameters from uniform_angle_spacing on are estimated without duplicate rays, see remove_duplicate_rays(). angle_res is always positive, the sweep direction is direction (1 for clockwise or ascending, -1 for counter-clockwise or descending). missing_rays and excess_rays compare the number of rays without duplicates with expected_number_rays. For sector, manual_ppi and manual_rhi sweeps the start and stop angle hold every measured ray and direction is the net travel of the rays in time order, rays without time or flagged in antenna_transition left out.

Raises:

ValueError – If sweep_mode has no start and stop angle, a sector has fewer than two measured rays (with time, not flagged in antenna_transition) at different angles or crosses north, or a manual_rhi sweep has azimuth as its first dimension.