def get_value(self, t): # Planet 1 M_anom1 = 2 * np.pi / (100 * self.P1) * (t - 1000 * self.tau1) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2 * np.arctan( np.sqrt((1 + self.e1) / (1 - self.e1)) * np.tan(e_anom1 * .5)) rv1 = 100 * self.k1 * (np.cos(f1 + self.w1) + self.e1 * np.cos(self.w1)) # Planet 2 M_anom2 = 2 * np.pi / (100 * self.P2) * (t - 1000 * self.tau2) e_anom2 = solve_kep_eqn(M_anom2, self.e2) f2 = 2 * np.arctan( np.sqrt((1 + self.e2) / (1 - self.e2)) * np.tan(e_anom2 * .5)) rv2 = 100 * self.k2 * (np.cos(f2 + self.w2) + self.e2 * np.cos(self.w2)) offset = np.zeros(len(t)) for i in range(len(t)): if t[i] in AAT[:, 0]: offset[i] = self.d_aat elif t[i] in HARPS1[:, 0]: offset[i] = self.d_harps1 elif t[i] in HARPS2[:, 0]: offset[i] = self.d_harps2 return rv1 + rv2 + offset
def get_value(self, t): # Planet 1 M_anom1 = 2 * np.pi / (100 * self.P1) * (t - 1000 * self.tau1) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2 * np.arctan( np.sqrt((1 + self.e1) / (1 - self.e1)) * np.tan(e_anom1 * .5)) rv1 = 100 * self.k1 * (np.cos(f1 + self.w1) + self.e1 * np.cos(self.w1)) # Planet 2 M_anom2 = 2 * np.pi / (100 * self.P2) * (t - 1000 * self.tau2) e_anom2 = solve_kep_eqn(M_anom2, self.e2) f2 = 2 * np.arctan( np.sqrt((1 + self.e2) / (1 - self.e2)) * np.tan(e_anom2 * .5)) rv2 = 100 * self.k2 * (np.cos(f2 + self.w2) + self.e2 * np.cos(self.w2)) # Planet 3 M_anom3 = 2 * np.pi / (100 * self.P3) * (t - 1000 * self.tau3) e_anom3 = solve_kep_eqn(M_anom3, self.e3) f3 = 2 * np.arctan( np.sqrt((1 + self.e3) / (1 - self.e3)) * np.tan(e_anom3 * .5)) rv3 = 100 * self.k3 * (np.cos(f3 + self.w3) + self.e3 * np.cos(self.w3)) return rv1 + rv2 + rv3 + self.offset
def get_value(self, t): # Planet 1 M_anom1 = 2 * np.pi / (100 * self.P1) * (t - 1000 * self.tau1) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2 * np.arctan( np.sqrt((1 + self.e1) / (1 - self.e1)) * np.tan(e_anom1 * .5)) rv1 = 100 * self.k1 * (np.cos(f1 + self.w1) + self.e1 * np.cos(self.w1)) # Planet 2 M_anom2 = 2 * np.pi / (100 * self.P2) * (t - 1000 * self.tau2) e_anom2 = solve_kep_eqn(M_anom2, self.e2) f2 = 2 * np.arctan( np.sqrt((1 + self.e2) / (1 - self.e2)) * np.tan(e_anom2 * .5)) rv2 = 100 * self.k2 * (np.cos(f2 + self.w2) + self.e2 * np.cos(self.w2)) offset = np.zeros(len(t)) idx = t < 57300 offset[idx] = self.offset1 offset[~idx] = self.offset2 # The last part is not "corrected" with jitter jitter = np.zeros(len(t)) jitter[idx] = self.alpha * jitter_smooth return rv1 + rv2 + offset + jitter
def get_value(self, t): # Planet 1 M_anom1 = 2 * np.pi / np.exp(self.P1) * (t - np.exp(self.tau1)) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2 * np.arctan( np.sqrt((1 + self.e1) / (1 - self.e1)) * np.tan(e_anom1 * .5)) rv1 = np.exp( self.k1) * (np.cos(f1 + self.w1) + self.e1 * np.cos(self.w1)) # Planet 2 M_anom2 = 2 * np.pi / np.exp(self.P2) * (t - np.exp(self.tau2)) e_anom2 = solve_kep_eqn(M_anom2, self.e2) f2 = 2 * np.arctan( np.sqrt((1 + self.e2) / (1 - self.e2)) * np.tan(e_anom2 * .5)) rv2 = np.exp( self.k2) * (np.cos(f2 + self.w2) + self.e2 * np.cos(self.w2)) # correct jitter by a factor 'm' rv_j = np.zeros(len(t)) for i in range(len(t)): if t[i] in BJD: rv_j = self.m * Jitter_smooth[i] return rv1 + rv2 + rv_j + self.offset
def get_value(self, t): # Planet 1 M_anom1 = 2*np.pi/(100*self.P1) * (t - 100*self.tau1) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2*np.arctan( np.sqrt((1+self.e1)/(1-self.e1))*np.tan(e_anom1*.5) ) rv1 = 100*self.k1*(np.cos(f1 + self.w1) + self.e1*np.cos(self.w1)) # Planet 2 M_anom2 = 2*np.pi/(100*self.P2) * (t - 100*self.tau2) e_anom2 = solve_kep_eqn(M_anom2, self.e2) f2 = 2*np.arctan( np.sqrt((1+self.e2)/(1-self.e2))*np.tan(e_anom2*.5) ) rv2 = 100*self.k2*(np.cos(f2 + self.w2) + self.e2*np.cos(self.w2)) return rv1 + rv2 + self.offset + self.alpha * jitter_smooth
def get_value(self, t): M_anom = 2 * np.pi / np.exp(self.P) * (t.flatten() - np.exp(self.tau)) e_anom = solve_kep_eqn(M_anom, self.e0) f = 2 * np.arctan( np.sqrt((1 + self.e0) / (1 - self.e0)) * np.tan(e_anom * .5)) return np.exp(self.k) * (np.cos(f + self.w) + self.e0 * np.cos(self.w)) - self.offset
def kep_orb(t, P, tau, k, w, e0, offset): M_anom = 2*np.pi/P * (t.flatten() - tau) e_anom = solve_kep_eqn(M_anom, e0) f = 2*np.arctan( np.sqrt((1+e0)/(1-e0))*np.tan(e_anom*.5) ) rv = k * (np.cos(f + w) + e0*np.cos(w)) return rv + offset
def get_value(self, t): e_anom = solve_kep_eqn(self.n * (t.flatten() - self.tau), self.e0) f = 2 * np.arctan2( np.sqrt(1 + self.e0) * np.sin(e_anom * .5), np.sqrt(1 - self.e0) * np.cos(e_anom * .5)) return self.k * (np.cos(f + self.w) + self.e0 * np.cos(self.w)) + self.offset
def get_value(self, t): M_anom = 2 * np.pi / self.P * (t - self.tau) e_anom = solve_kep_eqn(M_anom, self.e0) f = 2 * np.arctan( np.sqrt((1 + self.e0) / (1 - self.e0)) * np.tan(e_anom * .5)) rv = self.k * (np.cos(f + self.w0) + self.e0 * np.cos(self.w0)) return rv + self.offset
def get_value(self, t): # Planet 1 M_anom1 = 2*np.pi/(100*self.P1) * (t - 1000*self.tau1) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2*np.arctan( np.sqrt((1+self.e1)/(1-self.e1))*np.tan(e_anom1*.5) ) rv1 = 100*self.k1*(np.cos(f1 + self.w1) + self.e1*np.cos(self.w1)) # Planet 2 M_anom2 = 2*np.pi/(100*self.P2) * (t - 1000*self.tau2) e_anom2 = solve_kep_eqn(M_anom2, self.e2) f2 = 2*np.arctan( np.sqrt((1+self.e2)/(1-self.e2))*np.tan(e_anom2*.5) ) rv2 = 100*self.k2*(np.cos(f2 + self.w2) + self.e2*np.cos(self.w2)) offset = np.zeros(len(t)) idx = t < 57161 offset[idx] = self.d_harps1 offset[~idx]= self.d_harps2 return rv1 + rv2 + offset
def get_value(self, t): M_anom1 = 2 * np.pi / np.exp( self.P1) * (t.flatten() - np.exp(self.tau1)) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2 * np.arctan( np.sqrt((1 + self.e1) / (1 - self.e1)) * np.tan(e_anom1 * .5)) rv1 = np.exp( self.k1) * (np.cos(f1 + self.w1) + self.e1 * np.cos(self.w1)) M_anom2 = 2 * np.pi / np.exp( self.P2) * (t.flatten() - np.exp(self.tau2)) e_anom2 = solve_kep_eqn(M_anom2, self.e2) f2 = 2 * np.arctan( np.sqrt((1 + self.e2) / (1 - self.e2)) * np.tan(e_anom2 * .5)) rv2 = np.exp( self.k2) * (np.cos(f2 + self.w2) + self.e2 * np.cos(self.w2)) return rv1 + rv2 + 100 * self.offset + self.alpha * Jitter2 * 0
def get_value(self, t): M_anom = 2 * np.pi / self.P * (t.flatten() - self.tau) # print(M_anom) e_anom = solve_kep_eqn(M_anom, self.e0) # print(self.e0) f = 2 * np.arctan( np.sqrt((1 + self.e0) / (1 - self.e0)) * np.tan(e_anom * .5)) return self.k * (np.cos(f + self.w) + self.e0 * np.cos(self.w)) + self.offset
def get_value(self, t): # Planet 1 M_anom1 = 2*np.pi/(1000*self.P1) * (t - 1000*self.tau1) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2*np.arctan( np.sqrt((1+self.e1)/(1-self.e1))*np.tan(e_anom1*.5) ) rv1 = 100*self.k1*(np.cos(f1 + self.w1) + self.e1*np.cos(self.w1)) return rv1 + self.offset1
def get_value(self, t): # Planet 1 M_anom1 = 2 * np.pi / np.exp(self.P1 * 10) * (t - np.exp(self.tau1)) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2 * np.arctan( np.sqrt((1 + self.e1) / (1 - self.e1)) * np.tan(e_anom1 * .5)) rv1 = np.exp( self.k1) * (np.cos(f1 + self.w1) + self.e1 * np.cos(self.w1)) # Planet 2 M_anom2 = 2 * np.pi / np.exp(self.P2 * 10) * (t - np.exp(self.tau2)) e_anom2 = solve_kep_eqn(M_anom2, self.e2) f2 = 2 * np.arctan( np.sqrt((1 + self.e2) / (1 - self.e2)) * np.tan(e_anom2 * .5)) rv2 = np.exp( self.k2) * (np.cos(f2 + self.w2) + self.e2 * np.cos(self.w2)) return rv1 + rv2 + self.offset
def get_value(self, t): # Planet 1 M_anom1 = 2*np.pi/np.exp(10*self.P1) * (t - 1000*self.tau1) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2*np.arctan( np.sqrt((1+self.e1)/(1-self.e1))*np.tan(e_anom1*.5) ) rv1 = 100*self.k1*(np.cos(f1 + self.w1) + self.e1*np.cos(self.w1)) # The last part is not "corrected" with jitter jitter = np.exp(self.alpha) * xy return rv1 + self.offset1 + jitter
def get_value(self, t): # Planet 1 M_anom1 = 2*np.pi/(100*self.P1) * (t - 1000*self.tau1) e_anom1 = solve_kep_eqn(M_anom1, self.e1) f1 = 2*np.arctan( np.sqrt((1+self.e1)/(1-self.e1))*np.tan(e_anom1*.5) ) rv1 = 100*self.k1*(np.cos(f1 + self.w1) + self.e1*np.cos(self.w1)) offset = np.zeros(len(t)) idx = t < 57300 offset[idx] = self.offset1 offset[~idx]= self.offset2 return rv1 + offset
def get_value(self, t): M_anom = 2 * np.pi / (self.P * 100) * (t - self.tau) e_anom = solve_kep_eqn(M_anom, self.e0) f = 2 * np.arctan( np.sqrt((1 + self.e0) / (1 - self.e0)) * np.tan(e_anom * .5)) rv = self.k * (np.cos(f + self.w) + self.e0 * np.cos(self.w)) offset = np.zeros(len(t)) for i in range(len(t)): if t[i] < 57161: offset[i] = self.offset1 else: offset[i] = self.offset2 return rv + offset
def get_value(self, t): M_anom = 2 * np.pi / np.exp(self.P) * (t.flatten() - np.exp(self.tau)) e_anom = solve_kep_eqn(M_anom, self.e0) f = 2 * np.arctan( np.sqrt((1 + self.e0) / (1 - self.e0)) * np.tan(e_anom * .5)) rv = np.exp(self.k) * (np.cos(f + self.w) + self.e0 * np.cos(self.w)) offset = np.zeros(len(t)) for i in range(len(t)): if t[i] in RV_AAT[:, 0]: offset[i] = self.off_aat if t[i] in RV_CHIRON[:, 0]: offset[i] = self.off_chiron if t[i] in RV_FEROS[:, 0]: offset[i] = self.off_feros if t[i] in RV_MJ1[:, 0]: offset[i] = self.off_mj1 if t[i] in RV_MJ3[:, 0]: offset[i] = self.off_mj3 return rv + 100 * offset