本文整理汇总了Python中Qt4_data_path_widget.DataPathWidget.update_data_model方法的典型用法代码示例。如果您正苦于以下问题:Python DataPathWidget.update_data_model方法的具体用法?Python DataPathWidget.update_data_model怎么用?Python DataPathWidget.update_data_model使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Qt4_data_path_widget.DataPathWidget
的用法示例。
在下文中一共展示了DataPathWidget.update_data_model方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CreateCharWidget
# 需要导入模块: from Qt4_data_path_widget import DataPathWidget [as 别名]
# 或者: from Qt4_data_path_widget.DataPathWidget import update_data_model [as 别名]
#.........这里部分代码省略.........
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
def single_item_selection(self, tree_item):
"""
Descript. :
"""
CreateTaskBase.single_item_selection(self, tree_item)
if isinstance(tree_item, Qt4_queue_item.SampleQueueItem):
#self._init_models()
if self._char_params.space_group == "":
sample_model = tree_item.get_model()
self._set_space_group(sample_model.processing_parameters.space_group)
#self._acq_widget.update_data_model(self._acquisition_parameters,
# self._path_template)
#self._char_params_mib.set_model(self._char_params)
elif isinstance(tree_item, Qt4_queue_item.BasketQueueItem):
self.setDisabled(False)
elif isinstance(tree_item, Qt4_queue_item.CharacterisationQueueItem):
if tree_item.get_model().is_executed():
self.setDisabled(True)
else:
self.setDisabled(False)
self._char = tree_item.get_model()
if self._char.get_path_template():
self._path_template = self._char.get_path_template()
self._data_path_widget.update_data_model(self._path_template)
data_collection = self._char.reference_image_collection
self._char_params = self._char.characterisation_parameters
self._char_params_mib.set_model(self._char_params)
self._acquisition_parameters = data_collection.acquisitions[0].\
acquisition_parameters
self._acq_widget.update_data_model(self._acquisition_parameters,
self._path_template)
#self.get_acquisition_widget().use_osc_start(True)
if len(data_collection.acquisitions) == 1:
self.select_shape_with_cpos(self._acquisition_parameters.\
centred_position)
self._processing_parameters = data_collection.processing_parameters
else:
self.setDisabled(True)
def update_processing_parameters(self, crystal):
"""
Descript. :
"""
self._processing_parameters.space_group = crystal.space_group
self._char_params.space_group = crystal.space_group
self._processing_parameters.cell_a = crystal.cell_a
self._processing_parameters.cell_alpha = crystal.cell_alpha
self._processing_parameters.cell_b = crystal.cell_b
self._processing_parameters.cell_beta = crystal.cell_beta
self._processing_parameters.cell_c = crystal.cell_c
示例2: CreateDiscreteWidget
# 需要导入模块: from Qt4_data_path_widget import DataPathWidget [as 别名]
# 或者: from Qt4_data_path_widget.DataPathWidget import update_data_model [as 别名]
class CreateDiscreteWidget(CreateTaskBase):
"""
Descript. :
"""
def __init__(self, parent=None, name=None, fl=0):
"""
Descript. :
"""
CreateTaskBase.__init__(self, parent, name,
QtCore.Qt.WindowFlags(fl), "Standart")
if not name:
self.setObjectName("create_discrete_widget")
self.init_models()
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self.previous_energy = None
self.init_models()
# Graphic elements ----------------------------------------------------
self._acq_widget = AcquisitionWidget(self, "acquisition_widget",
layout='vertical', acq_params=self._acquisition_parameters,
path_template=self._path_template)
self._data_path_widget = DataPathWidget(self, 'create_dc_path_widget',
data_model=self._path_template, layout='vertical')
self._processing_widget = ProcessingWidget(self,
data_model=self._processing_parameters)
# Layout --------------------------------------------------------------
_main_vlayout = QtGui.QVBoxLayout(self)
_main_vlayout.addWidget(self._acq_widget)
_main_vlayout.addWidget(self._data_path_widget)
_main_vlayout.addWidget(self._processing_widget)
_main_vlayout.addStretch(0)
_main_vlayout.setSpacing(2)
_main_vlayout.setContentsMargins(0,0,0,0)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self._acq_widget.acqParametersChangedSignal.\
connect(self.acq_parameters_changed)
self._data_path_widget.pathTemplateChangedSignal.\
connect(self.acq_parameters_changed)
self._acq_widget.madEnergySelectedSignal.connect(\
self.mad_energy_selected)
self._processing_widget.enableProcessingSignal.connect(\
self._run_processing_toggled)
# Other ---------------------------------------------------------------
self._processing_widget.processing_widget.\
run_processing_parallel_cbox.hide()
def init_models(self):
"""
Descript. :
"""
CreateTaskBase.init_models(self)
self._energy_scan_result = queue_model_objects.EnergyScanResult()
self._processing_parameters = queue_model_objects.ProcessingParameters()
def set_tunable_energy(self, state):
"""
Descript. :
"""
self._acq_widget.set_tunable_energy(state)
def update_processing_parameters(self, crystal):
"""
Descript. :
"""
self._processing_parameters.space_group = crystal.space_group
self._processing_parameters.cell_a = crystal.cell_a
self._processing_parameters.cell_alpha = crystal.cell_alpha
self._processing_parameters.cell_b = crystal.cell_b
self._processing_parameters.cell_beta = crystal.cell_beta
self._processing_parameters.cell_c = crystal.cell_c
self._processing_parameters.cell_gamma = crystal.cell_gamma
self._processing_widget.update_data_model(self._processing_parameters)
def single_item_selection(self, tree_item):
"""
Descript. :
"""
CreateTaskBase.single_item_selection(self, tree_item)
if isinstance(tree_item, Qt4_queue_item.SampleQueueItem):
sample_model = tree_item.get_model()
#self._processing_parameters = copy.deepcopy(self._processing_parameters)
self._processing_parameters = sample_model.processing_parameters
self._processing_widget.update_data_model(self._processing_parameters)
elif isinstance(tree_item, Qt4_queue_item.BasketQueueItem):
self.setDisabled(False)
elif isinstance(tree_item, Qt4_queue_item.DataCollectionQueueItem):
dc = tree_item.get_model()
#.........这里部分代码省略.........
示例3: CreateEnergyScanWidget
# 需要导入模块: from Qt4_data_path_widget import DataPathWidget [as 别名]
# 或者: from Qt4_data_path_widget.DataPathWidget import update_data_model [as 别名]
class CreateEnergyScanWidget(CreateTaskBase):
"""
Descript. :
"""
def __init__(self, parent = None,name = None, fl = 0):
"""
Descript. :
"""
CreateTaskBase.__init__(self, parent, name, fl, 'Energy scan')
if not name:
self.setObjectName("create_energy_scan_widget")
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self.init_models()
# Graphic elements ----------------------------------------------------
self._periodic_table_widget = PeriodicTableWidget(self)
self._data_path_widget = DataPathWidget(self,
data_model = self._path_template, layout = 'vertical')
# Layout --------------------------------------------------------------
self.main_layout = QtGui.QVBoxLayout(self)
self.main_layout.addWidget(self._periodic_table_widget)
self.main_layout.addWidget(self._data_path_widget)
self.main_layout.setContentsMargins(0, 0, 0, 0)
self.main_layout.setSpacing(6)
self.main_layout.addStretch(10)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self._periodic_table_widget.elementEdgeSelectedSignal.\
connect(self.acq_parameters_changed)
self._data_path_widget.pathTemplateChangedSignal.\
connect(self.acq_parameters_changed)
def init_models(self):
"""
Descript. :
"""
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'
def set_energy_scan_hwobj(self, energy_scan_hwobj):
"""
Descript. :
"""
self._periodic_table_widget.set_elements(\
energy_scan_hwobj.getElements())
def single_item_selection(self, tree_item):
"""
Descript. :
"""
CreateTaskBase.single_item_selection(self, tree_item)
escan_model = tree_item.get_model()
if isinstance(tree_item, Qt4_queue_item.EnergyScanQueueItem):
if tree_item.get_model().is_executed():
self.setDisabled(True)
else:
self.setDisabled(False)
if escan_model.get_path_template():
self._path_template = escan_model.get_path_template()
self._data_path_widget.update_data_model(self._path_template)
elif not(isinstance(tree_item, Qt4_queue_item.SampleQueueItem) or \
isinstance(tree_item, Qt4_queue_item.DataCollectionGroupQueueItem)):
self.setDisabled(True)
def approve_creation(self):
"""
Descript. :
"""
base_result = CreateTaskBase.approve_creation(self)
selected_element, selected_edge = self._periodic_table_widget.get_selected_element_edge()
if not selected_element:
logging.getLogger("GUI").\
info("No element selected, please select an element.")
return base_result and selected_element
# Called by the owning widget (task_toolbox_widget) to create
# a collection. When a data collection group is selected.
def _create_task(self, sample, shape):
"""
Descript. :
"""
data_collections = []
#.........这里部分代码省略.........
示例4: CreateDiscreteWidget
# 需要导入模块: from Qt4_data_path_widget import DataPathWidget [as 别名]
# 或者: from Qt4_data_path_widget.DataPathWidget import update_data_model [as 别名]
class CreateDiscreteWidget(CreateTaskBase):
"""
Descript. :
"""
def __init__(self, parent=None, name=None, fl=0):
"""
Descript. :
"""
CreateTaskBase.__init__(self, parent, name,
Qt.WindowFlags(fl), "Standard")
if not name:
self.setObjectName("create_discrete_widget")
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self.init_models()
# Graphic elements ----------------------------------------------------
self._acq_widget = AcquisitionWidget(self, "acquisition_widget",
layout='vertical', acq_params=self._acquisition_parameters,
path_template=self._path_template)
self._data_path_widget = DataPathWidget(self, 'create_dc_path_widget',
data_model=self._path_template, layout='vertical')
self._processing_widget = ProcessingWidget(self,
data_model=self._processing_parameters)
# Layout --------------------------------------------------------------
_main_vlayout = QVBoxLayout(self)
_main_vlayout.addWidget(self._acq_widget)
_main_vlayout.addWidget(self._data_path_widget)
_main_vlayout.addWidget(self._processing_widget)
_main_vlayout.addStretch(0)
_main_vlayout.setSpacing(6)
_main_vlayout.setContentsMargins(2, 2, 2, 2)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self._acq_widget.acqParametersChangedSignal.\
connect(self.acq_parameters_changed)
self._data_path_widget.pathTemplateChangedSignal.\
connect(self.path_template_changed)
self._acq_widget.madEnergySelectedSignal.connect(\
self.mad_energy_selected)
self._processing_widget.enableProcessingSignal.connect(\
self._run_processing_toggled)
# Other ---------------------------------------------------------------
def init_models(self):
"""
Descript. :
"""
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("default_acquisition_values")
self._processing_widget.processing_widget.run_processing_parallel_cbox.setChecked(\
self._beamline_setup_hwobj._get_run_processing_parallel())
def set_tunable_energy(self, state):
"""
Descript. :
"""
self._acq_widget.set_tunable_energy(state)
def update_processing_parameters(self, crystal):
"""
Descript. :
"""
self._processing_parameters.space_group = crystal.space_group
self._processing_parameters.cell_a = crystal.cell_a
self._processing_parameters.cell_alpha = crystal.cell_alpha
self._processing_parameters.cell_b = crystal.cell_b
self._processing_parameters.cell_beta = crystal.cell_beta
self._processing_parameters.cell_c = crystal.cell_c
self._processing_parameters.cell_gamma = crystal.cell_gamma
self._processing_widget.update_data_model(self._processing_parameters)
def single_item_selection(self, tree_item):
"""
Descript. :
"""
CreateTaskBase.single_item_selection(self, tree_item)
if isinstance(tree_item, Qt4_queue_item.SampleQueueItem):
sample_model = tree_item.get_model()
#.........这里部分代码省略.........
示例5: CreateHelicalWidget
# 需要导入模块: from Qt4_data_path_widget import DataPathWidget [as 别名]
# 或者: from Qt4_data_path_widget.DataPathWidget import update_data_model [as 别名]
#.........这里部分代码省略.........
return selected_items
def show_selected_lines(self):
selected_items = self.selected_items()
for list_item in self._list_item_map.keys():
line = self._list_item_map[list_item]
if list_item in selected_items:
self._graphics_manager.select_shape(line)
else:
self._graphics_manager.de_select_shape(line)
def approve_creation(self):
base_result = CreateTaskBase.approve_creation(self)
selected_lines = False
if self.selected_items():
selected_lines = True
else:
logging.getLogger("user_level_log").\
warning("No lines selected, please select one or more lines.")
return base_result and selected_lines
def update_processing_parameters(self, crystal):
self._processing_parameters.space_group = crystal.space_group
self._processing_parameters.cell_a = crystal.cell_a
self._processing_parameters.cell_alpha = crystal.cell_alpha
self._processing_parameters.cell_b = crystal.cell_b
self._processing_parameters.cell_beta = crystal.cell_beta
self._processing_parameters.cell_c = crystal.cell_c
self._processing_parameters.cell_gamma = crystal.cell_gamma
self._processing_widget.update_data_model(self._processing_parameters)
def select_shape_with_cpos(self, start_cpos, end_cpos):
self._graphics_manager_hwobj.de_select_all()
selected_line = None
for shape in self._graphics_manager_hwobj.get_shapes():
if isinstance(shape, graphics_manager.GraphicsItemLine):
if shape.get_centred_positions()[0] == start_cpos and\
shape.get_centred_positions()[1] == end_cpos:
self._graphics_manager_hwobj.de_select_all()
shape.setSelected(True)
selected_line = shape
#de-select previous selected list items and
#select the current shape (Line).
for (list_item, shape) in self._list_item_map.iteritems():
if selected_line is shape:
list_item.setSelected(True)
else:
list_item.setSelected(False)
def single_item_selection(self, tree_item):
CreateTaskBase.single_item_selection(self, tree_item)
if isinstance(tree_item, Qt4_queue_item.SampleQueueItem):
sample_model = tree_item.get_model()
self._processing_parameters = sample_model.processing_parameters
#self._processing_parameters = copy.deepcopy(self._processing_parameters)
self._processing_widget.update_data_model(self._processing_parameters)
elif isinstance(tree_item, Qt4_queue_item.DataCollectionQueueItem):
示例6: CreateDiscreteWidget
# 需要导入模块: from Qt4_data_path_widget import DataPathWidget [as 别名]
# 或者: from Qt4_data_path_widget.DataPathWidget import update_data_model [as 别名]
#.........这里部分代码省略.........
self.handle_path_conflict)
self.connect(self._data_path_widget,
QtCore.SIGNAL("pathTemplateChanged"),
self.handle_path_conflict)
# Other ---------------------------------------------------------------
def init_models(self):
"""
Descript. :
"""
CreateTaskBase.init_models(self)
self._energy_scan_result = queue_model_objects.EnergyScanResult()
self._processing_parameters = queue_model_objects.ProcessingParameters()
def set_tunable_energy(self, state):
"""
Descript. :
"""
self._acq_widget.set_tunable_energy(state)
def update_processing_parameters(self, crystal):
"""
Descript. :
"""
self._processing_parameters.space_group = crystal.space_group
self._processing_parameters.cell_a = crystal.cell_a
self._processing_parameters.cell_alpha = crystal.cell_alpha
self._processing_parameters.cell_b = crystal.cell_b
self._processing_parameters.cell_beta = crystal.cell_beta
self._processing_parameters.cell_c = crystal.cell_c
self._processing_parameters.cell_gamma = crystal.cell_gamma
self._processing_widget.update_data_model(self._processing_parameters)
def mad_energy_selected(self, name, energy, state):
"""
Descript. :
"""
item = self._current_selected_items[0]
model = item.get_model()
if state:
self._path_template.mad_prefix = name
else:
self._path_template.mad_prefix = ''
run_number = self._beamline_setup_hwobj.queue_model_hwobj.\
get_next_run_number(self._path_template)
data_path_widget = self.get_data_path_widget()
data_path_widget.set_run_number(run_number)
data_path_widget.set_prefix(self._path_template.base_prefix)
if self.isEnabled():
if isinstance(item, Qt4_queue_item.TaskQueueItem) and \
not isinstance(item, Qt4_queue_item.DataCollectionGroupQueueItem):
model.set_name(self._path_template.get_prefix())
item.setText(0, model.get_name())
def single_item_selection(self, tree_item):
"""
Descript. :
"""
CreateTaskBase.single_item_selection(self, tree_item)
if isinstance(tree_item, Qt4_queue_item.SampleQueueItem):
示例7: CreateEnergyScanWidget
# 需要导入模块: from Qt4_data_path_widget import DataPathWidget [as 别名]
# 或者: from Qt4_data_path_widget.DataPathWidget import update_data_model [as 别名]
#.........这里部分代码省略.........
if max_transmission_value:
self._max_transmission_ledit.setText("%.2f" % max_transmission_value)
except:
pass
def init_models(self):
"""
Descript. :
"""
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'
self._path_template.compression = False
def single_item_selection(self, tree_item):
"""
Descript. :
"""
CreateTaskBase.single_item_selection(self, tree_item)
escan_model = tree_item.get_model()
if isinstance(tree_item, Qt4_queue_item.EnergyScanQueueItem):
if tree_item.get_model().is_executed():
self.setDisabled(True)
else:
self.setDisabled(False)
if escan_model.get_path_template():
self._path_template = escan_model.get_path_template()
self._data_path_widget.update_data_model(self._path_template)
elif not(isinstance(tree_item, Qt4_queue_item.SampleQueueItem) or \
isinstance(tree_item, Qt4_queue_item.DataCollectionGroupQueueItem)):
self.setDisabled(True)
def approve_creation(self):
"""
Descript. :
"""
base_result = CreateTaskBase.approve_creation(self)
selected_element, selected_edge = self._periodic_table_widget.get_selected_element_edge()
if not selected_element:
logging.getLogger("GUI").\
warning("No element selected, please select an element.")
return base_result and selected_element
# Called by the owning widget (task_toolbox_widget) to create
# a collection. When a data collection group is selected.
def _create_task(self, sample, shape):
"""
Descript. :
"""
data_collections = []
selected_element, selected_edge = self._periodic_table_widget.get_selected_element_edge()
if selected_element:
if not shape:
cpos = queue_model_objects.CentredPosition()
cpos.snapshot_image = self._graphics_manager_hwobj.get_scene_snapshot()
else:
# Shapes selected and sample is mounted, get the
# centred positions for the shapes
示例8: CreateStillScanWidget
# 需要导入模块: from Qt4_data_path_widget import DataPathWidget [as 别名]
# 或者: from Qt4_data_path_widget.DataPathWidget import update_data_model [as 别名]
class CreateStillScanWidget(CreateTaskBase):
def __init__(self,parent=None, name=None, fl=0):
CreateTaskBase.__init__(self, parent, name,
Qt.WindowFlags(fl), "Still")
if not name:
self.setObjectName("create_still_scan_widget")
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self.init_models()
# Graphic elements ----------------------------------------------------
self._acq_widget = AcquisitionStillWidget(self, "acquisition_widget",
layout='vertical', acq_params=self._acquisition_parameters,
path_template=self._path_template)
self._data_path_widget = DataPathWidget(self, 'create_dc_path_widget',
data_model=self._path_template, layout='vertical')
self._processing_widget = ProcessingWidget(self,
data_model=self._processing_parameters)
# Layout --------------------------------------------------------------
_main_vlayout = QVBoxLayout(self)
_main_vlayout.addWidget(self._acq_widget)
_main_vlayout.addWidget(self._data_path_widget)
_main_vlayout.addWidget(self._processing_widget)
_main_vlayout.addStretch(0)
_main_vlayout.setSpacing(6)
_main_vlayout.setContentsMargins(2, 2, 2, 2)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self._acq_widget.acqParametersChangedSignal.\
connect(self.acq_parameters_changed)
self._data_path_widget.pathTemplateChangedSignal.\
connect(self.path_template_changed)
self._processing_widget.enableProcessingSignal.connect(\
self._run_processing_toggled)
# Other ---------------------------------------------------------------
def use_osc_start(self, status):
pass
def update_exp_time_limits(self, status):
pass
def init_models(self):
CreateTaskBase.init_models(self)
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("default_acquisition_values")
self._acquisition_parameters.num_triggers = 1
self._acquisition_parameters.num_images_per_trigger = 1
self._processing_widget.processing_widget.run_processing_parallel_cbox.setChecked(\
self._beamline_setup_hwobj._get_run_processing_parallel())
def set_tunable_energy(self, state):
self._acq_widget.set_tunable_energy(state)
def update_processing_parameters(self, crystal):
self._processing_parameters.space_group = crystal.space_group
self._processing_parameters.cell_a = crystal.cell_a
self._processing_parameters.cell_alpha = crystal.cell_alpha
self._processing_parameters.cell_b = crystal.cell_b
self._processing_parameters.cell_beta = crystal.cell_beta
self._processing_parameters.cell_c = crystal.cell_c
self._processing_parameters.cell_gamma = crystal.cell_gamma
self._processing_widget.update_data_model(self._processing_parameters)
def single_item_selection(self, tree_item):
"""
Descript. :
"""
CreateTaskBase.single_item_selection(self, tree_item)
if isinstance(tree_item, Qt4_queue_item.SampleQueueItem):
sample_model = tree_item.get_model()
#self._processing_parameters = copy.deepcopy(self._processing_parameters)
self._processing_parameters = sample_model.processing_parameters
self._processing_widget.update_data_model(self._processing_parameters)
elif isinstance(tree_item, Qt4_queue_item.BasketQueueItem):
self.setDisabled(False)
elif isinstance(tree_item, Qt4_queue_item.DataCollectionQueueItem):
dc = tree_item.get_model()
self._acq_widget.use_kappa(False)
if not dc.is_helical():
if dc.is_executed():
#.........这里部分代码省略.........
示例9: CreateCharWidget
# 需要导入模块: from Qt4_data_path_widget import DataPathWidget [as 别名]
# 或者: from Qt4_data_path_widget.DataPathWidget import update_data_model [as 别名]
#.........这里部分代码省略.........
try:
energy = self._beamline_setup_hwobj.energy_hwobj.getCurrentEnergy()
energy = round(float(energy), 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()
return
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
def single_item_selection(self, tree_item):
"""
Descript. :
"""
CreateTaskBase.single_item_selection(self, tree_item)
if isinstance(tree_item, Qt4_queue_item.SampleQueueItem):
self._init_models()
self._set_space_group(self._char_params.space_group)
self._acq_widget.update_data_model(self._acquisition_parameters,
self._path_template)
self._char_params_mib.set_model(self._char_params)
#self._char_params = copy.deepcopy(self._char_params)
#self._acquisition_parameters = copy.deepcopy(self._acquisition_parameters)
elif isinstance(tree_item, Qt4_queue_item.CharacterisationQueueItem):
if tree_item.get_model().is_executed():
self.setDisabled(True)
else:
self.setDisabled(False)
self._char = tree_item.get_model()
if self._char.get_path_template():
self._path_template = self._char.get_path_template()
self._data_path_widget.update_data_model(self._path_template)
data_collection = self._char.reference_image_collection
self._char_params = self._char.characterisation_parameters
self._char_params_mib.set_model(self._char_params)
self._acquisition_parameters = data_collection.acquisitions[0].\
acquisition_parameters
self._acq_widget.update_data_model(self._acquisition_parameters,
self._path_template)
self.get_acquisition_widget().use_osc_start(True)
if len(data_collection.acquisitions) == 1:
self.select_shape_with_cpos(self._acquisition_parameters.\