Code Directory
 Visual Basic & VB.NET
New Code
Bytescout BarCode Reader SDK
IP2Location Geolocation Database 2017
Best Spotify Open Source Clone Script 1.0
Flipkart Clone Script 4.0.5
Database Converters for Windows 3.15
Hotelline PMS 1.2
Devart T4 Editor 1.0
dbForge Studio for SQL Server 5.5
Extreme Injector 3.7
Kickstarter Clone Script 1.0.2
Etsy Clone Script 1.0.2
ByteScout PDF Extractor SDK
SQL Formatter for SQL Server 1.0
Database Workbench Pro 5.3.2
Paypal Clone Script 1.0.9
Top Code
Bytescout BarCode Reader SDK
Simulink Support Package for Arduino Uno Hardware 1.0
Cuckoo Optimization Algorithm 1.0
Download all lolcat images from
Copy-move forgery detection in images
Flipkart Clone Script 4.0.5
Availability Booking Calendar PHP 1.0
Piecewise spline interpolation 1.0
mornshout for Music and Sound 1.1
MakeMyTrip Clone 7.6.2
Java File Integrity Checking - ChkSum 1.1
Kernel Ridge Regression 1.0
Gate Pass Management System 1.0.2
eLearning Management System 1.0
PAM HYIP script software 1.0
Top Rated
Get Random Record Based on Weight 1.0.0
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Sine Wave Using JavaFX 1.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Readymade MLM Software 2.02
Availability Booking Calendar PHP 1.0
PhotonAttenuation 2.0
File ID: 79523

PhotonAttenuation 2.0
Download PhotonAttenuation 2.0http://www.mathworks.comReport Error Link
License: Freeware
File Size: 163.8 KB
Downloads: 5
Submit Rating:
PhotonAttenuation 2.0 Description
Description: Set of functions providing the attenuation and energy absorption coefficients of x-ray and gamma-ray photons in various materials, based on NIST report 5632, by J. Hubbell and S.M. Seltzer.

X = PhotonAttenuation(Material, Energy, Options, Thickness)
Function providing the attenuation and energy absorption of x-ray and gamma-ray photons in various materials including mixtures and compounds, based on NIST report 5632, by J. Hubbell and S.M. Seltzer.

1) Material - string, number or array of strings, numbers or cells describing material type.
- Element atomic number Z - in 1 to 100 range
- Element symbols - 'Pb', 'Fe'
- Element names - 'Lead', 'Iron', 'Cesium' or 'Caesium'
- Some common names and full compound names - 'Water', 'Polyethylene' (see function PhysProps for more details)
- Compound formulas - 'H2SO4', 'C3H7NO2'- those are case sensitive
- Mixtures of any of above with fractions by weight ? like 'H(0.057444)C(0.774589)O(0.167968)' for Bakelite or 'B(10)H(11)C(58)O(21)' for Borated Polyethylene (BPE-10)
2) Energy - Energy of the photons. Can be single energy or vector of energies. Several formats are allowed:
- Energy in MeV, should be in [0.001, 20] MeV range.
- Wavelengths in nano-meters. Encoded as negative numbers. The valid range is 6.1982e-5 to 1.2396 nm;
- Continuous Spectrum - Encoded in 2 columns: column one contains energy and column two contains relative number of photons at that energy. Spectrum is assumed to be continuous and output is calculated through integration using 'trapz' function.
3) Options - specifies what to return. String or number:
1. 'mac' - function returns Mass Attenuation Coefficients in cm^2/g
2. 'meac' - function returns Mass Energy-Absorption Coefficients in cm^2/g. See link below for more info:
3. 'cross section' - function returns cross section in barns per atom (convert to cm^2 per atom by multiplying by 10^24). Available only for elements.
4. 'mean free path' - function returns mean free path (in cm) of photon in the given material . Available only for chemicals recognized by 'PhysProps' function (since density is needed).
5. 'transmission' - fraction of protons absorbed by given thickness of material
4) Thickness - Thickness of material in cm. Either scalar or vector of the same length as number of materials. Negative numbers indicate mass thickness measured in g/cm^2 (density*thickness). Needed only if energy spectrum is used or in case of Options set to 'Transmission'.

There are 3 other functions in the set that are used by 'PhotonAttenuation' function:
1) PhysProps - index of physical properties (density and atomic mass) and names of elements and compounds
2) ParseChemicalFormula - function converting many different styles of names used for elements, compounds and mixtures to uniform list of elements and their weight ratios.
3) PhotonAttenuationQ - low-level version of 'PhotonAttenuation' function with very few input options.
4) PhotonAttenuation_examples - a script with many examples of how to use this package.

Tables are based on "X-Ray Attenuation and Absorption for Materials of Dosimetric Interest" (XAAMDI) database (NIST 5632 report): J. Hubbell and S.M. Seltzer, "Tables of X-Ray Mass Attenuation Coefficients and Mass Energy-Absorption Coefficients 1 keV to 20 MeV for Elements Z = 1 to 92 and 48 Additional Substances of Dosimetric Interest, "National Institute of Standards and Technology report NISTIR 5632 (1995).

MAC values for elements 93 to 100 (Neptunium to Fermium) came from XCOM: Photon Cross Sections Database (NBSIR 87-3597): Those tables give photon's "total attenuation coefficients" for elements with atomic number (Z) smaller than 100. Photon energy range is from 0.001 MeV to 100 GeV.

Written by Jarek Tuszynski (SAIC), 2006
Inspired by John Schweppe Mathematica code avaiable at

License: Freeware

Related: densitythickness, measured, needed, Spectrum, Transmission, Negative, thickness, scalar, Length, photonattenuation, Converting, styles, uniform, parsechemicalformula, compounds

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 163.8 KB

Downloads: 5

More Similar Code

Package PhotonAttenuation2 provides set of functions for modeling of photons (x-ray, gamma-ray, etc.), passing through different materials. The tools are based on attenuation and energy absorption coefficients of photons in various materials. The tables of absorption coefficients were copied from NIST and embedded in the MATLAB code.

Package consist of 4 functions:

PhotonAttenuation - the main function returning variuos...

User Review for PhotonAttenuation
- required fields

Please enter text on the image