Closed lucaborsato closed 3 years ago
Dear Luca, did you run "add_glint" on the dataset(s) before saving them? Regards, -Pierre
From: Luca Borsato notifications@github.com Sent: 16 October 2020 16:21 To: pmaxted/pycheops pycheops@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [pmaxted/pycheops] Error MultiVisit and glint_scale (#164)
I tried to fit a MultiVisit with three datasets, one dataset has the glint_scale as the only detrending parameters (and gaussian process for all three datasets).
run M.fit_transit with linear ephemeris fit. It returned the error:
... File "/home/borsato/anaconda/envs/cheops/lib/python3.7/site-packages/pycheops/multivisit.py", line 83, in _glint_func glint = f_glint(f_theta(t-delta_t)) TypeError: 'NoneType' object is not callable
Should I recall some kind of add_glint function also for the MultiVisit? If I use three datasets without glint it works.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/pmaxted/pycheops/issues/164, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEUQLXSNJBUMGYNGILNOQKTSLBQJNANCNFSM4STPG2EA.
Dear Pierre, yes, every time I have to use the glint I do something like this:
if(glint_value):
det_par['glint_scale'] = detrend["07b"]["glint_scale"]
if(glint_value == 'moon'):
_ = dataset.add_glint(moon=True, show_plot=False, nspline=21, binwidth=7)
else:
_ = dataset.add_glint(show_plot=False, nspline=21, binwidth=7)
# LMFIT w/ GLINT--------------------------------------------------
print('\n-LMFIT with GLINT')
lmfit = dataset.lmfit_transit(
P = in_par['P'],
T_0 = in_par['T_0'],
f_c = in_par['f_c'],
f_s = in_par['f_s'],
D = in_par['D'],
W = in_par['W'],
b = in_par['b'],
h_1 = in_par['h_1'],
h_2 = in_par['h_2'],
logrhoprior = in_par['logrho'],
c = in_par['c'],
dfdt = det_par['dfdt'],
d2fdt2 = det_par['d2fdt2'],
dfdbg = det_par['dfdbg'],
dfdcontam = det_par['dfdcontam'],
dfdx = det_par['dfdx'],
dfdy = det_par['dfdy'],
d2fdx2 = det_par['d2fdx2'],
d2fdy2 = det_par['d2fdy2'],
dfdsinphi = det_par['dfdsinphi'],
dfdcosphi = det_par['dfdcosphi'],
dfdsin2phi = det_par['dfdsin2phi'],
dfdcos2phi = det_par['dfdcos2phi'],
dfdsin3phi = det_par['dfdsin3phi'],
dfdcos3phi = det_par['dfdcos3phi'],
glint_scale = det_par['glint_scale']
)
I save the dataset only after run emcee (with and without gaussian process), and that is something that comes later in the script.
Best, Luca
Fixed in version 0.9.9
I tried to fit a MultiVisit with three datasets, one dataset has the glint_scale as the only detrending parameters (and gaussian process for all three datasets).
Should I recall some kind of
add_glint
function also for the MultiVisit? If I use three datasets without glint it works.