def __build_menus(self, document_window): api = self.__api window = Facade.DocumentWindow(document_window) eels_menu = document_window.get_or_create_menu("eels_menu", _("EELS"), "window_menu") eels_menu.add_separator() eels_menu.add_menu_item( _("Subtract Background from Signal"), functools.partial( BackgroundSubtraction.subtract_background_from_signal, api, window)) eels_menu.add_separator() eels_menu.add_menu_item( _("Map Signal"), functools.partial(BackgroundSubtraction.use_signal_for_map, api, window)) eels_menu.add_menu_item( _("Map Thickness"), functools.partial(ThicknessMap.map_thickness, api, window)) eels_menu.add_separator() eels_menu.add_menu_item( _("Align ZLP (max method)"), functools.partial(AlignZLP.align_zlp, api, window)) eels_menu.add_separator() eels_menu.add_menu_item( _("Show Live Thickness Measurement"), functools.partial(LiveThickness.attach_measure_thickness, api, window)) eels_menu.add_menu_item( _("Show Live ZLP Measurement"), functools.partial(LiveZLP.attach_measure_zlp, api, window))
def __build_menus(self, document_window): api = self.__api window = Facade.DocumentWindow(document_window) eels_menu = document_window.get_or_create_menu("eels_menu", _("EELS"), "window_menu") eels_menu.add_separator() eels_menu.add_menu_item(_("Fit Background"), functools.partial(BackgroundSubtraction.subtract_background_from_signal, api, window)) # eels_menu.add_menu_item(_("Fit Zero Loss Peak"), functools.partial(PeakFitting.fit_zero_loss_peak, api, window)) eels_menu.add_separator() # eels_menu.add_menu_item(_("Subtract Background"), functools.partial(BackgroundSubtraction.subtract_background, api, window)) # eels_menu.add_separator() eels_menu.add_menu_item(_("Map Signal"), functools.partial(BackgroundSubtraction.use_signal_for_map, api, window)) eels_menu.add_menu_item(_("Map Thickness"), functools.partial(ThicknessMap.map_thickness, api, window)) eels_menu.add_separator() eels_menu.add_menu_item(_("Align ZLP (max method)"), functools.partial(AlignZLP.align_zlp, api, window)) eels_menu.add_menu_item(_("Align ZLP (com method)"), functools.partial(AlignZLP.align_zlp_com, api, window)) eels_menu.add_menu_item(_("Align ZLP (peak fit method)"), functools.partial(AlignZLP.align_zlp_fit, api, window)) eels_menu.add_separator() eels_menu.add_menu_item(_("Show Live Thickness Measurement"), functools.partial(LiveThickness.attach_measure_thickness, api, window)) eels_menu.add_menu_item(_("Show Live ZLP Measurement"), functools.partial(LiveZLP.attach_measure_zlp, api, window)) eels_menu.add_separator() eels_menu.add_menu_item(_("Calibrate Spectrum"), functools.partial(AlignZLP.calibrate_spectrum, api, window)) eels_menu.add_separator() eels_menu.add_menu_item(_("Measure Temperature"), functools.partial(Thermometry.measure_temperature, api, window)) eels_menu.add_separator()
def display_data_item( document_controller: DocumentController.DocumentController, data_item: DataItem.DataItem) -> None: Facade.DocumentWindow(document_controller).display_data_item( Facade.DataItem(data_item))