当前位置: 首页>>代码示例>>Python>>正文


Python CreateTaskBase.init_models方法代码示例

本文整理汇总了Python中create_task_base.CreateTaskBase.init_models方法的典型用法代码示例。如果您正苦于以下问题:Python CreateTaskBase.init_models方法的具体用法?Python CreateTaskBase.init_models怎么用?Python CreateTaskBase.init_models使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在create_task_base.CreateTaskBase的用法示例。


在下文中一共展示了CreateTaskBase.init_models方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: init_models

# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import init_models [as 别名]
    def init_models(self):
        CreateTaskBase.init_models(self)
        self._energy_scan_result = qmo.EnergyScanResult()
        self._processing_parameters = qmo.ProcessingParameters()

        if self._beamline_setup_hwobj is not None:
            has_shutter_less = self._beamline_setup_hwobj.detector_has_shutterless()
            self._acquisition_parameters.shutterless = has_shutter_less

            self._acquisition_parameters = self._beamline_setup_hwobj.get_default_acquisition_parameters()
        else:
            self._acquisition_parameters = qmo.AcquisitionParameters()
            self._path_template = qmo.PathTemplate()
开发者ID:pommier,项目名称:mxcube,代码行数:15,代码来源:create_helical_widget.py

示例2: init_models

# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import init_models [as 别名]
    def init_models(self):
        CreateTaskBase.init_models(self)
        
        self._char = queue_model_objects.Characterisation()
        self._char_params = self._char.characterisation_parameters
        self._char_params.experiment_type = queue_model_enumerables.EXPERIMENT_TYPE.OSC
        self._processing_parameters = queue_model_objects.ProcessingParameters()

        if self._beamline_setup_hwobj is not None:            
            self._acquisition_parameters = self._beamline_setup_hwobj.\
                get_default_characterisation_parameters()

            try:
                transmission = self._beamline_setup_hwobj.transmission_hwobj.getAttFactor()
                transmission = round(float(transmission), 1)
            except AttributeError:
                transmission = 0

            try:
                resolution = self._beamline_setup_hwobj.resolution_hwobj.getPosition()
                resolution = round(float(resolution), 4)
            except AttributeError:
                resolution = 0

            try:
                energy = self._beamline_setup_hwobj.energy_hwobj.getCurrentEnergy()
                energy = round(float(energy), 2)
            except AttributeError:
                energy = 0

            self._acquisition_parameters.resolution = resolution
            self._acquisition_parameters.energy = energy
            self._acquisition_parameters.transmission = transmission
        else:
            self._acquisition_parameters = queue_model_objects.AcquisitionParameters()
            
        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._acquisition_parameters.shutterless = False
开发者ID:SOLEILPX,项目名称:mxcube,代码行数:46,代码来源:create_char_widget.py

示例3: init_models

# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import init_models [as 别名]
    def init_models(self):
        CreateTaskBase.init_models(self)

        self._energy_scan_result = queue_model_objects.EnergyScanResult()
        self._processing_parameters = queue_model_objects.ProcessingParameters()

        if self._beamline_setup_hwobj is not None:
            has_shutter_less = self._beamline_setup_hwobj.\
                               detector_has_shutterless()
            self._acquisition_parameters.shutterless = has_shutter_less
            self._acquisition_parameters = self._beamline_setup_hwobj.\
                get_default_acquisition_parameters()

            try:
                transmission = self._beamline_setup_hwobj.transmission_hwobj.getAttFactor()
                transmission = round(float(transmission), 2)
            except AttributeError:
                transmission = 0

            try:
                resolution = self._beamline_setup_hwobj.resolution_hwobj.getPosition()
                resolution = round(float(resolution), 2)
            except AttributeError:
                resolution = 0

            try:
                energy = self._beamline_setup_hwobj.\
                         energy_hwobj.getCurrentEnergy()
                if energy:
                    energy = round(float(energy), 4)
                else:
                    energy = round(float(-1), 4)
            except AttributeError:
                energy = 0

            self._acquisition_parameters.resolution = resolution
            self._acquisition_parameters.energy = energy
            self._acquisition_parameters.transmission = transmission
        else:
            self._acquisition_parameters = queue_model_objects.\
                                           AcquisitionParameters()
开发者ID:alexgobbo,项目名称:mxcube,代码行数:43,代码来源:create_discrete_widget.py

示例4: init_models

# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import init_models [as 别名]
 def init_models(self):
     CreateTaskBase.init_models(self)
开发者ID:IvarsKarpics,项目名称:mxcube,代码行数:4,代码来源:create_workflow_widget.py

示例5: init_models

# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import init_models [as 别名]
 def init_models(self):
     CreateTaskBase.init_models(self)
     self.enery_scan = queue_model_objects.EnergyScan()
     self._path_template.start_num = 1
     self._path_template.num_files = 1
     self._path_template.suffix = 'raw'
开发者ID:alexgobbo,项目名称:mxcube,代码行数:8,代码来源:create_energy_scan_widget.py

示例6: init_models

# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import init_models [as 别名]
 def init_models(self):
     CreateTaskBase.init_models(self)
     self._energy_scan_result = queue_model_objects.EnergyScanResult()
     self._processing_parameters = queue_model_objects.ProcessingParameters()
开发者ID:IvarsKarpics,项目名称:mxcube,代码行数:6,代码来源:create_discrete_widget.py

示例7: init_models

# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import init_models [as 别名]
 def init_models(self):
     CreateTaskBase.init_models(self)
     self._path_template.start_num = 1
     self._path_template.num_files = 1
     self._path_template.suffix = "raw"
开发者ID:IvarsKarpics,项目名称:mxcube,代码行数:7,代码来源:create_xrf_spectrum_widget.py


注:本文中的create_task_base.CreateTaskBase.init_models方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。