def attach_measure_zlp(api, window):
    """Attaches the measure ZLP computation to the target data item in the window."""
    target_data_item = window.target_data_item
    if target_data_item and target_data_item.display_xdata.is_data_1d:
        api.library.create_computation('nion.eels_analysis.measure_zlp',
            inputs={'src': target_data_item}, outputs={'zlp_interval': None})
