Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error result from CrossCorrelation #817

Open
yuzl00 opened this issue Apr 16, 2024 · 1 comment
Open

Error result from CrossCorrelation #817

yuzl00 opened this issue Apr 16, 2024 · 1 comment

Comments

@yuzl00
Copy link

yuzl00 commented Apr 16, 2024

I perform cross-correlation from one light curve like this:

corr = CrossCorrelation(lc, lc, norm='variance')

corr is much greater than 1 at time_lags = 0.
The code in crosscorrelation.py (lines 200-201) may have a bug:

variance1 = np.var(lc1.counts) - np.mean(lc1.counts_err) ** 2
variance2 = np.var(lc2.counts) - np.mean(lc2.counts_err) ** 2

Should it be like this:

variance1 = np.var(lc1.counts) - np.var(lc1.counts_err) 
variance2 = np.var(lc2.counts) - np.var(lc2.counts_err)
@matteobachetti
Copy link
Member

@yuzl00 thanks for the Issue, we're investigating it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants