INNER CODE UNIT · Python

_elemIndx

jobovy/gaia_tools · gaia_tools/load/__init__.py:470

def _elemIndx(elem,dr=14):
    """Version of apogee.tools.elemIndx for internal use here, not as general"""
    if dr == 14:
        _ELEM_SYMBOL= ['c','ci','n','o','na','mg','al','si','p','s','k','ca',
                       'ti','tiii','v','cr','mn','fe','co','ni','cu','ge','ce',
                       'rb','y','nd']
    else:
        raise ValueError('The functionality you are attempting to use is only available for APOGEE DR14')
    try:
        return _ELEM_SYMBOL.index(elem.lower())
    except ValueError:
        raise KeyError("Element %s is not part of the APOGEE elements (can't do everything!) or something went wrong)" % elem)

def _swap_in_astroNN(data,astroNNdata):
    for tag,indx in zip(['TEFF','LOGG'],[0,1]):
        data[tag]= astroNNdata['astroNN'][:,indx]
        data[tag+'_ERR']= astroNNdata['astroNN_error'][:,indx]
    for tag,indx in zip(['C','CI','N','O','Na','Mg','Al','Si','P','S','K',

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…