本文整理汇总了Python中mantid.kernel.ConfigService.getFacility方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigService.getFacility方法的具体用法?Python ConfigService.getFacility怎么用?Python ConfigService.getFacility使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mantid.kernel.ConfigService
的用法示例。
在下文中一共展示了ConfigService.getFacility方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: action_facility_changed
# 需要导入模块: from mantid.kernel import ConfigService [as 别名]
# 或者: from mantid.kernel.ConfigService import getFacility [as 别名]
def action_facility_changed(self, new_facility):
"""
When the facility is changed, refreshes all available instruments that can be selected in the dropdown.
:param new_facility: The name of the new facility that was selected
"""
ConfigService.setFacility(new_facility)
# refresh the instrument selection to contain instruments about the selected facility only
self.view.instrument.clear()
self.view.instrument.addItems(
[instr.name() for instr in ConfigService.getFacility(new_facility).instruments()])
示例2: getValidInstruments
# 需要导入模块: from mantid.kernel import ConfigService [as 别名]
# 或者: from mantid.kernel.ConfigService import getFacility [as 别名]
def getValidInstruments(self):
instruments = ['']
for name in ['SNS', 'HFIR']:
facility = ConfigService.getFacility(name)
facilityInstruments = sorted([item.shortName()
for item in facility.instruments()
if item != 'DAS'])
instruments.extend(facilityInstruments)
return instruments
示例3: setup_facilities_group
# 需要导入模块: from mantid.kernel import ConfigService [as 别名]
# 或者: from mantid.kernel.ConfigService import getFacility [as 别名]
def setup_facilities_group(self):
facilities = ConfigService.getFacilityNames()
self.view.facility.addItems(facilities)
default_facility = ConfigService.getFacility().name()
self.view.facility.setCurrentIndex(self.view.facility.findText(default_facility))
self.action_facility_changed(default_facility)
self.view.facility.currentTextChanged.connect(self.action_facility_changed)
default_instrument = ConfigService.getInstrument().name()
self.view.instrument.setCurrentIndex(self.view.instrument.findText(default_instrument))
self.action_instrument_changed(default_instrument)
self.view.instrument.currentTextChanged.connect(self.action_instrument_changed)
示例4: _get_test_facility
# 需要导入模块: from mantid.kernel import ConfigService [as 别名]
# 或者: from mantid.kernel.ConfigService import getFacility [as 别名]
def _get_test_facility(self):
return ConfigService.getFacility("ISIS")
示例5: _get_test_instrument
# 需要导入模块: from mantid.kernel import ConfigService [as 别名]
# 或者: from mantid.kernel.ConfigService import getFacility [as 别名]
def _get_test_instrument(self):
facility = ConfigService.getFacility("ISIS")
return facility.instrument("CRISP")
示例6: _get_test_listener
# 需要导入模块: from mantid.kernel import ConfigService [as 别名]
# 或者: from mantid.kernel.ConfigService import getFacility [as 别名]
def _get_test_listener(self):
facility = ConfigService.getFacility("ISIS")
return facility.instrument("CRISP").liveListenerInfo()