def Elam_CrossSection(self, element, energies, kind='photo'):
        """returns Elam Cross Section values for an element and energies

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

        energies: energies in eV to calculate cross-sections
        kind:     one of 'photo', 'coh', and 'incoh' for photo-absorption,
                  coherent scattering, and incoherent scattering
                  cross sections, respectively.

        Data from Elam, Ravel, and Sieber.
        """
        if isinstance(element, int):
            element = self.symbol(element)
        energies = 1.0 * as_ndarray(energies)

        tab = ScatteringTable
        if kind == 'photo':
            tab = PhotoAbsorptionTable
        row = self.query(tab).filter(tab.element==element.title()).all()
        if len(row) > 0:
            row = row[0]
        if not isinstance(row, tab):
            return None

        tab_lne = np.array(json.loads(row.log_energy))
        if kind.lower().startswith('coh'):
            tab_val = np.array(json.loads(row.log_coherent_scatter))
            tab_spl = np.array(json.loads(row.log_coherent_scatter_spline))
        elif kind.lower().startswith('incoh'):
            tab_val = np.array(json.loads(row.log_incoherent_scatter))
            tab_spl = np.array(json.loads(row.log_incoherent_scatter_spline))
        else:
            tab_val = np.array(json.loads(row.log_photoabsorption))
            tab_spl = np.array(json.loads(row.log_photoabsorption_spline))

        emin_tab = 10*int(0.102*np.exp(tab_lne[0]))
        energies[np.where(energies < emin_tab)] = emin_tab
        out = np.exp(elam_spline(tab_lne, tab_val, tab_spl, np.log(energies)))
        if len(out) == 1:
            return out[0]
        return out
dataset/ETHPy150Open xraypy/xraylarch/plugins/xray/xraydb.py/xrayDB.Elam_CrossSection/original