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

Fall back to evaluate_simple in case the search_centers call fails. #204

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

tomaskontrimas
Copy link
Collaborator

In case the photospline search_centers call fails (when eventdata is outside photospline boundaries) we can fall back to the slower photospline evaluation (evaluate_simple) which handles this case by returning 0 for the event.

It is relevant for the northern tracks v005p00 and v005p01 datasets.

@tomaskontrimas tomaskontrimas requested a review from martwo January 10, 2024 07:35
@tomaskontrimas tomaskontrimas self-assigned this Jan 10, 2024
@tomaskontrimas
Copy link
Collaborator Author

Hi @martwo, could you take a look?

I'm wondering whether it's worth to optimize it by introducing a bit more complex check:
I could set a variable like self.search_centers_failed in the except ValueError: clause, and reset it when initializing the new trial. This would save some time, as following likelihood minimization steps after the first one would not try to call search_centers again.

@tomaskontrimas tomaskontrimas merged commit 4022be0 into master Feb 2, 2024
4 checks passed
@tomaskontrimas tomaskontrimas deleted the photospline_update branch February 2, 2024 13:28
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.

2 participants