本文整理汇总了Python中pymontecarlo.options.options.Options.detectors['spectrum']方法的典型用法代码示例。如果您正苦于以下问题:Python Options.detectors['spectrum']方法的具体用法?Python Options.detectors['spectrum']怎么用?Python Options.detectors['spectrum']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pymontecarlo.options.options.Options
的用法示例。
在下文中一共展示了Options.detectors['spectrum']方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_append_photon_detectors_maxchannels
# 需要导入模块: from pymontecarlo.options.options import Options [as 别名]
# 或者: from pymontecarlo.options.options.Options import detectors['spectrum'] [as 别名]
def test_append_photon_detectors_maxchannels(self):
ops = Options()
ops.limits.add(TimeLimit(100))
ops.detectors['spectrum'] = \
PhotonSpectrumDetector((radians(35), radians(45)), (0, radians(360.0)),
50000, (0, 1000))
opss = self.c.convert(ops)
self.e.export(opss[0], self.tmpdir)
示例2: testexport
# 需要导入模块: from pymontecarlo.options.options import Options [as 别名]
# 或者: from pymontecarlo.options.options.Options import detectors['spectrum'] [as 别名]
def testexport(self):
# Create
ops = Options(name='test1')
ops.beam.energy_eV = 30e3
ops.geometry.body.material = PenelopeMaterial.pure(29)
ops.detectors['x-ray'] = \
PhotonIntensityDetector((radians(35), radians(45)), (0, radians(360.0)))
ops.detectors['spectrum'] = \
PhotonSpectrumDetector((radians(35), radians(45)), (0, radians(360.0)), 500, (0, 1000))
ops.detectors['prz'] = \
PhotonDepthDetector((radians(0), radians(90)), (0, radians(360.0)), 500)
ops.limits.add(TimeLimit(100))
ops.limits.add(UncertaintyLimit(Transition(29, siegbahn='Ka1'), 'x-ray', 0.05))
# Export
opss = self.c.convert(ops)
self.e.export(opss[0], self.tmpdir)