'P': float(data[pmask]['pl_orbper'].iloc[i]), 'inc': 3.14159 / 2, 'e': float(data[pmask]['pl_orbeccen'].iloc[i]), 'omega': 0 }) # create REBOUND simulation sim = generate(objects) print(objects) # year long integrations, timestep = 1 hour sim_data = integrate(sim, objects, 20 * objects[-1]['P'], int(20 * objects[-1]['P'] * 24)) # collect the analytics from the simulation ttv_data = analyze(sim_data) #if name=='Kepler-30': # import pdb; pdb.set_trace() # save simulation data for i in range(pmask.sum()): iname = data[pmask].iloc[i].name data.at[iname, 'ttv'] = np.percentile( np.abs(ttv_data['planets'][i]['ttv']) * 24 * 60, 90) mask = (data.ttv > 1) & (data.pl_ttvflag == 1) print(data[mask].sort_values('ttv', ascending=False).get([
'e': [0.025, 0.05], 'omega': [np.pi / 4, np.pi / 2], # add longitude of ascending node }, { 'm': [2 * mjup / msun, 10 * mjup / msun], 'P': [6, 9], 'inc': [np.pi / 2 * 0.8, np.pi / 2 * 0.9], 'e': [0.05, 0.075], 'omega': [np.pi / 4, np.pi / 2], }, ] # run original simulation sim = generate(objects) sim_data = integrate(sim, objects, 180, 180 * 24) # year long integrations, timestep = 1 minute ttv_data_og = analyze(sim_data) # create a plot f = plt.figure(figsize=(9, 13)) plt.subplots_adjust() ax = [ plt.subplot2grid((6, 2), (0, 0)), plt.subplot2grid((6, 2), (1, 0)), plt.subplot2grid((6, 2), (2, 0)), plt.subplot2grid((6, 2), (3, 0)), plt.subplot2grid((6, 2), (4, 0)), plt.subplot2grid((6, 2), (5, 0)), plt.subplot2grid((6, 2), (1, 1)), plt.subplot2grid((6, 2), (2, 1)), plt.subplot2grid((6, 2), (3, 1)),
def get_ttv(objects, ndays=60, ttvfast=True): sim = generate(objects) sim_data = integrate(sim, objects, ndays, ndays * 24 * 2) # dt=30 minutes return analyze(sim_data, ttvfast=ttvfast)
'e': 0.0457 }, # Uranus { 'm': 17.15 * mearth / msun, 'P': 59799.9, 'inc': 3.14159 / 2, 'e': 0.0113 }, # Neptune ] # inclination does not have a strong effect on TTVs so ignore # create REBOUND simulation sim = generate(objects) # integrate the simulation (Ndays, Noutputs) so dt = Ndays/Noutputs sim_data = integrate(sim, objects, 1000 * 365, 1000 * 365 * 24) # collect the analytics of interest from the simulation ttv_data = analyze(sim_data) # plot the results report(ttv_data) #, savefile='report.png') # TTV results: # Mercury ~ 0-1 min # Venus ~ 3-5 min # Earth ~ 4-6 min # Mars ~ 20-40 minutes # Jupiter ~ 500-1000 minutes # Saturn ~ 1000-1500 minutes