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
— MethodEV(::Type{FFASTMAC}, z::Int)::Float64
E(eV) [μ/ρ] in cm²/g = f₂(e/atom) ⋅ EV(::Type{FFASTMAC}, z)
Conversion factor for the f₂ form factor.
FFAST.atomicweight
— Methodatomicweight(::Type{FFASTMAC}, z::Int)::Float64
The mean atomic weight for the specified element.
FFAST.crosssectionfactor
— Methodcrosssectionfactor(::Type{FFASTMAC}, z::Int)::Float64
The constant factor to convert [μ/ρ] to cross section in cm²/atom.
FFAST.density
— Methoddensity(::Type{FFASTMAC}, z::Int)::Float64
Nominal value of the density of the element in g/cm³.
FFAST.eachedge
— Methodeachedge(::Type{FFASTMAC}, z::Int)::Set{Integer}
Returns a set containing the shells for which there is an edge energy in the database for the specified element.
FFAST.eachelement
— Methodeachelement(::Type{FFAST})
The range of available elements.
FFAST.edgeenergy
— Methodedgeenergy(::Type{FFASTMAC}, 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).
FFAST.formfactors
— Methodformfactors(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
— Methodfractionaluncertainty(::Type{FFASTMAC}, ::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
— Methodfractionaluncertainty(::Type{FFASTMAC}, ::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
— Methodhasedge(::Type{FFASTMAC}, z::Int, shell::Int)::Bool
Is a value available for the specific shell's edge energy for the element identified by atomic number, z.
FFAST.jumpratio
— Methodjumpratio(::Type{FFASTMAC}, z::Int, shell::Int)::Float64
Returns the jump-ratio for the specified element and shell. This implementation attempts to use the FFAST MAC data to extract the jump-ratio. It uses a simple algorithm in which we look just above and just below the shell edge to determine the height of the edge. Returns zero if the edge isn't available.
FFAST.mac
— Methodmac(::Type{FFASTMAC}, ::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
— Methodmac(::Type{FFASTMAC}, ::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
— Methodmac(::Type{FFASTMAC}, ::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
— Methodmac(::Type{FFASTMAC}, ::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
— Methodnuclearthompsoncorrection(::Type{FFASTMAC}, z::Int)::Float64
Nuclear Thomson correction fₙₜ</sub> in e/atom.
FFAST.relativisticcorrection
— Methodrelativisticcorrection(::Type{FFASTMAC}, z::Int)::Tuple{Float64,Float64}
Relativistic correction estimates fᵣₑₗ(H82,3/5CL) in e/atom. Returns a tuple with two values.