def transit_model(self, pvp): pvp = atleast_2d(pvp) cnt = zeros((pvp.shape[0], self.npb)) pvt = map_pv_pclpf(pvp) pvt[:,1] -= self._tref ldc = map_ldc(pvp[:, self._sl_ld]) flux = self.tm.evaluate_pv(pvt, ldc) cnt[:, 0] = 1 - pvp[:, 8] / pvp[:, 5] cnref = 1. - pvp[:, 4] / pvp[:, 5] cnt[:, 1:] = self.cm.contamination(cnref, pvp[:, 6], pvp[:, 7]) return contaminate(flux, cnt, self.lcids, self.pbids)
def transit_model(self, pvp): pvp = atleast_2d(pvp) cnt = zeros((pvp.shape[0], self.npb)) pvt = map_pv_pclpf(pvp) ldc = map_ldc(pvp[:, self._sl_ld]) flux = self.tm.evaluate_pv(pvt, ldc) cnt[:, 0] = 1 - pvp[:, 8] / pvp[:, 5] for i, pv in enumerate(pvp): if (2500 < pv[6] < 12000) and (2500 < pv[7] < 12000): cnref = 1. - pv[4] / pv[5] cnt[i, 1:] = self.cm.contamination(cnref, pv[6], pv[7]) else: cnt[i, 1:] = -inf return contaminate(flux, cnt, self.lcids, self.pbids)
def transit_model(self, pvp, copy=True, planets=None): pvp = atleast_2d(pvp) flux = ones([pvp.shape[0], self.timea.size]) ldc = map_ldc(pvp[:, self._sl_ld]) planets = planets if planets is not None else arange(self.nplanets) for i in planets: pvpl = map_pv(pvp, self.pids, i) pvpl[:, 1] -= self._tref flux += self.tm.evaluate_pv(pvpl, ldc, copy) - 1. pvc = pvp[:, self._sl_cn] cnt = zeros((pvp.shape[0], self.npb)) cnt[:, 0] = pvc[:, 0] for i, pv in enumerate(pvc): if (2500 < pv[2] < 12000) and (2500 < pv[3] < 12000): cnt[i, 1:] = self.cm.contamination(pv[1], pv[2], pv[3]) else: cnt[i, 1:] = -inf return contaminate(flux, cnt, self.lcids, self.pbids)