Closed Christopher-Mann closed 1 year ago
Update on my previous post:
I pressed on with the TESS tutorial and, for whatever reason, Examples 2 and 3 run just fine. Whatever the issue is, seems to be specific to Example 1.
I was able to apply the structure of examples 2 and 3 to my own analysis and things seem to be working fine.
The error seems to be an issue with pytransit, which is used to model the light curves. Specifically it seems that the non-parallelized LC calculation is failing, but the parallelized LC calculation is not. I'll need to do some troubleshooting to fix this, but for now setting "parallel = True" in calc_probs should be a safe bet.
Hello there, I happened to face the same issue. I think this is being caused by recent version of numba (v0.56.x) released on 2022-07-25. It seems to raise data type conflicts somewhere inside pytransit.
Although downgraded version of triceratops (1.0.15) works just fine..
Not sure on the cause but I hope it helps
Hi, I'll see if I can fix this in PyTransit asap (1-2 days).
Hi,
Sorry for taking a bit longer before I could get to this. This is a problem in Triceratops marginal_likelihoods.py
:
The orbital periord P_orb
is not a float but an array in marginal_likelihoods.py lines 66-71, and because of this, also the semi-major axis a
in line 74 is an array. The crash comes when the transit model is tried to evaluate for an array a
instead of float.
I tested that changing the lines 147 and 568 (the numbers might be off by two or three since I've added some debugging breakpoints to my version) in marginal_likelihoods.py
P_orb[i], incs[i], a, R_s, u1, u2,
into
P_orb[i], incs[i], a[i], R_s, u1, u2,
seems to fix the issue. However, I think @stevengiacalone needs to take a closer look at this to make sure the bug is not repeated elsewhere in the code. I believe a
is expected to be a float
while a_arr
is expected to be an ndarray
, but at the moment both are arrays.
The parallelised code works because there PyTransit
expects to get the parameters as arrays, but the non-parallelized code breaks because then all the orbital parameters should be floats.
Thanks for finding the root of the error, @hpparvi ! This is due to an update I made a few months back and should be easily fixable. I'll upload a new patched version of the code as soon as I'm able to.
Fixed in latest update.
Hi there. I'm newly trying out
triceratops
to help with a TESS paper I'm finalizing (and need the kind of statistical validation that Triceratops can provide).I finally got all the modules to load properly in a dedicated conda environemnt and I swapped the shell to bash so that
lightkurve
will run (Catalina seems to default to a zsh shell which causes issues). I'm working through the TESS tutorial notebook and hit the following issue in the 5th code cell, where we first call:target.calc_probs(time=lc.time.value, flux_0=lc.flux.value, flux_err_0=np.mean(lc.flux_err.value), P_orb=P_orb)
I get the following error: (I haven't edited the tutorial file at all)
Can't say I really know what's going on, but it seems pretty deep inside the
triceratops
source code. Any insight on how to fix this?