Home

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

If you use this library please be sure to adequately reference:

Usage

Examples of how to use the major exported methods can be found here.

Method Documentation

FFAST.EVMethod.
EV(z::Int)::Float64

E(eV) [μ/ρ] in cm²/g = f₂(e/atom) ⋅ EV(z)

Conversion factor for the f₂ form factor.

FFAST.atomicweightMethod.
atomicweight(z::Int)::Float64

The mean atomic weight for the specified element.

Fail fast: Throws an exception when the data is not available.

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.densityMethod.
density(z::Int)::Float64

Nominal value of the density of the element in g/cm³.

FFAST.eachedgeMethod.
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.eachelementMethod.
eachelement(::Type{FFAST})

The range of available elements.

FFAST.edgeenergyMethod.
edgeenergy(z::Int, shell::Int)::Float64

The edge energy (in eV) for the specific element and shell. Chantler references these sources for the values

  1. Bearden, J.A., Rev. Mod. Phys. 39, 78-124 (1967).
  2. 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.formfactorsMethod.
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).

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.

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.hasedgeMethod.
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.jumpratioMethod.
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.macMethod.
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.macMethod.
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.macMethod.
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.macMethod.
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).

nuclearthompsoncorrection(z::Int)::Float64

Nuclear Thomson correction fₙₜ</sub> in e/atom.

relativisticcorrection(z::Int)::Tuple{Float64,Float64}

Relativistic correction estimates fᵣₑₗ(H82,3/5CL) in e/atom. Returns a tuple with two values.