Cross-corr process computes std dev over time for each replicate
This fixes some issues with the process being used for
autocorrelation (i.e. when trace_B
is not passed as an argument):
- First value of autocorrelation function is not zero.
- Autocorrelation function of a population of sinusoids with noise is flat.
The process computed the standard deviation at each time point,
producing a stdA
variable that is essentially a time series of
standard deviation values for the whole population. This is wrong.
It should compute the standard deviation over time for each replicate
instead. This satisfies the definition of cross-correlation.
I applied the changes Peter proposed on 2022-05-20 (see attachment in issue #18 (closed)), with the following remarks
- I renamed the variables so that they are consistent.
- I did not include the changes to plotting. Processes in the
core
directory should only do computations. We want users to take the output of these processes and use them as an input to separate plotting routines. One function should do one thing.
Users that previously used the crosscorr
process should update to
reflect this change, as the output will change.
This commit partially addresses issue #18 (closed). The starting value of the autocorrelation functions is now 1, but it doesn't fix the issue with synthetic data. Although the function looks cleaner on real data.
I sanity-tested this process with real and synthetic data.