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


Python ConfigService.getFacility方法代码示例

本文整理汇总了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()])
开发者ID:mantidproject,项目名称:mantid,代码行数:12,代码来源:presenter.py

示例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
开发者ID:rosswhitfield,项目名称:mantid,代码行数:13,代码来源:GetIPTS.py

示例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)
开发者ID:mantidproject,项目名称:mantid,代码行数:15,代码来源:presenter.py

示例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")
开发者ID:mantidproject,项目名称:mantid,代码行数:4,代码来源:FacilityInfoTest.py

示例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")
开发者ID:mantidproject,项目名称:mantid,代码行数:5,代码来源:InstrumentInfoTest.py

示例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()
开发者ID:DanNixon,项目名称:mantid,代码行数:5,代码来源:LiveListenerInfoTest.py


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