flasc.utilities.circular_statistics#
Circular statistics utility functions.
Functions
Compute the mean wind direction over a given axis. |
|
Determine statistical properties of an array of wind directions. |
- flasc.utilities.circular_statistics.calc_wd_mean_radial(angles_array_deg, axis=0, nan_policy='omit')[source]#
Compute the mean wind direction over a given axis.
Assumes that the input angles are specified in degrees, and returns the mean wind direction in degrees. Wrapper for scipy.stats.circmean
- Parameters:
angles_array_deg (numpy array) -- Array of angles in degrees
axis (int) -- Axis along which to calculate the mean Default is 0
nan_policy (str) -- How to handle NaN values. Default is 'omit'
- Returns:
Mean wind direction in degrees
- Return type:
np.array
- flasc.utilities.circular_statistics.calculate_wd_statistics(angles_array_deg, axis=0, calc_median_min_max_std=True)[source]#
Determine statistical properties of an array of wind directions.
This includes the mean of the array, the median, the standard deviation, the minimum value and the maximum value.
- Parameters:
angles_array_deg (numpy array) -- Array of wind directions in degrees
axis (int) -- Axis along which to calculate the statistics Default is 0
calc_median_min_max_std (bool) -- Whether to calculate the median, minimum, maximum, and standard deviation of the wind directions Default is True
- Returns:
mean_wd (float): Mean wind direction in [0, 360] deg median_wd (float): Median wind direction in [0, 360] deg std_wd (float): Standard deviation in deg min_wd (float): Minimum wind direction in [0, 360] deg max_wd (float): Maximum wind direction in [0, 360] deg
- Return type:
A tuple containing the following values