:py:mod:`generate_sums` ======================= .. py:module:: generate_sums .. autoapi-nested-parse:: Module to calculates, stores and provides access to the sums that are used for the change point detection algorithm in the change_point module. Written by Joshua Botha, University of Pretoria, Physics department. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: generate_sums.CPSums Functions ~~~~~~~~~ .. autoapisummary:: generate_sums.calc_and_store_sums generate_sums.main Attributes ~~~~~~~~~~ .. autoapisummary:: generate_sums.__docformat__ generate_sums.logger generate_sums.SUMS_VERSION .. py:data:: __docformat__ :value: "'NumPy'" .. py:data:: logger :value: "'generate_sums'" .. py:data:: SUMS_VERSION :value: '1.4' .. py:function:: calc_and_store_sums(n_min: int, n_max: int, prog_fb: processes.ProcessProgFeedback = None) .. py:class:: CPSums(n_max: int = None, n_min: int = None, only_pickle: bool = False, prog_fb: processes.ProcessProgFeedback = None) Calculates, stores and get's sum values. .. py:attribute:: _version :value: '1.4' .. py:attribute:: prog_fb :value: 'None' .. py:attribute:: _sums_u_k .. py:attribute:: _sums_u_n_k .. py:attribute:: _sums_v2_k .. py:attribute:: _sums_v2_n_k .. py:attribute:: _sums_sig_e .. py:method:: _calc_sums() -> None Calculates the all the possible sums that might be used in the change_point module to detect change points. .. py:method:: _calc_and_store() .. py:method:: get_u_k(n, k) -> numpy.float64 Used to get the sum value for u_k. :param n: The number of points in segment. :type n: int :param k: The number of the point in the segment being considered. :type k: int :returns: **sum_u_k** -- As defined just after eq. 6 :rtype: np.float64 .. py:method:: get_u_k_n(n, k) -> numpy.float64 Used to get the sum value for u_k_n. :param n: The number of points in segment. :type n: int :param k: The number of the point in the segment being considered. :type k: int :returns: **sum_u_k** -- As defined just after eq. 6 :rtype: np.float64 .. py:method:: get_v2_k(n, k) -> numpy.float64 Used to get the sum value for v2_k. :param n: The number of points in segment. :type n: int :param k: The number of the point in the segment being considered. :type k: int :returns: **sum_u_k** -- AAs defined just before eq. 7 :rtype: np.float64 .. py:method:: get_v2_k_n(n, k) -> numpy.float64 Used to get the sum value for v2_k_n. :param n: The number of points in segment. :type n: int :param k: The number of the point in the segment being considered. :type k: int :returns: **sum_u_k** -- As defined just before eq. 7 :rtype: np.float64 .. py:method:: get_sig_e(n) -> numpy.float64 Used to get the sum value for sig_e. :param n: The number of points in segment. :type n: int :returns: **sum_u_k** -- As defined just before eq. 7 :rtype: np.float64 .. py:method:: get_set(n, k) Returns a dict with all the sums, except for sig_e. :param n: The number of points in segment. :type n: int :param k: The number of the point in the segment being considered. :type k: int :returns: **set_sums** -- Dict of sums :rtype: dict .. py:function:: main() Just a test.