def ev_to_image_number(offset_us, source_to_detector_m, time_resolution_us, t_start_us, array):<EOL>
time_tot_us = np.sqrt(<NUM_LIT> / (array * <NUM_LIT:1000>)) * source_to_detector_m * <NUM_LIT:100> / <NUM_LIT><EOL>time_record_us = (time_tot_us + offset_us)<EOL>image_number = (time_record_us - t_start_us) / time_resolution_us<EOL>return image_number<EOL>
convert energy (eV) to image numbers (#)

    Parameters:
    ===========
    numpy array of energy in eV
    offset_us: float. Delay of detector in us
    source_to_detector_m: float. Distance source to detector in m

    Returns:
    ========
    image numbers: array of image number