Package gov.nist.microanalysis.EPQLibrary

Examples of gov.nist.microanalysis.EPQLibrary.Strategy


        // Create simulation
        String name = extractor.getName();
        MonteCarloSS mcss = extractor.getMonteCarloSS();
        Map<String, Detector> detectors = extractor.getDetectors();
        Set<Limit> limits = extractor.getLimits();
        Strategy strategy = extractor.getStrategy();

        // Setup detectors
        report(0.0, "Setup detectors");
        setupDetectors(mcss, detectors.values(), strategy);
View Full Code Here


            props.setProperty(key + "model.absorptionEnergy",
                    Double.toString(FromSI.eV(model.getMinEforTracking())));
        }

        // Model
        Strategy strategy = AlgorithmUser.getGlobalStrategy();
        for (String algClass : strategy.listAlgorithmClasses()) {
            props.setProperty("model." + algClass,
                    strategy.getAlgorithm(algClass).toString());
        }
    }
View Full Code Here

        double energy =
                ToSI.keV(props
                        .getNumericProperty(SpectrumProperties.BeamEnergy));

        // Create strategy
        Strategy strategy = AlgorithmUser.getGlobalStrategy();
        PhiRhoZAlgorithm corrAlg =
                (PhiRhoZAlgorithm) strategy
                        .getAlgorithm(PhiRhoZAlgorithm.class);
        if (corrAlg == null)
            throw new NullPointerException("No correction algorithm defined");
        IonizationCrossSection icx =
                (IonizationCrossSection) strategy
                        .getAlgorithm(IonizationCrossSection.class);
        if (icx == null)
            icx = AbsoluteIonizationCrossSection.BoteSalvat2008;
        FluorescenceYield fy =
                (FluorescenceYield) strategy
                        .getAlgorithm(FluorescenceYield.class);

        // Calculate intensities
        Element element;
        AtomicShell shell;
View Full Code Here

     */
    protected Strategy extractModels(Element root) throws IOException,
            EPQException {
        Element modelsRoot = root.getChild("models");

        Strategy strategy = new Strategy();

        ModelExtractor extractor;
        for (Element modelElement : modelsRoot.getChildren()) {
            extractor =
                    (ModelExtractor) ExtractorManager.getExtractor(modelElement
                            .getName());
            strategy.addAll(extractor.extract(modelElement));
        }

        return strategy;
    }
View Full Code Here

    public void testElasticCrossSection() throws IOException {
        // XML element
        Element element = createElasticCrossSectionModelElement();

        // Extrator
        Strategy strategy = ModelExtractorFactory.REGISTERED.extract(element);

        // Test
        AlgorithmClass alg =
                strategy.getAlgorithm(RandomizedScatterFactory.class);
        assertEquals(NISTMottScatteringAngle.Factory, alg);
    }
View Full Code Here

    public void testIonizationCrossSection() throws IOException {
        // XML element
        Element element = createIonizationCrossSectionModelElement();

        // Extrator
        Strategy strategy = ModelExtractorFactory.REGISTERED.extract(element);

        // Test
        AlgorithmClass alg =
                strategy.getAlgorithm(IonizationCrossSection.class);
        assertEquals(AbsoluteIonizationCrossSection.BoteSalvat2008, alg);
    }
View Full Code Here

    public void testIonizationPotential() throws IOException {
        // XML element
        Element element = createIonizationPotentialModelElement();

        // Extrator
        Strategy strategy = ModelExtractorFactory.REGISTERED.extract(element);

        // Test
        AlgorithmClass alg =
                strategy.getAlgorithm(MeanIonizationPotential.class);
        assertEquals(MeanIonizationPotential.Sternheimer64, alg);
    }
View Full Code Here

    public void testEnergyLoss() throws IOException {
        // XML element
        Element element = createEnergyLossModelElement();

        // Extrator
        Strategy strategy = ModelExtractorFactory.REGISTERED.extract(element);

        // Test
        AlgorithmClass alg =
                strategy.getAlgorithm(BetheElectronEnergyLoss.class);
        assertEquals(BetheElectronEnergyLoss.JoyLuo1989, alg);
    }
View Full Code Here

    public void testMassAbsorptionCoefficient() throws IOException {
        // XML element
        Element element = createMassAbsorptionCoefficientModelElement();

        // Extrator
        Strategy strategy = ModelExtractorFactory.REGISTERED.extract(element);

        // Test
        AlgorithmClass alg =
                strategy.getAlgorithm(MassAbsorptionCoefficient.class);
        assertEquals(MassAbsorptionCoefficient.Null, alg);
    }
View Full Code Here

    public void testFluorescence() throws IOException {
        // XML element
        Element element = createFluorescenceModelElement();

        // Extrator
        Strategy strategy = ModelExtractorFactory.REGISTERED.extract(element);

        // Test
        AlgorithmClass alg =
                strategy.getAlgorithm(FluorescenceMC.class);
        assertEquals(FluorescenceMC.FluorescenceCompton, alg);
    }
View Full Code Here

TOP

Related Classes of gov.nist.microanalysis.EPQLibrary.Strategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.