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

Issue with Cross Correlation (Another Example) in cross_correlation_notebook #83

Open
kartikmandar opened this issue Feb 16, 2024 · 4 comments

Comments

@kartikmandar
Copy link
Member

The cross_correlation_notebook has some error in the code that I am having difficulty understanding. In the Another Example section of the notebook.
The cs = CrossCorrelation() has no input lightcurves.
As a result when the cs.cal_timeshift(dt=0.5) method is invoked it gives the error:
AttributeError: 'NoneType' object has no attribute 'counts'
This maybe because Lightcurve objects are not defined within the cs CrossCorrelation object, resulting in NoneType objects.
I tried using the previously defined lc1 and lc2 lightcurves as input for the CrossCorrelations object.
That worked fine but it gave a timeshift of -4.8125 which is way different than what the notebook shows presently. It created doubts on whether I should do that or not?
Also afterwards when plotting cs, it output an error saying that the dimensions of the self.time_lags and self.corr arrays are not compatible for plotting. They should have the same first dimension, but in this case, they have different shapes: (320) for self.time_lags and (10) for self.corr.

@matteobachetti
Copy link
Member

@kartikmandar ok, there must be some change in the most recent API that produces the nonetype problem. For the rest, putting in random light curves just to make it work will produce a different lag, this is expected.

I will work on the issue.

@kartikmandar
Copy link
Member Author

So for now shall I just put some lightcurves to make it working?

@matteobachetti
Copy link
Member

No, this is a bug that needs to be solved properly.

@kartikmandar
Copy link
Member Author

Okay sure.

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