CrossCorrelation Gives Strange Results #592
Labels
good first issue
If you're new to Stingray and want to contribute, start here.
GSoC
Great for students interested in GSoC to tackle.
help wanted
We need additional help with these issues!
I am using Stingray's CrossCorrelation function to determine the time-lag between two light-curves, but am having some trouble.
As a simple case, if I calculate the time-lag between two identical light-curves, the result of stingray.crosscorrelation.time_shift depends on the number of data points. An odd number of points yields a time-shift of 0, as one would expect. However, an even number of points yields some fraction of the time sampling. This is also reflected when plotting the CrossCorrelation for various time lags.
Code to reproduce:
For any odd n, the result is 0. But for any even n, the result is >~0.5, getting closer to 0.5 for larger n. For n=2, the result is 1.0. The final result approximates half the value of dt.
Am I using/interpreting these functions incorrectly, or is Stingray doing something wrong here?
The text was updated successfully, but these errors were encountered: