xoa.core.stats.rose_hist#
- xoa.core.stats.rose_hist(direction, value, nsector=16, edges=None)[source]#
Frequencies of a direction and a value, as needed by a wind or wave rose
The sectors are centered on the directions
0, 360/nsector, ..., so that the north is the middle of the first sector. The last bin of value is open. The samples that are missing in a array, or lower than the first edge, are ignored.- Parameters:
direction (array_like) – Directions in degrees, clockwise from the north
value (array_like) – Values, like speeds or heights, with the same shape as the directions
nsector (int) – Number of sectors
edges (None, array_like(nbin)) – Increasing lower edges of the bins of value, which are chosen from 0 to the maximum of the values by default.
- Returns:
numpy.ndarray(nsector, nbin) – Frequencies in percent of the valid samples
numpy.ndarray(nbin) – Lower edges of the bins