feat!(crosscorr): options to compute negative lags and normalise
WHY IS THIS CHANGE NEEDED?:
- negative lags needed for cross-correlation (in contrast to autocorrelation, in which the autocorrelation function is symmetrical)
HOW DOES THE CHANGE SOLVE THE PROBLEM?:
- stole from https://git.ecdf.ed.ac.uk/swain-lab/wela/-/blob/master/autocrosscorr.py#L84
- use 'normalised' and 'only_pos' as parameters according to parameters-processes paradigm
- return statement: treat 'corr' in wela as the content of the sole output DataFrame and 'lags' in wela as the column names -- interpreting wela.autocrosscorr returning two variables as a limitation of using numpy arrays as the main datatype (which using pandas DataFrames here can solve)
WHAT SIDE EFFECTS DOES THIS CHANGE HAVE?:
- existing uses (hopefully) shouldn't be affected, but structure of DataFrame should change and must be inspected
EVIDENCE THAT COMMIT WORKS:
- tested on example described in docs (ultimately derived from the wela implementation), ran without errors and output was as expected (a sinusoid).
REFERENCES:
- issue #30 (closed)
Merge request reports
Activity
assigned to @amuoz
mentioned in commit 9fc45fa3
mentioned in commit aliby@155d7c20
Please register or sign in to reply