beginyear,endyear = fun.begin_and_end_years() print "Generating graphics for years ",beginyear, " to ",endyear weblink = 'http://exoplanetarchive.ipac.caltech.edu/cgi-bin/nstedAPI/nph-nstedAPI?' for j in range(beginyear,endyear): # 1. Pull exoplanet data using NASA API print 'Retrieving planets detected before ',str(j) disc = '+AND+pl_disc<'+str(j+1) radii = exo.pull_exoplanet_radii(extraconditions=disc) # If requested, pull planets with masses and calculate radii if guess_radius_from_mass: print 'Retrieving other planets with masses' disc = disc+'+AND+pl_rade+is+null' masses = exo.pull_exoplanet_masses(extraconditions=disc) guessradii = fun.guess_radii_from_masses_PHL(masses) # Add to confirmed candidate list if(len(radii) > 0): radii = np.concatenate((radii,guessradii),axis=0) else: radii = guessradii
area_spacing_factor = 2.0 # Increases the area of the circle to allow gaps placing_spacing = 1.1 # Tolerance for distance between planets. 1=planets can touch graphic_border = 1.4 # How big is the graphic relative to the area of the annulus/circle? guess_radius_from_mass = True # Set this to true to estimate planet radius from mass # 1. Pull exoplanet data using NASA API weblink = 'http://exoplanetarchive.ipac.caltech.edu/cgi-bin/nstedAPI/nph-nstedAPI?' # First confirmed exoplanets print 'Retrieving confirmed planets' radii = exo.pull_exoplanet_radii() # Now candidate exoplanets (Kepler) print 'Retrieving Kepler Candidates' radii_c = exo.pull_candidate_exoplanet_radii() # If requested, pull planets with masses and calculate radii if guess_radius_from_mass: print 'Retrieving other planets with masses' masses = exo.pull_exoplanet_masses(extraconditions='+AND+pl_rade+is+null') guessradii = fun.guess_radii_from_masses_PHL(masses)