def eV_function(energies):
    """ Convert energy in eV into wavelengths in nm """
    Plancks_h = 6.62606957*1e-34   # Planck's constant
    speed_c = 299792458            # Speed of light in vacuum
    charge_e = 1.602176565*1e-19   # Charge of an electron
    wls = Plancks_h*speed_c*1e9/(energies*charge_e)
    return wls