FFAST.jl
This is a Julia 1.X implementation of the NIST X-Ray Form Factor, Attenuation, and Scattering Tables (FFAST) database. It is designed to
- only expose data from the NIST FFAST database,
- not depend upon any other physics-related modules,
- not pollute the namespace, and
- impose minimal requirements on the library user.
- Elements are identified by atomic number (Int)
- Shells/edges are identified by index (Int) where 1->K, 2->L1, 3->L2, ...., 25->O9
If you use this library please be sure to adequately reference:
- Chantler, C.T., Olsen, K., Dragoset, R.A., Chang, J., Kishore, A.R., Kotochigova, S.A., and Zucker, D.S. (2005), X-Ray Form Factor, Attenuation and Scattering Tables (version 2.1). Online Downloaded: 10-Sep-2019. National Institute of Standards and Technology, Gaithersburg, MD.
- Originally published as
- This library is based on tables scraped from the NIST website on 10-Sep-2019.
- The library implements functions to log-log interpolate the tabulated values for
- form factors (f₁ and f₂)
- mass attenuation/absorption coefficients μ/ρ(photoelectric), μ/ρ(coherent/incoherent), μ/ρ(total), μ/ρ(K-only)
- In addition, the library implements functions to access the supplemental values
- mean atomic weight
- edge energies
- nominal density
- relativistic corrections
- nuclear Thompson correction
Usage
Examples of how to use the major exported methods can be found here.
Method Documentation
FFAST.EV
— Method.EV(z::Int)::Float64
E(eV) [μ/ρ] in cm²/g = f₂(e/atom) ⋅ EV(z)
Conversion factor for the f₂ form factor.
FFAST.atomicweight
— Method.atomicweight(z::Int)::Float64
The mean atomic weight for the specified element.
Fail fast: Throws an exception when the data is not available.
FFAST.crosssectionfactor
— Method.crosssectionfactor(z::Int)::Float64
The constant factor to convert [μ/ρ] to cross section in cm²/atom.
Fail fast: Throws an exception when the data is not available.
FFAST.density
— Method.density(z::Int)::Float64
Nominal value of the density of the element in g/cm³.
FFAST.eachedge
— Method.eachedge(z::Int)::Set{Integer}
Returns a set containing the shells for which there is an edge energy in the database for the specified element.
Fail fast: Throws an exception when the element is not available.
FFAST.eachelement
— Method.eachelement(::Type{FFAST})
The range of available elements.
FFAST.edgeenergy
— Method.edgeenergy(z::Int, shell::Int)::Float64
The edge energy (in eV) for the specific element and shell. Chantler references these sources for the values
- Bearden, J.A., Rev. Mod. Phys. 39, 78-124 (1967).
- Bearden, J.A., Burr, A.F., Rev. Mod. Phys. 39, 125-142 (1967).
Fail fast: Throws an exception when the data is not available.
FFAST.formfactors
— Method.formfactors(z::Int, energy::Float64)::Tuple{Float64,Float64}
Returns a tuple containing the form factors for the specified element and X-ray energy (in eV).
FFAST.fractionaluncertainty
— Method.fractionaluncertainty(::Type{MonatomicGas}, z::Integer, energy)
Determines from the element and energy, the approximate range of fractional uncertainties to associate with the total and photoelectric components of the mass attenuation coefficients for monatomic gas samples. Based on this table.
FFAST.fractionaluncertainty
— Method.fractionaluncertainty(::Type{SolidLiquid}, z::Integer, energy)
Determines from the element and energy, the approximate range of fractional uncertainties to associate with the total and photoelectric components of the mass attenuation coefficients for solids and liquids. Based on this table.
FFAST.hasedge
— Method.hasedge(z::Int, shell::Int)::Bool
Is a value available for the specific shell's edge energy for the element identified by atomic number, z.
Fail fast: Throws an exception when the element is not available.
FFAST.jumpratio
— Method.jumpratio(z::Int, subshell::Int)::Float64
Returns the jump-ratio for the specified element and subshell. This implementation is based on jump ratio data extracted from FFAST taken from https://github.com/openmicroanalysis/calczaf/blob/master/jump_ratios.dat. Returns 1.0 if data isn't available.
FFAST.mac
— Method.mac(::Type{CoherentIncoherentMAC}, z::Int, energy::Float64)::Float64
Returns the coherent/incoherent attenuation coefficient in cm²/g for the specified element and X-ray energy (in eV).
FFAST.mac
— Method.mac(::Type{KMAC}, z::Int, energy::Float64)::Float64
Returns the K-shell only attenuation coefficient in cm²/g for the specified element and X-ray energy (in eV).
FFAST.mac
— Method.mac(::Type{PhotoElectricMAC}, z::Int, energy::Float64)::Float64
Returns the photoelectric attenuation coefficient in cm²/g for the specified element and X-ray energy (in eV).
FFAST.mac
— Method.mac(::Type{TotalMAC}, z::Int, energy::Float64)::Float64
Returns the total attenuation coefficient in cm²/g for the specified element and X-ray energy (in eV).
FFAST.nuclearthompsoncorrection
— Method.nuclearthompsoncorrection(z::Int)::Float64
Nuclear Thomson correction fₙₜ</sub> in e/atom.
FFAST.relativisticcorrection
— Method.relativisticcorrection(z::Int)::Tuple{Float64,Float64}
Relativistic correction estimates fᵣₑₗ(H82,3/5CL) in e/atom. Returns a tuple with two values.