Skip to content

Commit 77b547f

Browse files
committed
Bugfix: moved the white model initialisation from ExoIris.__init__ back to ExoIris.fit_model. The white light curve model requires parameter priors to be set when the model is instantiated.
1 parent 7bbefa1 commit 77b547f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exoiris/exoiris.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def __init__(self, name: str, ldmodel, data: TSDataGroup | TSData, nk: int = 50,
173173

174174
self._tsa = TSLPF(self, name, ldmodel, data, nk=nk, nldc=nldc, nthreads=nthreads, tmpars=tmpars,
175175
noise_model=noise_model, interpolation=interpolation)
176-
self._wa = WhiteLPF(self._tsa)
176+
self._wa: None | WhiteLPF = None
177177

178178
self.nthreads: int = nthreads
179179

@@ -543,6 +543,7 @@ def fit_white(self, niter: int = 500) -> None:
543543
niter : int, optional
544544
The number of iterations for the global optimization algorithm (default is 500).
545545
"""
546+
self._wa = WhiteLPF(self._tsa)
546547
self._wa.optimize_global(niter, plot_convergence=False, use_tqdm=False)
547548
self._wa.optimize()
548549
pv = self._wa._local_minimization.x

0 commit comments

Comments
 (0)