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

Issues concerning dequatorial_radius interval using fit_ellipse() method #92

Open
Raph65 opened this issue Aug 12, 2024 · 5 comments
Open

Comments

@Raph65
Copy link

Raph65 commented Aug 12, 2024

Hello,
I am doing an ellipse fitting for a 5 positive occultation observations. I am trying to fit an ellipse using the fit_ellipse() method on sora.occultation but depending on the optimization method used I have a different result regarding the equatorial radius.
I fixed equatorial_radius = 2410.3 km and dequatorial_radius = 1.5 km

Results using "least_square" or "differential_evolution" method:

equatorial_radius:
1-sigma: 2407.325 +/- 0.000
3-sigma: 2407.418 +/- 0.105

Here the result is out of the given interval [2408.8,2411.8]

Results using "chisqr" method:

equatorial_radius:
1-sigma: 2408.824 +/- 0.023
3-sigma: 2408.908 +/- 0.108

Can we explain this difference by scipy_optimization methods (used in least_square and differential_evolution methods)?

Thanks

@rcboufleur
Copy link
Collaborator

Hi Raph65,

There is a fundamental difference between chisqr and the methods based on SciPy. The 'chisqr' approach relies on Monte Carlo simulations, meaning that with a sufficient number of iterations or guesses, you can achieve a value similar to what would be obtained using the convergence techniques employed by SciPy's least_squares and differential_evolution methods. While 'chisqr' provides a probabilistic approximation through repeated random sampling, SciPy's methods use deterministic algorithms to systematically converge on an optimal solution.

However, it's important to note that while the convergence methods are effective in finding the best solution, 'chisqr' is still used to compute the error bars. Therefore, when using this approach, it's crucial to carefully consider the appropriate range for parameters, especially since some error bars might be too small, potentially leading to inaccurate interpretations.

For questions like these, please feel free to use our Slack channel. For software-related issues, we prefer that you raise them via GitHub issues.

@Raph65
Copy link
Author

Raph65 commented Aug 12, 2024 via email

@rcboufleur
Copy link
Collaborator

Hi Raphaël,

I’m not entirely sure I fully grasp your question, but here are my thoughts on when each method might be more appropriate. Convergence methods, like least_squares and differential_evolution, are generally much faster than Monte Carlo simulations. However, they can sometimes get stuck in local minima during the convergence process. While this is rare in the context of SORA, it could happen with lower-quality data. Despite this, these methods are usually the most straightforward way to find the best-fit parameters.

On the other hand, the chisqr method has the advantage of always finding the best-fit region, though it comes at the cost of longer computation times. Additionally, it’s used to estimate the uncertainty in the parameters, which provides context for how meaningful the best fit is, regardless of the method used.

So, a combination of both approaches might be the most efficient choice. Experimenting with both methodologies could also give you a better perspective on which is more suitable for your specific case, especially when analyzing the chi-square maps that are generated.

As for your GitHub question, there’s no need to delete it. It’s valuable for the community and might help others who have similar inquiries.

@Raph65
Copy link
Author

Raph65 commented Aug 12, 2024 via email

@rcboufleur
Copy link
Collaborator

Hi Raphaël,

That does indeed sound like strange behavior, especially if the case is with the differential_evolution method that by design only works if bounds are provided. Please reach out to me in the Slack channel so I can provide more specific support for your case.

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