hpparvi / PyTransit

Fast and easy exoplanet transit light curve modelling.
GNU General Public License v2.0
101 stars 23 forks source link

Error when using QuadraticModel and OblateStarModel evaluate_ps #115

Closed mhooton closed 3 years ago

mhooton commented 3 years ago

Pytransit in my code was previously working fine. I'm now getting this error when using QuadraticModel evaluate_ps:

TypeError Traceback (most recent call last)

in ----> 1 flux_qm = tmc.evaluate_ps(k, ldc, t0, p, a, i, e, w) ~/anaconda3/lib/python3.7/site-packages/PyTransit-2.5.4-py3.7.egg/pytransit/models/ma_quadratic.py in evaluate_ps(self, k, ldc, t0, p, a, i, e, w, copy) 183 flux = quadratic_model_s(self.time, k, t0, p, a, i, e, w, ldc, 184 self.lcids, self.pbids, self.epids, self.nsamples, self.exptimes, self.npb, --> 185 self.ed, self.ld, self.le, self.kt, self.zt, self.interpolate) 186 return squeeze(flux) 187 TypeError: expected dtype object, got 'numpy.dtype[float64]' and this error when using OblateStarModel evaluate_ps: TypeError Traceback (most recent call last) in 1 rperiod = 10 ----> 2 flux_om = tmo.evaluate_ps(k, rho, rperiod, tpole, phi, beta, ldc, t0, p, a, i, az, e, w) ~/anaconda3/lib/python3.7/site-packages/PyTransit-2.5.4-py3.7.egg/pytransit/models/osmodel.py in evaluate_ps(self, k, rho, rperiod, tpole, phi, beta, ldc, t0, p, a, i, l, e, w, copy) 191 flux = oblate_model_s(self.time, k, t0, p, a, l, i, e, w, ldc, mstar, self.rstar, ostar, tpole, gpole, 192 f, feff, sphi, cphi, beta, self.wavelength, self.tres, self._ts, self._xs, self._ys, self._xp, self._yp, --> 193 self.lcids, self.pbids, self.nsamples, self.exptimes, self.npb) 194 195 return squeeze(flux) TypeError: expected dtype object, got 'numpy.dtype[float64]' I pulled the most recent version and this didn't resolve it
mhooton commented 3 years ago

Apologies, errors went away when I updated all the dependencies.