pyValEIA.utils.math =================== .. py:module:: pyValEIA.utils.math .. autoapi-nested-parse:: Functions that support mathematical calculations. .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: pyValEIA.utils.math.get_exponent pyValEIA.utils.math.base_round pyValEIA.utils.math.unique_threshold pyValEIA.utils.math.set_dif_thresh Module Contents --------------- .. py:function:: get_exponent(number) Calculate the exponent of number using base 10. :Parameters: **number** : double Number for which the base-10 exponent will be calculated :Returns: **exp_val** : float Exponent of `number` as a whole value .. !! processed by numpydoc !! .. py:function:: base_round(xvals, base=5) Round values to the nearest base. :Parameters: **xvals** : array-like Values to be rounded **base** : int Base to be rounded to (default=5) :Returns: **round_vals** : array-like Values rounded to nearest base .. !! processed by numpydoc !! .. py:function:: unique_threshold(xvals, thresh=0.01) Round values to the desired threshold and return a unique array. :Parameters: **xvals** : array-like Values to be rounded **thresh** : float Threshold for uniqueness (default=0.01) :Returns: **uvals** : array-like Unique values at the desired threshold level .. !! processed by numpydoc !! .. py:function:: set_dif_thresh(lat_span, percent=0.05) Set a difference threshold. :Parameters: **lat_span: double** span of latitude array e.g. max(latitude) - min(latitude) **percent** : kwarg double Percent as a decimal for difference threshold from 0-1 (default=0.05) :Returns: float Percentage times the span .. rubric:: Notes Set the threshold for what is different, input scale (if lat_span) = 50, then our max tec/ne is 50 so set thresh to 5 for 10% can also use this for maximum difference between peak and trough, so can use smaller threshold .. !! processed by numpydoc !!