Package jhd.MuMass
Class XrayCalculator
java.lang.Object
jhd.MuMass.XrayCalculator
A class for calculating the x-ray attenuation coefficients
using NIST XCOM attenuation data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]returns an array of absorption edge names "K", "L1", "L2", "L3", "M1", "M2", "M3", "M4", "M5", "N1", "N2"doublegetAtomAbsEdge(String theAtom, String theEdge) returns the absorption edge energy MeVintgetAtomAbsEdgeIndex(double edgeVal, double[] mevArray) returns the index (position) of the edge in the MeV arraydoublegetAtomAbsEdgeValue(String theAtom, String theEdgeName) returns the edge energy of the atomdouble[]getAtomAbsEdgeValues(String theAtom) returns an array of the atom's absorption edge energiesdoublegetAtomGmPerCC(String theAtom) returns the density of the atom in its common form at stp.doublegetAtomGmPerMol(String theAtom) returns the atomic weight in grams/moldouble[]getAtomMevArray(String theAtom) returns array of tabulated energies for the AtomdoublegetAtomMuMass(String theAtom, double theMeV, String muMassType) returns the interpolated muMass at the requested MeVdouble[]getAtomMuMassArray(String theAtom, String muMassType) returns the array of tabulated cm2/gram cross sections for the AtomgetAtomName(String theAtom) returns the full name of the atomString[]returns an array of atom names in atomic number orderintgetAtomNumber(String theAtom) returns the atomic number of the AtomString[]returns an array of atom symbols, e.g.String[]getFormulaAtoms(String theFormula) returns an array atom symbols in the formula, null if formula is not validdouble[]getFormulaMevArray(String formula) returns an ascending order array of tabulated energies for the atoms in the formuladouble[]getFormulaMevArray(String formula, double minMeV, double maxMeV) returns an ascending order array of tabulated energies for the atoms in the formuladoublegetFormulaMuMass(String theFormula, double theMeV, String muMassType) Returns the mass attenuation coefficient for atoms and formulasdouble[]getFormulaMuMassArray(String formula, String muMassType) returns a list of attenuation coefficients for the formula at each tabulated atom's tabulated energydouble[]getFormulaMuMassArray(String formula, String muMassType, double[] mevArray) returns The list of attenuation coefficients for the formula at each energydoublegetFormulaWeight(String theFormula) Returns the formula weight of the formuladouble[]returns the array of tabulated energies for the Atom between the boundsdouble[]getMeVfromMuLin(String formula, double linearCoeff, double gmPerCC, String muMassType) Returns the photon energy(s) that will produce the observed linear attenuation coefficient for the formuladouble[]getMeVfromMuLinRatio(String formula1, double linearCoeff1, double density1, String formula2, double linearCoeff2, double density2, String muMassType) Returns the photon energy(s) that will produce the observed linear attenuation coefficient ratio of two formulasdouble[]getMuMassArray(String theAtom, String muMassType, double minMeV, double maxMeV) return the array of tabulated cm2/gram cross sections for the Atom between the boundsString[]Returns list of recognized cross section typesreturns the version of MassAttenuationdoublemuLinToMolPerM3(double linearCoeff, double massCoeff, double formulaGmPerCC) Converts observed linear attenuation coefficient to concentration.doublespectrumKramers(double tubeVoltageKV, double tubeCurrentMa, String targetAtomSymbol, double meV) Estimates the output of a conventional x-ray source (reflection target) using the Kramers equation.booleanvalidateAtomSymbol(String theSymbol) returns true if the atom is validbooleanvalidateFormula(String theFormula) returns true if the formula is valid
-
Constructor Details
-
XrayCalculator
public XrayCalculator()
-
-
Method Details
-
getAbsEdgeNames
returns an array of absorption edge names "K", "L1", "L2", "L3", "M1", "M2", "M3", "M4", "M5", "N1", "N2"- Returns:
- an array of absorption edge names
-
getAtomAbsEdge
returns the absorption edge energy MeV- Parameters:
theAtom- The Symbol e.g "CA" for CalciumtheEdge- "K", "L1", "L2", "L3", "M1", "M2", "M3","M4","M5", "N1", "N2"- Returns:
- the absorption edge energy MeV
-
getAtomAbsEdgeIndex
public int getAtomAbsEdgeIndex(double edgeVal, double[] mevArray) returns the index (position) of the edge in the MeV array- Parameters:
edgeVal- the energy of the absorption edgemevArray- the energy array, must be in ascending order- Returns:
- the index (position) of the edge, or the position where the edge would be inserted, or 0 if the edge is not found,
-
getAtomAbsEdgeValue
returns the edge energy of the atom- Parameters:
theAtom- The Symbol e.g "CA" for CalciumtheEdgeName- "K", "L1", "L2", "L3", "M1", "M2", "M3","M4","M5", "N1", "N2"- Returns:
- the energy of the atom's selected absorption
-
getAtomAbsEdgeValues
returns an array of the atom's absorption edge energies- Parameters:
theAtom- The Symbol e.g "CA" for Calcium- Returns:
- an array of the atom's absorption edges
-
getAtomGmPerCC
returns the density of the atom in its common form at stp.- Parameters:
theAtom- The Symbol e.g "CA" for Calcium- Returns:
- the density of the atom in its common form at stp.
-
getAtomGmPerMol
returns the atomic weight in grams/mol- Parameters:
theAtom- The Symbol e.g "CA" for Calcium- Returns:
- the atomic weight in grams/mol
-
getAtomMuMass
returns the interpolated muMass at the requested MeV- Parameters:
theAtom- The Symbol e.g "CA" for CalciumtheMeV- find muMass as this energymuMassType- i.e. "TotAttn", "Raleigh", "Compton", "PhotoElectric", "PairProdN", "PairProdE"- Returns:
- the interpolated muMass at the requested MeV
-
getAtomMuMassArray
returns the array of tabulated cm2/gram cross sections for the Atom- Parameters:
theAtom- The Symbol e.g "CA" for CalciummuMassType- "TotAttn", "Raleigh", "Compton", "PhotoElectric", "PairProdN", "PairProdE"- Returns:
- the array of tabulated cm2/gram cross sections for the Atom
-
getAtomName
returns the full name of the atom- Parameters:
theAtom- The Symbol e.g "CA" for Calcium- Returns:
- the full name of the atom
-
getAtomNames
returns an array of atom names in atomic number order- Returns:
- an array of atom names in atomic number order
-
getAtomNumber
returns the atomic number of the Atom- Parameters:
theAtom- The Symbol e.g "CA" for Calcium- Returns:
- the atomic number
-
getAtomSymbols
returns an array of atom symbols, e.g. CA for Calcium, in atomic number order- Returns:
- an array of atom symbols, e.g. CA for Calcium, in atomic number order
-
getFormulaAtoms
returns an array atom symbols in the formula, null if formula is not valid- Parameters:
theFormula- An atom:count string representation of a chemical formula e.g. Ca:1:C:1:O:3 for CaCO3- Returns:
- an array atom symbols in the formula, null if formula is not valid
-
getFormulaMevArray
returns an ascending order array of tabulated energies for the atoms in the formula- Parameters:
formula- An atom:count string representation of a chemical formula e.g. Ca:1:C:1:O:3 for CaCO3- Returns:
- an ascending order array of tabulated energies for the atoms in the formula
-
getFormulaMevArray
returns an ascending order array of tabulated energies for the atoms in the formula- Parameters:
formula- An atom:count string representation of a chemical formula e.g. Ca:1:C:1:O:3 for CaCO3- Returns:
- an ascending order array of tabulated energies for the atoms in the formula
-
getFormulaMuMass
Returns the mass attenuation coefficient for atoms and formulas- Parameters:
theFormula- The formula consists of an atom symbol or a list of atom symbols and their count all separated by ":", e.g. CaCO3 is represented by the string "Ca:1:C:1:O:3"theMeV- The photon energy in MeV between 1KeV to 100GeVmuMassType- "TotAttn", "Raleigh", "Compton", "PhotoElectric", "PairProdN", "PairProdE"- Returns:
- The cross-section in cm2/gm at the photon energy, -1 if incorrect formula
-
getFormulaMuMassArray
returns a list of attenuation coefficients for the formula at each tabulated atom's tabulated energy- Parameters:
formula- An atom:count string representation of a chemical formula e.g. Ca:1:C:1:O:3 for CaCO3muMassType- "TotAttn", "Raleigh", "Compton", "PhotoElectric", "PairProdN", "PairProdE"- Returns:
- The list of attenuation coefficients for the formula at each tabulated atom's tabulated energy
-
getFormulaMuMassArray
returns The list of attenuation coefficients for the formula at each energy- Parameters:
formula- An atom:count string representation of a chemical formula e.g. Ca:1:C:1:O:3 for CaCO3muMassType- "TotAttn", "Raleigh", "Compton", "PhotoElectric", "PairProdN", "PairProdE"mevArray- an array of energies to compute the formula muMass- Returns:
- The list of attenuation coefficients for the formula at each energy
-
getFormulaWeight
Returns the formula weight of the formula- Parameters:
theFormula- An atom:count string representation of a chemical formula e.g. Ca:1:C:1:O:3 for CaCO3- Returns:
- the formula weight in gm/mol, -1 if incorrect formula
-
getAtomMevArray
returns array of tabulated energies for the Atom- Parameters:
theAtom- The Symbol e.g "CA" for Calcium- Returns:
- array of tabulated energies for the Atom
-
getMev
returns the array of tabulated energies for the Atom between the bounds- Parameters:
theAtom- The Symbol e.g "CA" for CalciumminMeV- the lower energy boundmaxMeV- the upper energy bound- Returns:
- the array of tabulated energies for the Atom between the bounds
-
getMeVfromMuLin
public double[] getMeVfromMuLin(String formula, double linearCoeff, double gmPerCC, String muMassType) Returns the photon energy(s) that will produce the observed linear attenuation coefficient for the formula- Parameters:
formula- The formula consists of an atom symbol or a list of atom symbols and their count all separated by ":", e.g. CaCO3 is represented by the string "Ca:1:C:1:O:3"linearCoeff- The experimentally observed linear attenuation coefficient in cm-1gmPerCC- The experimentally observed density in gm/cm3muMassType- "TotAttn", "Raleigh", "Compton", "PhotoElectric", "PairProdN", "PairProdE"- Returns:
- An array of photon energies that satisfy the observed linear coefficient, null if no solutions.
-
getMeVfromMuLinRatio
public double[] getMeVfromMuLinRatio(String formula1, double linearCoeff1, double density1, String formula2, double linearCoeff2, double density2, String muMassType) Returns the photon energy(s) that will produce the observed linear attenuation coefficient ratio of two formulas- Parameters:
formula1- The formula for the first component e.g. "AU" for gold or "Ca:1:C:1:O:3" for Calcite CaCO3linearCoeff1- The experimentally observed linear attenuation coefficient for the first component in cm-1density1- The experimentally observed density for the first component in gm/cm3formula2- same as formula1linearCoeff2- same as linearCoeff1density2- same as density1muMassType- "TotAttn", "Raleigh", "Compton", "PhotoElectric", "PairProdN", "PairProdE"- Returns:
- An array of photon energies that satisfy the observed linear coefficient ratio, null if no solutions. Use with caution!! best results when comparing high average Z component to low average Z
-
getMuMassArray
return the array of tabulated cm2/gram cross sections for the Atom between the bounds- Parameters:
theAtom- The Symbol e.g "CA" for CalciummuMassType- "TotAttn", "Raleigh", "Compton", "PhotoElectric", "PairProdN", "PairProdE"minMeV- the lower energy boundmaxMeV- the upper energy bound- Returns:
- the array of tabulated cm2/gram cross sections for the Atom between the bounds
-
getMuMassTypes
Returns list of recognized cross section types- Returns:
- A string array of muMass Types, i.e. "TotAttn", "Raleigh", "Compton", "PhotoElectric", "PairProdN", "PairProdE"
-
getVersion
returns the version of MassAttenuation- Returns:
- the version of MassAttenuation
-
muLinToMolPerM3
public double muLinToMolPerM3(double linearCoeff, double massCoeff, double formulaGmPerCC) Converts observed linear attenuation coefficient to concentration.- Parameters:
linearCoeff- The experimentally observed linear attenuation coefficient of a known material at a "known" photon energymassCoeff- The calculated mass attenuation coefficient of the known material at the "known" energyformulaGmPerCC- The density of the pure material- Returns:
- The concentration in mol/m3
-
spectrumKramers
public double spectrumKramers(double tubeVoltageKV, double tubeCurrentMa, String targetAtomSymbol, double meV) Estimates the output of a conventional x-ray source (reflection target) using the Kramers equation.- Parameters:
tubeVoltageKV- The excitation potential, AKA x-ray tube voltage KVtubeCurrentMa- The x-ray source beam currenttargetAtomSymbol- The x-ray source target material, usually W TungstenmeV- The energy at which the tube output is to be estimated- Returns:
- The estimated photon intensity.
-
validateAtomSymbol
returns true if the atom is valid- Parameters:
theSymbol- An atom symbol e.g. "CA" for Calcium- Returns:
- true if the atom is valid
-
validateFormula
returns true if the formula is valid- Parameters:
theFormula- An atom:count string representation of a chemical formula e.g. Ca:1:C:1:O:3 for CaCO3- Returns:
- true if the formula is valid
-