import pickle


def load_sneden(whichdata):
    """ Loading the r-process isotopes from Sneden et al. 2008 (pickled in SMHR) """
    assert whichdata in ['rproc','sproc','sneden'], whichdata
    _datadir = "/Users/alexji/smhr/smh/data/isotopes"
    datamap = {'rproc':'sneden08_rproc_isotopes.pkl',
               'sproc':'sneden08_sproc_isotopes.pkl',
               'sneden':'sneden08_all_isotopes.pkl'}
    with open(_datadir+'/'+datamap[whichdata],'rb') as f:
        isotopes = pickle.load(f, encoding='latin1')
    return isotopes