Source code for irfpy.mels.energy

""" Enery table of MEX/ELS
"""

import numpy as np

from irfpy.mels import calpds

[docs]def get_default_table(fill_playback=np.nan): """ To return the default energy table of MEX/ELS. It returns the (128,) shaped array, corresponding to the energy in eV for each energy channel. The energy table is indeed depending on the azimuthal channel, so it is recommended to refer to the :attr:`irfpy.mels.calpds.energy_table` for serious analysis. :keyword fill_playback: The last energy step (playback channel) is filled by the given value. If not given, np.nan is placed. :return: The energy table in 128 steps in eV. >>> from irfpy.mels import energy as els3ene >>> etbl = els3ene.get_default_table() >>> print('{:.1f}'.format(etbl[70])) # Energy for the step 70. 63.2 """ etbl = np.array(calpds.simple_energy_table, copy=True) etbl[-1] = fill_playback return etbl