Package jhd.MuMassCalculator
Class MuMassCalculator
java.lang.Object
gray.AtomData.AtomData
nist.MuMassData.LookupNIST
jhd.Formulas.FormulaList
jhd.MuMassCalculator.MuMassCalculator
public class MuMassCalculator extends FormulaList
Interpolate tabulated NIST SRD 8 photon cross sections for scattering, photoelectric absorption and pair production,
as well as total attenuation coefficients, for any element,
or compound (Z= 1 to 100), at energies from 1 KeV to 100 GeV.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MuMassCalculator.BeamHardenParams
Wrapper class for serialization boiler plate. -
Constructor Summary
Constructors Constructor Description MuMassCalculator()
-
Method Summary
Modifier and Type Method Description double
getFormulaWeight(java.lang.String theFormula)
Returns the formula weight of the formuladouble[]
getMevArray(java.lang.String theFormula)
Returns the list of tabulated x-ray energies for the formula, useful in plotting spectra with absorption edges.double[]
getMevArray(java.lang.String theFormula, double minMev, double maxMev)
Returns the list of tabulated x-ray energies between minMev and maxMev for the formula, useful in plotting spectra with absorption edges.double[]
getMeVfromMuLin(java.lang.String formula, double linearCoeff, double gmPerCC, java.lang.String muMassType)
Returns the photon energy(s) that will produce the observed linear attenuation coefficient for the formuladouble[]
getMeVfromMuLinRatio(java.lang.String formula1, double linearCoeff1, double density1, java.lang.String formula2, double linearCoeff2, double density2, java.lang.String muMassType)
Returns the photon energy(s) that will produce the observed linear attenuation coefficient ratio of two formulasdouble
getMuMass(java.lang.String theFormula, double theMeV, java.lang.String muMassType)
Returns the mass attenuation coefficient for atoms and formulasjava.lang.String[]
getMuMassTypes()
Returns list of recognized cross section typesdouble
muLinToMolPerM3(double linearCoeff, double massCoeff, double formulaGmPerCC)
Converts observed linear attenuation coefficient to concentration.double
spectrumKramers(double tubeVoltageKV, double tubeCurrentMa, java.lang.String targetAtomSymbol, double meV)
Estimates the output of a conventional x-ray source (reflection target) using the Kramers equation.Methods inherited from class jhd.Formulas.FormulaList
createFormulaList, getAtomCount, getAtomDensity, getAtomName, getAtomNumber, getAtomSymbol, getAtomWeight
Methods inherited from class nist.MuMassData.LookupNIST
getabsEdgeNames, getAtomAbsEdge, getAtomMevArray, getAtomMuMass
Methods inherited from class gray.AtomData.AtomData
getAtomCount, getAtomDensity, getAtomGmPerCC, getAtomName, getAtomNames, getAtomNum, getAtomNumber, getAtomsGmPerCC, getAtomsGmPerMol, getAtomSymbol, getAtomSymbols, getAtomWeight, getAtomWeight, setAtomCount, setAtomSymbol
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MuMassCalculator
public MuMassCalculator()
-
-
Method Details
-
getFormulaWeight
public double getFormulaWeight(java.lang.String theFormula)Returns the formula weight of the formula- Parameters:
theFormula
- A 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
-
getMuMass
public double getMuMass(java.lang.String theFormula, double theMeV, java.lang.String muMassType)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". Defaults to "ToTAttn"- Returns:
- The cross-section in cm2/gm at the photon energy, -1 if incorrect formula
-
getMuMassTypes
public java.lang.String[] getMuMassTypes()Returns list of recognized cross section types- Returns:
- A string array of muMass Types, i.e. "TotAttn", "Raleigh", "Compton", "PhotoElectric", "PairProdN", "PairProdE"
-
getMevArray
public double[] getMevArray(java.lang.String theFormula, double minMev, double maxMev)Returns the list of tabulated x-ray energies between minMev and maxMev for the formula, useful in plotting spectra with absorption edges.- 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"minMev
- The minimum energy of the returned MeV rangemaxMev
- The maximum energy of the returned MeV range- Returns:
- A array of tabulated photon energies between mevMin and mevMax for the elements in the formula, null if incorrect formula
-
getMevArray
public double[] getMevArray(java.lang.String theFormula)Returns the list of tabulated x-ray energies for the formula, useful in plotting spectra with absorption edges.- 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"- Returns:
- A array of all tabulated photon energies for the elements in the formula, null if incorrect formula
-
getMeVfromMuLinRatio
public double[] getMeVfromMuLinRatio(java.lang.String formula1, double linearCoeff1, double density1, java.lang.String formula2, double linearCoeff2, double density2, java.lang.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
-
getMeVfromMuLin
public double[] getMeVfromMuLin(java.lang.String formula, double linearCoeff, double gmPerCC, java.lang.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.
-
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, java.lang.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.
-