devctrl.data.spectrum.util.get_matching_or_in_range_energies#

get_matching_or_in_range_energies(has_Es: list | ndarray, Es=None, wavelengths=None)[source]#

Return slice from has_Es list, accordingt Es or wavelengths. Only one of Es or wavelengths may be given. :param has_Es: List of available Es. The returned wavlengths are a subset of these. :param Es: List of Es, range of Es (as tuple, with at least (min, max)), or None to use all Es. Conflicts with wavelengths. :param wavelengths: List of wavelengths (nm), range of wavelengths (as tuple, with at least (min, max)), or None to use all Es. Conflicts with Es