SterlingYM / astroPIPS

A set of tools for photometric analysis. Determines the period of short-period variable stars.
https://pips.readthedocs.io/en/latest/
MIT License
7 stars 0 forks source link

Speed up curve_fit #17

Open arjunsavel opened 3 years ago

arjunsavel commented 3 years ago

In our conversation about speedups, it seems like there are a few bottlenecks:

  1. total number of curves to fit
  2. cost of a single curve fitting routine
  3. fourier model evaluation

A few ways to speed up the curve-fitting routine are noted here. In short, these are

  1. adding an ftol param
  2. adding an xtol param
  3. specifying bounds on the curve-fitting

The first two establish the convergence criteria, and they're currently set at ~5e-8 — which is about 5 milliseconds, if our input time array is in days. Given that our errors are much larger than this (I'm pretty sure!), we might want to relax the convergence criteria — perhaps 1e-6.

The bounds-specifying might end up slowing down the process (because this resorts to a different algorithm) but it might be worth looking into!

SterlingYM commented 3 years ago

added maxfev argument in 0.3.0.alpha.3.