prysm.util¶
Utility functions.
-
prysm.util.
mean
(array)¶ Return the mean value of the valid elements of an array.
- Parameters
array (numpy.ndarray) – array of values
- Returns
mean value
- Return type
float
-
prysm.util.
pv
(array)¶ Return the PV value of the valid elements of an array.
- Parameters
array (numpy.ndarray) – array of values
- Returns
PV of the array
- Return type
float
-
prysm.util.
rms
(array)¶ Return the RMS value of the valid elements of an array.
- Parameters
array (numpy.ndarray) – array of values
- Returns
RMS of the array
- Return type
float
-
prysm.util.
Sa
(array)¶ Return the Ra value for the valid elements of an array.
- Parameters
array (numpy.ndarray) – array of values
- Returns
Ra of the array
- Return type
float
-
prysm.util.
std
(array)¶ Return the standard deviation of the valid elements of an array.
- Parameters
array (numpy.ndarray) – array of values
- Returns
std of the array
- Return type
float
-
prysm.util.
ecdf
(x)¶ Compute the empirical cumulative distribution function of a dataset.
- Parameters
x (iterable) – Data
- Returns
xs (numpy.ndarray) – sorted data
ys (numpy.ndarray) – cumulative distribution function of the data
-
prysm.util.
sort_xy
(x, y)¶ Sorts a pair of x and y iterables, returning arrays in order of ascending x.
- Parameters
x (iterable) – a list, numpy ndarray, or other iterable to sort by
y (iterable) – a list, numpy ndarray, or other iterable that is y=f(x)
- Returns
sorted_x (iterable) – an iterable containing the sorted x elements
sorted_y (iterable) – an iterable containing the sorted y elements