windkit.create_sector_coords

windkit.create_sector_coords(bins=12, start='infer')[source]

Create wind sector coordinate as a data array.

The data array contains the sector, the sector ceiling and the sector floor. The sector width is 360 / bins if bins is an integer.

Parameters:
  • bins (int, array_like) – Number of bins or an array of bin edges. If bins is an integer, the width and start parameters are used to create the bin edges. If bins is an array, it must be sorted in ascending order and span the negative and positive directions to give the proper center, ceiling, and floor values for the sector. All values are made positive by taking the modulo 360 after calculating the center, ceiling, and floor.

  • start (float, optional) – Starting value of the bins, by default “infer”, which, if bins is an integer, sets the start to -360/bins/2.0. If bins is an array, start is ignored.

Returns:

Data array with sector coordinates, ceiling and floor.

Return type:

xarray.DataArray