示例#1
0
def get_exo_catalog():
    """
    Retrieve the locally saved CoRoT exoplanet database.
    """
    exofile = os.path.join(cc.path.ivsdata, "catalogs", "corot", "exo", "exo.tsv")
    # exofile = config.get_datafile('catalogs/corot/exo','exo.tsv')
    data, units, comms = vizier.tsv2recarray(exofile)
    return data, units, comms
示例#2
0
def get_exo_catalog():
    """
    Retrieve the locally saved CoRoT exoplanet database.
    """
    exofile = os.path.join(cc.path.ivsdata, 'catalogs', 'corot', 'exo',
                           'exo.tsv')
    #exofile = config.get_datafile('catalogs/corot/exo','exo.tsv')
    data, units, comms = vizier.tsv2recarray(exofile)
    return data, units, comms
示例#3
0
def resolve(corot_id):
    """
    Convert a CoRoT ID to ra,dec.
    
    @param corot_id: CoRoT exoplanet identification number
    @type corot_id: int
    @return: RA, DEC (degrees)
    @rtype: float,float
    """
    exofile = os.path.join(cc.path.ivsdata, "catalogs", "corot", "exo", "exo.tsv")
    # exofile = config.get_datafile('catalogs/corot/exo','exo.tsv')
    data, units, comms = vizier.tsv2recarray(exofile)
    index = np.argmin(np.abs(data["CoRoT"] - corot_id))
    if data["CoRoT"][index] - corot_id == 0:
        logger.info("CoRoT %s resolved to RA=%s, DEC=%s" % (corot_id, data[index]["_RAJ2000"], data[index]["_DEJ2000"]))
        return data[index]["_RAJ2000"], data[index]["_DEJ2000"]
    else:
        logger.info("CoRoT %s not resolved by CoRoT catalog")
示例#4
0
def resolve(corot_id):
    """
    Convert a CoRoT ID to ra,dec.
    
    @param corot_id: CoRoT exoplanet identification number
    @type corot_id: int
    @return: RA, DEC (degrees)
    @rtype: float,float
    """
    exofile = os.path.join(cc.path.ivsdata, 'catalogs', 'corot', 'exo',
                           'exo.tsv')
    #exofile = config.get_datafile('catalogs/corot/exo','exo.tsv')
    data, units, comms = vizier.tsv2recarray(exofile)
    index = np.argmin(np.abs(data['CoRoT'] - corot_id))
    if data['CoRoT'][index] - corot_id == 0:
        logger.info(
            'CoRoT %s resolved to RA=%s, DEC=%s' %
            (corot_id, data[index]['_RAJ2000'], data[index]['_DEJ2000']))
        return data[index]['_RAJ2000'], data[index]['_DEJ2000']
    else:
        logger.info('CoRoT %s not resolved by CoRoT catalog')