def __init__(self, skipUpdate=False): self.dataFileName = os.path.join("pyasl", "resBased", "sweetcat.csv.gz") configFilename = os.path.join("pyasl", "resBased", "sweetcat.cfg") pp.PyAUpdateCycle.__init__(self, configFilename, "sweetcatupdate") self.names = [ 'star', 'hd', 'ra', 'dec', 'vmag', 'ervmag', 'par', 'erpar', 'parsource', 'teff', 'erteff', 'logg', 'erlogg', 'logglc', 'erlogglc', 'vt', 'ervt', 'metal', 'ermetal', 'mass', 'ermass', 'author', 'source', 'update', 'comment' ] # Check whether data file exists self._fs = pp.PyAFS() if (self.needsUpdate() or (not self._fs.fileExists(self.dataFileName))) and (not skipUpdate): # Data needs update print("Downloading exoplanet data from SWEET-Cat archive") self._update(self._downloadData) print("Saved data to file: ", self.dataFileName, " in data directory,") print(" which has been configured as: ", self._fs.dpath) print("By default, the data will be downloaded anew every 7 days.") print( "You can use the `changeDownloadCycle` to change this behavior." ) self._read_sweetcat()
def __init__(self): self.data = None self.dataFileName = os.path.join("pyasl", "resBased", "NEXA.csv.gz") configFileName = os.path.join("pyasl", "resBased", "NEXA.cfg") pp.PyAUpdateCycle.__init__(self, configFileName, "NEXA") # Define columns to select # Column name, Description, Unit self._columns = {} self._columns[0] = ["pl_hostname", "Name of host star", "", "S15"] self._columns[1] = ["pl_name", "Name of the planet", "", "S15"] self._columns[2] = [ "pl_letter", "Planet letter (e.g., b, c, d, etc.)", "", "S2" ] self._columns[3] = ["ra", "Right ascension", "deg", np.float] self._columns[4] = ["dec", "Declination", "deg", np.float] self._columns[5] = [ "pl_orbper", "Planetary orbital period", "d", np.float ] self._columns[6] = ["pl_massj", "Planetary mass", "MJ", np.float] self._columns[7] = ["pl_radj", "Planetary radius", "RJ", np.float] self._columns[8] = [ "pl_trandep", "Central depth of transit", "%", np.float ] self._columns[9] = ["pl_trandur", "Transit duration", "d", np.float] self._columns[10] = ["pl_tranmid", "Transit midpoint", "BJD", np.float] self._columns[11] = ["pl_orbsmax", "Semi-major-axis", "AU", np.float] self._columns[12] = [ "pl_orbincl", "Orbital inclination of planet", "deg", np.float ] self._columns[13] = ["st_rad", "Stellar radii", "Solar", np.float] self._columns[14] = ["st_dist", "Distance to star", "pc", np.float] self._columns[15] = ["st_mass", "Stellar mass", "Solar", np.float] self._columns[16] = [ "st_teff", "Effective temperature of star", "K", np.float ] self._columns[17] = ["st_vsini", "Stellar vsin(i)", "km/s", np.float] self._columns[18] = [ "st_logg", "Stellar surface gravity", "cm/s**2", np.float ] self._columns[19] = ["st_acts", "Stellar S-Index", "", np.float] self._columns[20] = [ "st_vj", "Stellar V-band brightness", "mag", np.float ] # Check whether data file exists self._fs = pp.PyAFS() if self.needsUpdate(): # Data needs update print("Downloading exoplanet data from NASA exoplanet archive") self._update(self._downloadData) print("Saved data to file: ", self.dataFileName, " in data directory,") print(" which has been configured as: ", self._fs.dpath) print("By default, the data will be downloaded anew every 7 days.") print( "You can use the `changeDownloadCycle` to change this behavior." ) self._readData()
def __init__(self, skipUpdate=False, forceUpdate=False): if not _ic.check["astropy"]: raise(PE.PyARequiredImport("The 'astropy' package is not installed. astropy is required to read VO tables.", solution="Please install 'astropy'.")) configFilename = os.path.join("pyasl", "resBased", "epeuvo.cfg") pp.PyAUpdateCycle.__init__(self, configFilename, "ExoUpdate") self.dataFileName = os.path.join("pyasl", "resBased", "epeu.vo.gz") self._fs = pp.PyAFS() if forceUpdate: self._update(self._download) elif (self.needsUpdate() or (not self._fs.fileExists(self.dataFileName))) and (not skipUpdate): # Download data if data file does not exist or # regular update is indicated self._update(self._download) self._readData()
def __init__(self, skipUpdate=False): configFilename = os.path.join("pyasl", "resBased", "epeu.cfg") pp.PyAUpdateCycle.__init__(self, configFilename, "ExoUpdate") self.dataFileName = os.path.join("pyasl", "resBased", "epeu.csv.gz") self._fs = pp.PyAFS() if self.needsUpdate() and (not skipUpdate): self._update(self._download) # Define internal column names and data types self._columns = {} self._columns[0] = ["plName", "Name of planet", "", "S15"] self._columns[1] = ["plMass", "Mass of planet", "MJ", np.float] self._columns[2] = ["plRadius", "Radius of planet", "RJ", np.float] self._columns[3] = ["period", "Orbital period", "d", np.float] self._columns[4] = ["sma", "Semi-major axis", "AU", np.float] self._columns[5] = [ "eccentricity", "Orbital eccentricity", "", np.float ] self._columns[6] = [ "inclination", "Orbital inclination", "deg", np.float ] self._columns[7] = [ "angDistance", "Angular Distance", "arcsec", np.float ] self._columns[8] = ["pubStatus", "Publication status", "", "S2"] self._columns[9] = ["discovered", "Year of discovery", "yr", np.float] self._columns[10] = ["updated", "Date of data update", "", "S10"] self._columns[11] = [ "omega", "Argument of Periastron", "deg", np.float ] self._columns[12] = ["tperi", "Epoch of Periastron", "d", np.float] self._columns[13] = ["detType", "Detection type", "", "S2"] self._columns[14] = [ "molecules", "List of detected molecules", "", "S10" ] self._columns[15] = ["stName", "Name of star", "", "S15"] self._columns[16] = ["ra", "Right ascension (J2000)", "hms", "S12"] self._columns[17] = ["dec", "Declination (J2000)", "dms", "S12"] self._columns[18] = [ "mag_v", "V magnitude of a host star", "mag", np.float ] self._columns[19] = [ "mag_i", "I magnitude of a host star", "mag", np.float ] self._columns[20] = [ "mag_j", "J magnitude of a host star", "mag", np.float ] self._columns[21] = [ "mag_h", "H magnitude of a host star", "mag", np.float ] self._columns[22] = [ "mag_k", "K magnitude of a host star", "mag", np.float ] self._columns[23] = ["dist", "Distance to host star", "pc", np.float] self._columns[24] = ["mh", "Metallicity of host star", "dex", np.float] self._columns[25] = ["stMass", "Stellar mass", "solar", np.float] self._columns[26] = ["stRadius", "Radius of star", "solar", np.float] self._columns[27] = ["SpT", "Spectral type of host star", "", "S5"] self._columns[28] = ["stAge", "Stellar age", "Ga", np.float] self._columns[29] = [ "stTeff", "Stellar effective temperature", "K", np.float ] self._columns[30] = ["plRadMM", "Measuring method of Rpl", "", "S15"] # Identify exoplanet.eu csv column names with internal column names self._ident = {"name":"plName", "mass":"plMass", "radius":"plRadius", \ "semi_major_axis":"sma", "angular_distance":"angDistance", "publication_status":"pubStatus", \ "detection_type":"detType", "star_name":"stName", "mag_v":"mag_v", \ "mag_i":"mag_i", "mag_j":"mag_j", "mag_h":"mag_h", \ "mag_k":"mag_k", "star_distance":"dist", "star_metallicity":"mh", \ "star_mass":"stMass", "star_radius":"stRadius", "star_sp_type":"SpT", \ "star_age":"stAge", "star_teff":"stTeff", "orbital_period":"period", \ "radius_detection_type":"plRadMM"} self._readData()
def __init__(self, skipUpdate=False, verbose=False): self.data = None self._verbose = verbose self.dataFileName = os.path.join("pyasl", "resBased", "eporg.csv.gz") configFilename = os.path.join("pyasl", "resBased", "eporg.cfg") pp.PyAUpdateCycle.__init__(self, configFilename, "eporgupdate") # Define columns to select # Column name, Description, Unit self._columns = {} # planetary parameters self._columns[0] = ["pl_name", "Name of the planet", "", "S15"] self._columns[1] = [ "pl_orbper", "Planetary orbital period", "d", np.float ] self._columns[2] = ["pl_massj", "Planetary mass", "MJ", np.float] self._columns[3] = [ "pl_msini", "Minimum planetary mass", "MJ", np.float ] self._columns[4] = ["pl_radj", "Planetary radius", "RJ", np.float] self._columns[5] = [ "pl_trandep", "Central depth of transit", "(r_p/r_star)^2", np.float ] self._columns[6] = [ "pl_impact", "Impact Parameter", "Stellar Radii", np.float ] self._columns[7] = ["pl_trandur", "Duration of transit", "d", np.float] self._columns[8] = ["pl_tranmid", "Transit midpoint", "BJD", np.float] self._columns[9] = [ "pl_tperi", "Time of Periastron passage", "d", np.float ] self._columns[10] = ["pl_orbsmax", "Semi-major-axis", "AU", np.float] self._columns[11] = [ "pl_orbsmaxr", "Ratio sma to R_star", "Stellar Radii", np.float ] self._columns[12] = [ "pl_orbincl", "Orbital inclination of planet", "deg", np.float ] self._columns[13] = [ "pl_missal", "Orbital misalignment of planet ", "deg", np.float ] self._columns[14] = [ "pl_omega", "Argument of Periastron", "deg", np.float ] self._columns[15] = [ "pl_ecc", "Planetary orbital eccentricity", "", np.float ] self._columns[16] = [ "pl_grav", "Planetary surface gravity", "log10(cm/s^2)", np.float ] self._columns[17] = [ "pl_dens", "Planetary Density", "g/cm^3", np.float ] self._columns[18] = ["pl_dtype", "Detection type", "", "S27"] self._columns[19] = ["KOI", "Kepler ID (if available)", "", np.float] # stellar pars self._columns[20] = ["pl_hostname", "Name of host star", "", "S15"] self._columns[21] = ["st_binary", "Binary Flag", "", np.float] self._columns[22] = ["st_rad", "Radius of star", "Solar", np.float] self._columns[23] = ["st_dist", "Distance to Star", "pc", np.float] self._columns[24] = ["st_par", "Stellar parallax", "mas", np.float] self._columns[25] = ["st_mass", "Stellar mass", "Solar", np.float] self._columns[26] = [ "st_teff", "Stellar effective temperature", "K", np.float ] self._columns[27] = ["st_vsini", "Stellar vsin(i)", "km/s", np.float] self._columns[28] = [ "st_logg", "Stellar surface gravity", "cm/s**2", np.float ] self._columns[29] = ["st_acts", "Stellar S-Index ", "", np.float] self._columns[30] = [ "st_actc", "Stellar chromospheric activity", "", np.float ] self._columns[31] = [ "st_vj", "Stellar V-band brightness", "mag", np.float ] self._columns[32] = ["st_fe", "Stellar metallicity", "", np.float] self._columns[33] = [ "st_radv", "System radial velocity", "km/s", np.float ] self._columns[34] = ["st_dens", "Density of star", "g/cm^3", np.float] self._columns[35] = ["K", "Velocity Semi-amplitude", "m/s", np.float] self._columns[36] = ["dec", "Declination (J2000)", "dms", "S12"] self._columns[37] = ["ra", "Right ascension (J2000)", "hms", "S12"] self._ident = { "STAR": "pl_hostname", "NAME": "pl_name", "PER": "pl_orbper", "MASS": "pl_massj", "MSINI": "pl_msini", "R": "pl_radj", "DEPTH": "pl_trandep", "B": "pl_impact", "T14": "pl_trandur", "TT": "pl_tranmid", "T0": "pl_tperi", "A": "pl_orbsmax", "AR": "pl_orbsmaxr", "I": "pl_orbincl", "LAMBDA": "pl_missal", "OM": "pl_omega", "ECC": "pl_ecc", "GRAVITY": "pl_grav", "DENSITY": "pl_dens", "PLANETDISCMETH": "pl_dtype", "BINARY": "st_binary", "RSTAR": "st_rad", "DIST": "st_dist", "PAR": "st_par", "MSTAR": "st_mass", "TEFF": "st_teff", "LOGG": "st_logg", "VSINI": "st_vsini", "SHK": "st_acts", "RHK": "st_actc", "V": "st_vj", "FE": "st_fe", "GAMMA": "st_radv", "RHOSTAR": "st_dens", "DEC_STRING": "dec", "RA_STRING": "ra", "KOI": "KOI", "K": "K" } # Check whether data file exists self._fs = pp.PyAFS() if not skipUpdate: if self.needsUpdate() or (not self._fs.fileExists( self.dataFileName)): # Data needs update print( "Downloading exoplanet data from explanets.org exoplanet archive" ) self._update(self._downloadData) print("Saved data to file: ", self.dataFileName, " in data directory,") print(" which has been configured as: ", self._fs.dpath) print( "By default, the data will be downloaded anew every 7 days." ) print( "You can use the `changeDownloadCycle` to change this behavior." ) self._readData()
def __init__(self, fn="default"): self._fs = PP.PyAFS() self._readData( os.path.join(os.path.dirname(__file__), "transCurves.dat"))
def __init__(self): self._fs = pp.PyAFS() self._getListOfModelGrids()