riogroup / SORA

MIT License
15 stars 12 forks source link

Stats Module Implementation #75

Closed rcboufleur closed 2 years ago

rcboufleur commented 2 years ago

The Stats module was written to allow easier use of some of the scipy optimization algorithms and also to allow parallel processing when doing Monte Carlo sampling with the possibility of joint use of a marching grid algorithm to reach faster to the region of global minima. Detailed documentation will be provided for this.

Along with this pull request is the partial implementation of such methods in the Occultation.fit_ellipse() and LightCurve.occ_lcfit() fitting routines employing new specific keywords to each function.

In the case of the fit_ellispe() function, the following keywords were added:

  1. method (str): allows the use of least_squares', 'ls', 'differential_evolution', 'fastchi', and by default 'chisqr'

    'least_squares': Trust Region Reflective algorithm 'differential_evolution': genetic evolution algorithm 'fastchi': Monte Carlo sampling. Allows parallel computation.

  2. threads (int): the number of CPUs/threads used in the parallel computation

In the case of the occ_lcfit() function, the following keywords were added:

  1. method (str): allows the use of least_squares', 'ls', 'differential_evolution', 'fastchi', and by default 'chisqr'

    'least_squares': Trust Region Reflective algorithm 'differential_evolution': genetic evolution algorithm 'fastchi': Monte Carlo sampling. Allows parallel computation.

  2. threads (int): the number of CPUs/threads used in the parallel computation