Solutio in silico

The NISTPAD Project

The NIST Photon Attenuation Data code is a class which handles the photon attenuation data from the NIST website. It allows you to easily import data for any element or material listed on the website and quickly calculate attenuation and energy absorption coefficients for photon energies ranging from 1 keV to 20 MeV.

If you want to see a working example of the NISTPAD class, check out the photon attenuation coefficient calculator.

Source Code

Dependencies

Sample

The following excerpts of code demonstrate some functions and usage of the NISTPAD class:

// Load an element and get atteunation coefficients for 3 MeV photons
std::string data_folder = "YourPath/SolutioCpp/Data/NISTX";
solutio::NistPad Al(data_folder, "Aluminum");
double mu_rho = Al.MassAttenuation(3.0);
double mu = Al.LinearAttenuation(3.0);

// Load a compound, change density and get absorption coefficients
std::string data_folder = "YourPath/SolutioCpp/Data/NISTX";
solutio::NistPad Bone(data_folder, "Bone, Cortical (ICRU-44)");
Bone.ForceDensity(1.0);
double mu_rho_en = Bone.MassAbsorption(1.0);
double mu_en = Bone.LinearAbsorption(1.0);

// Get material properties
double z_a_ratio = Bone.GetZtoA();
double mean_exitation_energy = Bone.GetI();
double density = Bone.GetDensity();
std::vector< std::pair<int,double> > atomic_composition = Bone.GetComposition();

Please look at the header file for more information on the class implementation.