Beispiel #1
0
    def init_models(self):
        CreateTaskBase.init_models(self)
        self._processing_parameters = queue_model_objects.ProcessingParameters()

        has_shutter_less = HWR.beamline.detector.has_shutterless()
        self._acquisition_parameters.shutterless = has_shutter_less

        self._acquisition_parameters = \
            HWR.beamline.get_default_acquisition_parameters()
Beispiel #2
0
    def init_models(self):
        CreateTaskBase.init_models(self)
        self._energy_scan_result = queue_model_objects.EnergyScanResult()
        self._processing_parameters = queue_model_objects.ProcessingParameters(
        )

        has_shutter_less = HWR.beamline.detector.has_shutterless()
        self._acquisition_parameters.shutterless = has_shutter_less

        self._acquisition_parameters = (
            HWR.beamline.get_default_acquisition_parameters("helical"))
Beispiel #3
0
    def init_models(self):
        """
        Inits data model
        :return: None
        """
        CreateTaskBase.init_models(self)
        self._processing_parameters = queue_model_objects.ProcessingParameters(
        )

        has_shutter_less = HWR.beamline.detector.has_shutterless()
        self._acquisition_parameters.shutterless = has_shutter_less

        self._acquisition_parameters = (
            HWR.beamline.get_default_acquisition_parameters())
        self._acquisition_parameters.num_triggers = 1
        self._acquisition_parameters.num_images_per_trigger = 1
Beispiel #4
0
    def _init_models(self):
        self._char = queue_model_objects.Characterisation()
        self._char_params = self._char.characterisation_parameters
        self._processing_parameters = queue_model_objects.ProcessingParameters(
        )
        self._set_space_group(self._processing_parameters.space_group)

        self._acquisition_parameters = (
            HWR.beamline.get_default_acquisition_parameters("default"))

        self._char_params = (HWR.beamline.characterisation.
                             get_default_characterisation_parameters())
        self._path_template.reference_image_prefix = "ref"
        # The num images drop down default value is 1
        # we would like it to be 2
        self._acquisition_parameters.num_images = 2
        self._char.characterisation_software = (
            queue_model_enumerables.COLLECTION_ORIGIN.EDNA)
        self._path_template.num_files = 2
        self._path_template.compression = False
        self._acquisition_parameters.shutterless = False
Beispiel #5
0
    def __init__(self, parent=None, name=None, fl=0, data_model=None):

        qt_import.QWidget.__init__(self, parent, qt_import.Qt.WindowFlags(fl))
        if name is not None:
            self.setObjectName(name)

        if data_model is None:
            self._model = queue_model_objects.ProcessingParameters()
        else:
            self._model = data_model

        self._model_mib = DataModelInputBinder(self._model)

        self.processing_widget = qt_import.load_ui_file(
            "processing_widget_vertical_layout.ui")

        self.main_layout = qt_import.QVBoxLayout(self)
        self.main_layout.addWidget(self.processing_widget)
        self.main_layout.setSpacing(0)
        self.main_layout.setContentsMargins(0, 0, 0, 0)

        self.processing_widget.space_group_combo.addItems(
            queue_model_enumerables.XTAL_SPACEGROUPS)

        self._model_mib.bind_value_update("cell_a",
                                          self.processing_widget.a_ledit,
                                          float, None)

        self._model_mib.bind_value_update("cell_alpha",
                                          self.processing_widget.alpha_ledit,
                                          float, None)

        self._model_mib.bind_value_update("cell_b",
                                          self.processing_widget.b_ledit,
                                          float, None)

        self._model_mib.bind_value_update("cell_beta",
                                          self.processing_widget.beta_ledit,
                                          float, None)

        self._model_mib.bind_value_update("cell_c",
                                          self.processing_widget.c_ledit,
                                          float, None)

        self._model_mib.bind_value_update("cell_gamma",
                                          self.processing_widget.gamma_ledit,
                                          float, None)

        self._model_mib.bind_value_update(
            "num_residues", self.processing_widget.num_residues_ledit, float,
            None)

        self._model_mib.bind_value_update(
            "resolution_cutoff",
            self.processing_widget.resolution_cutoff_ledit, float, None)

        self._model_mib.bind_value_update(
            "pdb_file", self.processing_widget.pdb_file_ledit, str, None)

        self.processing_widget.space_group_combo.activated.connect(
            self._space_group_change)
        self.processing_widget.run_offline_processing_cbox.stateChanged.connect(
            self._run_offline_processing_toggled)
        self.processing_widget.run_online_processing_cbox.stateChanged.connect(
            self._run_online_processing_toggled)
        self.processing_widget.pdb_file_browse_button.clicked.connect(
            self._browse_clicked)

        self.processing_widget.resolution_cutoff_label.setHidden(True)
        self.processing_widget.resolution_cutoff_ledit.setHidden(True)
        self.processing_widget.pdb_file_label.setHidden(True)
        self.processing_widget.pdb_file_ledit.setHidden(True)
        self.processing_widget.pdb_file_browse_button.setHidden(True)

        if HWR.beamline.offline_processing_methods:
            cbox_text = "Run offline processing ("
            for method in HWR.beamline.offline_processing_methods:
                cbox_text += "%s, " % method
            cbox_text = cbox_text[:-2] + ")"
            self.processing_widget.run_offline_processing_cbox.setText(
                cbox_text)
            self.processing_widget.run_offline_processing_cbox.setChecked(
                HWR.beamline.run_offline_processing)
        else:
            self.processing_widget.run_offline_processing_cbox.setChecked(
                False)
            self.processing_widget.run_offline_processing_cbox.setEnabled(
                False)

        if HWR.beamline.online_processing_methods:
            cbox_text = "Run online processing ("
            for method in HWR.beamline.online_processing_methods:
                cbox_text += "%s, " % method
            cbox_text = cbox_text[:-2] + ")"
            self.processing_widget.run_online_processing_cbox.setText(
                cbox_text)
            self.processing_widget.run_online_processing_cbox.setChecked(
                HWR.beamline.run_online_processing)
        else:
            self.processing_widget.run_online_processing_cbox.setChecked(False)
            self.processing_widget.run_online_processing_cbox.setEnabled(False)