本文整理汇总了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()
示例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
示例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()
示例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)
示例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'
示例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()
示例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"