def init_api(self):
        """
        In plate mode osciallation is start is in the middle of grid
        """
        CreateTaskBase.init_api(self)

        self._xray_imaging_parameters_widget.init_api()
        api.detector_distance.connect(
            "positionChanged",
            self._xray_imaging_parameters_widget.set_detector_distance,
        )
    def init_api(self):
        CreateTaskBase.init_api(self)

        try:
            self._periodic_table_widget.set_elements(api.energyscan.getElements())

            max_transmission_value = api.energyscan.get_max_transmission_value()

            self._adjust_transmission_cbox.setEnabled(True)
            self._adjust_transmission_cbox.setChecked(True)
            api.energyscan.adjust_transmission(True)

            if max_transmission_value:
                self._max_transmission_ledit.setText("%.2f" % max_transmission_value)
        except BaseException:
            pass
    def init_api(self):
        """
        In plate mode oscillation start is in the middle of the grid
        """
        CreateTaskBase.init_api(self)

        self._acq_widget.acq_widget_layout.osc_start_label.setText(
            "Oscillation middle:"
        )

        hor_size, ver_size = api.beam_info.get_beam_size()
        self.spacing[0] = hor_size
        self.spacing[1] = ver_size

        self._advanced_methods_widget.hor_spacing_ledit.setText(
            "%.1f" % (hor_size * 1000)
        )
        self._advanced_methods_widget.ver_spacing_ledit.setText(
            "%.1f" % (ver_size * 1000)
        )

        api.graphics.connect("shapeCreated", self.shape_created)
        api.graphics.connect("shapeChanged", self.shape_changed)
        api.graphics.connect("shapeDeleted", self.shape_deleted)