Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
AnyGantt JS Gantt Charts 8.1.0
PHP Scripts Mall Pvt Ltd 1.0.2
Bytescout PDF To HTML SDK 8.7.0.2980
JavaScript Framework Shield UI 1.7.34
Fortune Car Rental Script 3.4
Fortune Stackoverflow Clone 3.4
VintaSoft Imaging .NET SDK 8.6
wolfSSL 3.12.2
Bytescout BarCode Generator SDK 4.62.0.964
ThomasNet Clone Script 2.0
Easy Button & Menu Maker 5.0
Entrepreneur News Portal 1.6
Fortune Quibids Clone 3.4
Database Workbench Pro 5.3.4
Extensibility Studio 2.0
Top Code
fastLogin 1.III
Face Detection & Recognition System 1.0
Chess Master 1.0
Calendar Toolbox (calendar.inc) 1.0
College Management System Script 1.0.4
My Free Fantasy League 1.0
Nonlinear F-16 Fighter Model 1.0
Senna One-Page Html5 Template 1.0
efax 0.9
Circle on image 1.0
Simple Menu Code 1.1
FJSP Software 1.0
Travel Booking script 1.0.4
Real Time Battle 1.1
TIC TAC TOE AI GAME Script 1.1
Top Rated
Output Messenger - company chat software 1.7.6
Indiegogo Clone 3.0
PHP Image Resize Script 1.0
Jango Clone Script 1.0
Best Spotify Clone 1.0
Get Random Record Based on Weight 1.0.0
Travel Portal Script 9.29
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
Readymade MLM Products 2.01
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 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.

Input:
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: http://physics.nist.gov/PhysRefData/XrayMassCoef/chap3.html
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.

References:
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). http://physics.nist.gov/PhysRefData/XrayMassCoef/cover.html

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. http://physics.nist.gov/PhysRefData/Xcom/Text/XCOM.html

History:
Written by Jarek Tuszynski (SAIC), 2006
Inspired by John Schweppe Mathematica code avaiable at http://library.wolfram.com/infocenter/MathSource/4267/

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