exoplanet-dev / exoplanet

Fast & scalable MCMC for all your exoplanet needs!
https://docs.exoplanet.codes
MIT License
206 stars 52 forks source link

AttributeError: module 'exoplanet' has no attribute 'gp' #223

Closed pgorrini closed 3 years ago

pgorrini commented 3 years ago

Hello,

I'm trying to use the specgp package (which uses exoplanet) and when running

import exoplanet as xo
term = xo.gp.terms.SHOTerm(log_S0=0.0, log_w0=1.0, log_Q=-np.log(np.sqrt(2)))

I get the following error:

AttributeError: module 'exoplanet' has no attribute 'gp'

I'm using the latest version of exoplanet (0.5.2)

ericagol commented 3 years ago

@tagordon

tagordon commented 3 years ago

Hi @pgorrini, the latest version of exoplanet no longer includes the gp module. Specgp should be compatible with the last version of exoplanet that did include that module. Alternatively, the same functionality has been implemented in celerite2 under the “kron” branch (but I don’t believe it’s in the current release).

dfm commented 3 years ago

Yeah - I'm sorry about the shifting infrastructure! I'm hoping that we can have similar functionality in celerite2, but I've been slow to get it implemented. To downgrade exoplanet, it looks like you'll need version <0.4.

pgorrini commented 3 years ago

Ok yes, with an oldest exoplanetversion it work well. Thanks!