def setUp(self): TestCase.setUp(self) baseops = Options() baseops.detectors["xray"] = PhotonIntensityDetector((0, 1), (0, 3)) self.m = Measurement(baseops) self.m.add_kratio(Ka(29), 0.2470, 0.004)
def setUp(self): TestCase.setUp(self) baseops = Options() baseops.detectors['xray'] = PhotonIntensityDetector((0, 1), (0, 3)) self.m = Measurement(baseops) self.m.add_kratio(Ka(29), 0.2470, 0.004)
def setUp(self): TestCase.setUp(self) geometry = MultiLayers(pure(29)) geometry.add_layer(Material("AuPd", {79: 0.5, 46: 0.5}), 100e-9) baseops = Options() baseops.detectors['xray'] = PhotonIntensityDetector((0, 1), (0, 3)) meas = Measurement(baseops) meas.add_kratio(Ka(29), 0.2470, 0.004) getter = lambda geometry: geometry.layers[0].thickness_m setter = lambda geometry, val: setattr(geometry.layers[0], 'thickness_m', val) param = Parameter(getter, setter, 100e-9, 10e-9, 500e-9) self.exp = Experiment(geometry, [meas], [param])
def setUp(self): unittest.TestCase.setUp(self) iterator_class = Heinrich1972Iterator convergor_class = CompositionConvergor calculator_class = SimpleCalculator worker_class = Worker options = Options('PAP') options.beam.energy_eV = 20000 options.limits.add(ShowersLimit(100)) detector = PhotonIntensityDetector((radians(50), radians(55)), (0.0, radians(360.0))) self.m = Measurement(options, options.geometry.body, detector) self.m.add_kratio(Ka(29), 0.2470) self.m.add_rule(ElementByDifferenceRule(79)) self.outputdir = tempfile.mkdtemp() self.runner = Runner(worker_class, iterator_class, convergor_class, calculator_class, self.outputdir, limit=0.1)
def setUp(self): TestCase.setUp(self) options = Options('PAP') options.beam.energy_eV = 20000 detector = PhotonIntensityDetector((radians(50.0), radians(55)), (0.0, radians(360.0))) self.m = Measurement(options, options.geometry.body, detector) self.m.add_kratio(Ka(29), 0.2470, 0.004) self.m.add_rule(ElementByDifferenceRule(79))