def s_to_ev(offset_us, source_to_detector_m, array):
lambda_a = <NUM_LIT> * (array + offset_us * <NUM_LIT>) / source_to_detector_m<EOL>return (<NUM_LIT> / pow(lambda_a, <NUM_LIT:2>)) / <NUM_LIT><EOL>
convert time (s) to energy (eV)
    Parameters:
    ===========
    numpy array of time in s
    offset_us: float. Delay of detector in us
    source_to_detector_m: float. Distance source to detector in m

    Returns:
    ========
    numpy array of energy in eV