Closed warrickball closed 3 years ago
Looks like it, I just upgraded to lightkurve 2 and things broke. I'll see if I can fix it and make a PR with a few other bug fixes.
I just pulled master
and tried running the same script again. This time I get:
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
Traceback (most recent call last):
File "/home/wball/try/pbjam/boeing.py", line 4, in <module>
sess = pb.session(ID='KIC4448777',
File "/home/wball/pypi/PBjam/pbjam/session.py", line 577, in __init__
if any(np.isnan(vardf['exptime'])) and any((vardf['timeseries'])) and any(vardf['spectrum']):
File "/home/wball/.local/lib/python3.9/site-packages/pandas/core/generic.py", line 1933, in __array_ufunc__
return arraylike.array_ufunc(self, ufunc, method, *inputs, **kwargs)
File "/home/wball/.local/lib/python3.9/site-packages/pandas/core/arraylike.py", line 274, in array_ufunc
result = getattr(ufunc, method)(*inputs, **kwargs)
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
At least it doesn't look like a Lightkurve 2 issue anymore...
I think we were a bit hasty with the PR. It's because you didn't set an exptime on the session init, and the default setting for exptime is None which throws an error in np.isnan().
Of course if you're supplying a time series manually you shouldn't need to set an exptime, so I'm not entirely sure what the best solution is.
On Thu, 20 May 2021 at 17:19, Warrick Ball @.***> wrote:
I just pulled master and tried running the same script again. This time I get:
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. Traceback (most recent call last): File "/home/wball/try/pbjam/boeing.py", line 4, in
sess = pb.session(ID='KIC4448777', File "/home/wball/pypi/PBjam/pbjam/session.py", line 577, in init if any(np.isnan(vardf['exptime'])) and any((vardf['timeseries'])) and any(vardf['spectrum']): File "/home/wball/.local/lib/python3.9/site-packages/pandas/core/generic.py", line 1933, in __array_ufunc__ return arraylike.array_ufunc(self, ufunc, method, *inputs, *kwargs) File "/home/wball/.local/lib/python3.9/site-packages/pandas/core/arraylike.py", line 274, in array_ufunc result = getattr(ufunc, method)(inputs, **kwargs) TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' At least it doesn't look like a Lightkurve 2 issue anymore...
- PBjam commit 0c5591a https://github.com/grd349/PBjam/commit/0c5591a1b1adeb2b47d078894118be4e39471cdc
- Pandas 1.2.0
- Lightkurve 2.0.9
- Python 3.9.4
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grd349/PBjam/issues/260#issuecomment-845262813, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEJWO37GWJPUBV3DVAUICO3TOUZAPANCNFSM435JKXWQ .
Gotcha. I just had a look at the quickstart example, which is how this started, and saw that it's been updated to include the exptime
argument. As you say, that now works, so my issue ("quickstart example doesn't work") is resolved.
I just tried peak bagging a star and started getting errors, so I thought I'd take a step back and at least try the quick-start example in the documentation:
This fails with the output:
My guess is this is an issue with Lightkurve 2. For some specific versions, I'm using
master/HEAD
)I'll open issues for the other things if they persist after I can resolve this.