PlasmaCalcs.tools.xarray_tools.xarray_grids.xarray_angle_grid

PlasmaCalcs.tools.xarray_tools.xarray_grids.xarray_angle_grid(min=0, max=360, N=None, name='ang', *, rad_in=False, step=None, span=None, radstep=None, degstep=None, radspan=None, degspan=None, inclusive=(True, False), N_min=UNSET, N_max=UNSET)
create and return a grid of angles; output will always be in [radians].
(The default is to create a grid from 0 to 360 degrees, including 0 but not 360)
The main advantage of this method is to make simple 1D angle grids.
For more precise control, and/or 2D+ grids, use xarray_grid or XarrayGrid instead.
min: None, number, or callable
min value. None –> infer from max & span.
callable f –> infer min [radians] = f(max [radians])
max: None, number, or callable
max value. None –> infer from min & span.
callable f –> infer max [radians] = f(min [radians])
N: None or number
number of points in grid. None = “unspecified”
name: str
result.name; also result.assign_coords({name:result})
rad_in: bool, default False.
whether the inputs are in radians (if True) or degrees (if False).
step: None or number
step size between points, in same units as input (depends on rad_in). None = “unspecified”
radstep: None or number
step size between points, in radians. None = “unspecified”
degstep: None or number
step size between points, in degrees. None = “unspecified”
span: None or number
max - min, in same units as input (depends on rad_in). None = “unspecified”
radspan: None or number
max - min, in radians. None = “unspecified”
degspan: None or number
max - min, in degrees. None = “unspecified”
inclusive: tuple of 2 bools
whether to include min and max in the output.
N_min: UNSET, None or number
if provided, tells minimum allowed number of points in grid.
None –> no minimum. UNSET –> use XarrayGrid.N_min default (==2)
N_max: UNSET, None or number
if provided, tells maximum allowed number of points in grid.
None –> no maximum. UNSET –> use XarrayGrid.N_max default (==1e8)