Closed avivajpeyi closed 2 years ago
There was a mistake in the model :expressionless:... a very silly mistake:
residual = y - lightcurve
gp = GaussianProcess(
kernel, t=t, diag=yerr ** 2 + jitter_prior ** 2, mean=lightcurve
)
gp.marginal(name="obs", observed=y)
This makes the GP fit the raw relative flux data, and makes the GP mean->lc
Here we see that the GP is fitting the transit, and the transit model does not fit all the transit data.
residual = y - lightcurve
gp = GaussianProcess(
kernel, t=t, diag=yerr ** 2 + jitter_prior ** 2.0
)
gp.marginal(name="obs", observed=residual)
Making the GP fit the residual and removing the mean-->lc, we get the following:
This seems better -- Ill merge it in but should check in with Dan to see if it is correct.
That looks perfect! Good find.
Overfit GP EGs
TOI 103:
Notebook: toi_103.ipynb.zip
TOI 1006
Some others
Note: appears to be performing ok(?) in some cases