本文整理汇总了Python中pymontecarlo.options.options.Options.detectors['det3']方法的典型用法代码示例。如果您正苦于以下问题:Python Options.detectors['det3']方法的具体用法?Python Options.detectors['det3']怎么用?Python Options.detectors['det3']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pymontecarlo.options.options.Options
的用法示例。
在下文中一共展示了Options.detectors['det3']方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUpClass
# 需要导入模块: from pymontecarlo.options.options import Options [as 别名]
# 或者: from pymontecarlo.options.options.Options import detectors['det3'] [as 别名]
def setUpClass(cls):
super(TestResultsReader, cls).setUpClass()
ops1 = Options(name='test1')
ops1.detectors['det1'] = PhotonIntensityDetector((0, 1), (0, 1))
ops1.detectors['det2'] = TimeDetector()
ops1.detectors['det3'] = ElectronFractionDetector()
results1 = {}
results1['det1'] = PhotonIntensityResult()
results1['det2'] = TimeResult()
results1['det3'] = ElectronFractionResult()
ops2 = Options(name='test2')
ops2.detectors['det1'] = PhotonIntensityDetector((0, 1), (0, 1))
results2 = {}
results2['det1'] = PhotonIntensityResult()
cls.results = Results(Options(name='base'),
[(ops1, results1), (ops2, results2)])
cls.group = h5py.File('test.h5', 'a', driver='core', backing_store=False)
writer = ResultsWriter()
writer.convert(cls.results, cls.group)
writer.join()
示例2: setUp
# 需要导入模块: from pymontecarlo.options.options import Options [as 别名]
# 或者: from pymontecarlo.options.options.Options import detectors['det3'] [as 别名]
def setUp(self):
unittest.TestCase.setUp(self)
ops1 = Options(name='test1')
ops1.detectors['det1'] = PhotonIntensityDetector((0, 1), (0, 1))
ops1.detectors['det2'] = TimeDetector()
ops1.detectors['det3'] = ElectronFractionDetector()
results1 = {}
results1['det1'] = PhotonIntensityResult()
results1['det2'] = TimeResult()
results1['det3'] = ElectronFractionResult()
ops2 = Options(name='test2')
ops2.detectors['det1'] = PhotonIntensityDetector((0, 1), (0, 1))
results2 = {}
results2['det1'] = PhotonIntensityResult()
self.obj = Results(Options(name='base'),
[(ops1, results1), (ops2, results2)])