Skip to content

Conversation

Sauravroy34
Copy link
Contributor

@Sauravroy34 Sauravroy34 commented Mar 1, 2025

fixes #817
we implement our normalisation method from
#634 (this pr introduced)
1 )https://academic.oup.com/mnras/article/470/3/3591/3747505

changed mean(err) **2 to var(err) as per the publications
Screenshot from 2025-03-01 18-54-59

so for similar light curve the max value is 1 at time lag = 0
example snippet

import numpy as np
from stingray import Lightcurve,CrossCorrelation
import matplotlib.pyplot as plt

times = np.arange(1000)
counts = np.random.poisson(100, size=len(times))

lc = Lightcurve(times, counts)

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

corr.plot()
plt.show()

@Sauravroy34
Copy link
Contributor Author

Figure_1
result of the code

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

Successfully merging this pull request may close these issues.

Error result from CrossCorrelation

1 participant