Closed thepith closed 5 years ago
Thank you for this PR. Could you please add test functions such that the coverage remains at 100%?
Please also make sure that the documentation renders correctly, e.g. whether the options for compress
are displayed correctly as a list or somesuch.
Hi,
i added tests and fixed the documentation.
Furthermore I noticed that when you abort the correlation you call
G = G[:idx - 1]
normstat = normstat[:idx - 1]
normnump = normnump[:idx - 1]
I think that this way you throw out the data at very long lag times. Is that intended? I believe it would be better to have
G = G[:idx]
normstat = normstat[:idx]
normnump = normnump[:idx]
regarding your question: I think the "abort"-case is just a special case where there is actually no data in the last row of G
. To me it just looks like bad programming. I was just not able to figure out a more elegant solution.
Note: I renamed "return_sum" to "ret_sum", to be more consistent with numpy.
Propagation of Data points
The method of propagating the values to the next register can affect the systematic error introduced by the multiple tau algorithm. Good examples are given in https://doi.org/10.1063/1.3491098 . Therefore there is a need to have a different method than averaging the data points when propagating to the next register. Using only one of the data points completely removes the systematic error at the cost of increasing the statistical error.
This is incorporated by adding the string option
compress
, where the following values are accepted: "average" (default): average two measurements when pushing to the next level of the correlator. "first": use only the first value when pushing to the next level of the correlator. "second": use only the second value when pushing to the next level of the correlator.Return Pure Sum
When one wants to use a different normalization, than the one toggled by the
normalize
option, the problem arises, that one needs the values stored innormstat
. Therefore a bool option was added, so that when toggled, the not normalized sum is returned along with the values ofnormstat
. This enables any further normalization by the user.