Class MuMassCalculator

java.lang.Object

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.
  • 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 100GeV
      muMassType - "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 range
      maxMev - 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 CaCO3
      linearCoeff1 - The experimentally observed linear attenuation coefficient for the first component in cm-1
      density1 - The experimentally observed density for the first component in gm/cm3
      formula2 - same as formula1
      linearCoeff2 - same as linearCoeff1
      density2 - same as density1
      muMassType - "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-1
      gmPerCC - The experimentally observed density in gm/cm3
      muMassType - "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 energy
      massCoeff - The calculated mass attenuation coefficient of the known material at the "known" energy
      formulaGmPerCC - 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 KV
      tubeCurrentMa - The x-ray source beam current
      targetAtomSymbol - The x-ray source target material, usually W Tungsten
      meV - The energy at which the tube output is to be estimated
      Returns:
      The estimated photon intensity.