コード例 #1
0
ファイル: csv2fits.py プロジェクト: cbdc/veritas_lc
def resolve_name(name):
    from astropy.coordinates import get_icrs_coordinates as get_coords
    try:
        icrs = get_coords(name)
        pos = (icrs.ra.value, icrs.dec.value)
    except:
        pos = None
    return pos
コード例 #2
0
 def resolve_name(name):
     """
     Resolve object name, return its ICRS position in degrees
     """
     from astropy.coordinates import get_icrs_coordinates as get_coords
     try:
         icrs = get_coords(name)
         pos = (icrs.ra.value, icrs.dec.value)
     except:
         pos = None
     return pos
コード例 #3
0
def resolve_name(name):
    '''
    Return ICRS position for given object 'name'

    Input:
     - name : str
        Object designation/name
    Output:
     - position : (float,float)
        Tuple with (RA,Dec) coordinates in degree
    '''
    from astropy.coordinates import get_icrs_coordinates as get_coords
    try:
        icrs = get_coords(name)
        pos = (icrs.ra.value, icrs.dec.value)
    except:
        pos = None
    return pos