def chantler_energies(self, element, emin=0, emax=1.e9):
        """ return array of energies (in eV) at which data is
        tabulated in the Chantler tables for a particular element.

        arguments
        ---------
        element:  atomic number, atomic symbol for element

        emin:  lower bound of energies in eV returned (default=0)
        emax:  upper bound of energies in eV returned (default=1.e9)
        """
        tab = ChantlerTable
        row = self.query(tab)
        if isinstance(element, int):
            row = row.filter(tab.id==element).all()
        else:
            row = row.filter(tab.element==element.title()).all()
        if len(row) > 0:
            row = row[0]
        if not isinstance(row, tab):
            return None
        te = np.array(json.loads(row.energy))
        tf1 = np.array(json.loads(row.f1))
        tf2 = np.array(json.loads(row.f2))

        if emin <= min(te):
            nemin = 0
        else:
            nemin = max(0,  -2 + max(np.where(te<=emin)[0]))
        if emax > max(te):
            nemax = len(te)
        else:
            nemax = min(len(te), 2 + max(np.where(te<=emax)[0]))
        region = np.arange(nemin, nemax)
        return te[region] # , tf1[region], tf2[region]
dataset/ETHPy150Open xraypy/xraylarch/plugins/xray/xraydb.py/xrayDB.chantler_energies/original