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

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.30%. Comparing base (991e488) to head (57f8889).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #893      +/-   ##
==========================================
- Coverage   96.06%   94.30%   -1.77%     
==========================================
  Files          48       48              
  Lines        9895     9895              
==========================================
- Hits         9506     9331     -175     
- Misses        389      564     +175     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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