本文整理汇总了Python中pymontecarlo.options.options.Options.detectors["bse+polar"]方法的典型用法代码示例。如果您正苦于以下问题:Python Options.detectors["bse+polar"]方法的具体用法?Python Options.detectors["bse+polar"]怎么用?Python Options.detectors["bse+polar"]使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pymontecarlo.options.options.Options
的用法示例。
在下文中一共展示了Options.detectors["bse+polar"]方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testexport_substrate
# 需要导入模块: from pymontecarlo.options.options import Options [as 别名]
# 或者: from pymontecarlo.options.options.Options import detectors["bse+polar"] [as 别名]
def testexport_substrate(self):
# Create options
mat = Material({79: 0.5, 47: 0.5}, "Mat1", absorption_energy_eV={ELECTRON: 123.0})
ops = Options()
ops.beam.energy_eV = 1234
ops.beam.diameter_m = 25e-9
ops.beam.origin_m = (100e-9, 0, 1)
ops.geometry.body.material = mat
ops.limits.add(ShowersLimit(5678))
ops.detectors["bse"] = BackscatteredElectronEnergyDetector(123, (0, 567))
ops.detectors["bse polar"] = BackscatteredElectronPolarAngularDetector(125)
ops.detectors["xrays"] = PhotonIntensityDetector((radians(30), radians(40)), (0, radians(360.0)))
ops.detectors["prz"] = PhiZDetector((radians(30), radians(40)), (0, radians(360.0)), 750)
# Export to WinX-Ray options
wxrops = self.e.export_wxroptions(ops)
# Test
self.assertAlmostEqual(1.234, wxrops.getIncidentEnergy_keV(), 4)
self.assertAlmostEqual(25.0, wxrops.getBeamDiameter_nm(), 4)
self.assertEqual(5678, wxrops.getNbElectron())
zs, _wfs = wxrops.getElements()
self.assertTrue(79 in zs)
self.assertTrue(47 in zs)
self.assertAlmostEqual(13.6007, wxrops.getMeanDensity_g_cm3(), 4) # internally calculated by WinXray
self.assertAlmostEqual(123, wxrops.getMinimumElectronEnergy_eV(), 4)
self.assertTrue(wxrops.isComputeBSEDistribution())
self.assertTrue(wxrops.isComputeBSEEnergy())
self.assertEqual(123, wxrops.getNbBSEEnergy())
self.assertTrue(wxrops.isComputeBSEAngular())
self.assertEqual(125, wxrops.getNbBSEAngular())
self.assertTrue(wxrops.isXrayCompute())
self.assertTrue(wxrops.isXrayComputeCharacteristic())
self.assertAlmostEqual(35.0, wxrops.getTOA_deg(), 4)
self.assertAlmostEqual(55, wxrops.getAngleThetaDetector_deg(), 4)
self.assertAlmostEqual(180.0, wxrops.getAnglePhiDetector_deg(), 4)
self.assertEqual(750, wxrops.getNumberFilm())
示例2: testexport_substrate
# 需要导入模块: from pymontecarlo.options.options import Options [as 别名]
# 或者: from pymontecarlo.options.options.Options import detectors["bse+polar"] [as 别名]
def testexport_substrate(self):
# Create options
mat = Material({79: 0.5, 47: 0.5}, "Mat1", absorption_energy_eV={ELECTRON: 123.0})
ops = Options()
ops.beam.energy_eV = 1234
ops.beam.diameter_m = 25e-9
ops.beam.origin_m = (100e-9, 0, 1)
ops.geometry.body.material = mat
ops.limits.add(ShowersLimit(5678))
ops.detectors["bse"] = BackscatteredElectronEnergyDetector(123, (0, 567))
ops.detectors["te"] = TransmittedElectronEnergyDetector(124, (1, 568))
ops.detectors["bse polar"] = BackscatteredElectronPolarAngularDetector(125)
ops.detectors["xrays"] = PhotonIntensityDetector((radians(30), radians(40)), (0, radians(360.0)))
ops.detectors["prz"] = PhotonDepthDetector((radians(30), radians(40)), (0, radians(360.0)), 750)
ops.detectors["bseradial"] = BackscatteredElectronRadialDetector(126)
ops.detectors["trajs"] = TrajectoryDetector()
# Export to CAS
casfile = self.e.export_cas(ops)
# Test
simdata = casfile.getOptionSimulationData()
simops = simdata.getSimulationOptions()
regionops = simdata.getRegionOptions()
self.assertAlmostEqual(1.234, simops.getIncidentEnergy_keV(0), 4)
self.assertAlmostEqual(34.93392125, simops.Beam_Diameter, 4) # FWHM
self.assertAlmostEqual(100.0, simops._positionStart_nm, 4)
self.assertEqual(1, regionops.getNumberRegions())
region = regionops.getRegion(0)
elements = list(map(attrgetter("Z"), region.getElements()))
self.assertAlmostEqual(mat.density_kg_m3 / 1000.0, region.Rho, 4)
self.assertEqual("Mat1", region.Name)
self.assertEqual(2, len(elements))
self.assertTrue(79 in elements)
self.assertTrue(47 in elements)
self.assertAlmostEqual(0.123, simops.Eminimum, 3)
self.assertEqual(5678, simops.getNumberElectrons())
self.assertTrue(simops.FDenr)
self.assertFalse(simops.FDenrLog)
self.assertEqual(123, simops.NbPointDENR)
self.assertAlmostEqual(0.0, simops.DenrMin, 3)
self.assertAlmostEqual(0.567, simops.DenrMax, 3)
self.assertTrue(simops.FDent)
self.assertFalse(simops.FDentLog)
self.assertEqual(124, simops.NbPointDENT)
self.assertAlmostEqual(0.001, simops.DentMin, 3)
self.assertAlmostEqual(0.568, simops.DentMax, 3)
self.assertTrue(simops.FDbang)
self.assertFalse(simops.FDbangLog)
self.assertEqual(125, simops.NbPointDBANG)
self.assertAlmostEqual(-90.0, simops.DbangMin, 4)
self.assertAlmostEqual(90.0, simops.DbangMax, 4)
self.assertTrue(simops.FDrsr)
self.assertFalse(simops.FDrsrLog)
self.assertEqual(126, simops.NbPointDRSR)
self.assertTrue(simops.Memory_Keep)
self.assertEqual(5678, simops.Electron_Display)
self.assertTrue(simops.FEmissionRX)