Package gov.nist.microanalysis.EPQLibrary

Examples of gov.nist.microanalysis.EPQLibrary.Composition


    @Override
    public void setup(SpectrumProperties props) throws EPQException {
        super.setup(props);

        props = getSpectrumProperties();
        Composition comp =
                props.getCompositionProperty(SpectrumProperties.MicroanalyticalComposition);

        if (transitions.isEmpty())
            transitions.addAll(findAllXRayTransitions(comp, props));
    }
View Full Code Here



    @Override
    public void run() throws EPQException {
        SpectrumProperties props = getSpectrumProperties();
        Composition comp =
                props.getCompositionProperty(SpectrumProperties.MicroanalyticalComposition);
        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;
        double q, wf, yield, lineWeight, atomicWeight, factor;
        for (XRayTransition xrt : transitions) {
            element = xrt.getElement();

            if (comp.containsElement(element)) {
                shell = xrt.getDestination();
                corrAlg.initialize(comp, shell, props);
                q = icx.computeShell(shell, energy);
                wf = comp.weightFraction(element, false);
                yield = fy.compute(shell);
                atomicWeight = element.getAtomicWeight();
                lineWeight = xrt.getWeight(XRayTransition.NormalizeFamily);

                factor =
View Full Code Here

                    throw new IOException(e);
                }
                weightFractions[i] = weightFraction;
            }

            return new Composition(elements, weightFractions);
        }
View Full Code Here

            Element materialsElement = geometryElement.getChild("materials");

            int index;
            String name;
            double density;
            Composition composition;
            Material material;
            for (Element materialElement : materialsElement.getChildren()) {
                try {
                    index =
                            materialElement.getAttribute("_index")
                                    .getIntValue();
                } catch (DataConversionException e) {
                    throw new IOException(e);
                }

                name = materialElement.getAttribute("name").getValue();

                try {
                    density =
                            materialElement.getAttribute("density")
                                    .getDoubleValue();
                } catch (DataConversionException e) {
                    throw new IOException(e);
                }

                composition = extractComposition(materialElement);
                composition.setName(name);

                material = new Material(composition, density);
                material.setName(name);

                materials.put(index, material);
View Full Code Here

    @Override
    public void setup(SpectrumProperties props) throws EPQException {
        super.setup(props);

        props = getSpectrumProperties();
        Composition comp =
                props.getCompositionProperty(SpectrumProperties.MicroanalyticalComposition);
        double energy =
                ToSI.keV(props
                        .getNumericProperty(SpectrumProperties.BeamEnergy));
        double density =
View Full Code Here


    @Override
    public void run() throws EPQException {
        SpectrumProperties props = getSpectrumProperties();
        Composition comp =
                props.getCompositionProperty(SpectrumProperties.MicroanalyticalComposition);
        double density =
                ToSI.gPerCC(props
                        .getNumericProperty(SpectrumProperties.SpecimenDensity));

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

        // Calculate PZs
        double[] zs;
        double rz;
        for (XRayTransition xrt : transitions) {
            zs = zPZS.get(xrt);

            if (comp.containsElement(xrt.getElement())) {
                corrAlg.initialize(comp, xrt.getDestination(), props);

                for (int i = 0; i < zs.length; i++) {
                    rz = Math.abs(zs[i]) * density;
                    gnfPZs.get(xrt)[i] = corrAlg.computeCurve(rz);
View Full Code Here

                    throw new IOException(e);
                }
                weightFractions[i] = weightFraction;
            }

            return new Composition(elements, weightFractions);
        }
View Full Code Here

            Element materialsElement = geometryElement.getChild("materials");

            int index;
            String name;
            double density, absorptionEnergyElectron;
            Composition composition;
            Material material;
            IMaterialScatterModel scatterModel;
            for (Element materialElement : materialsElement.getChildren()) {
                try {
                    index =
View Full Code Here

TOP

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

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.