Skip to content

Commit

Permalink
Changed exoiris.fit_white to use global optimizer before a local opti…
Browse files Browse the repository at this point in the history
…mizer.
  • Loading branch information
hpparvi committed Oct 14, 2024
1 parent d0fb07e commit a5997f1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions exoiris/exoiris.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,16 @@ def plot_setup(self, figsize: tuple[float, float] | None =None, xscale: str | No
fig.tight_layout()
return fig

def fit_white(self) -> None:
"""Fit a white light curve model and sets the out-of-transit mask."""
def fit_white(self, niter: int = 500) -> None:
"""Fit a white light curve model and sets the out-of-transit mask.
Parameters
----------
niter : int, optional
The number of iterations for the global optimization algorithm (default is 500).
"""
self._wa = WhiteLPF(self._tsa)
self._wa.optimize_global(niter, plot_convergence=False, use_tqdm=False)
self._wa.optimize()
pv = self._wa._local_minimization.x
self.period = pv[1]
Expand Down

0 comments on commit a5997f1

Please sign in to comment.