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
Uber App Clone 1.0
TeeChart NET for Xamarin.Forms 2017
JavaScript Framework Shield UI 1.7.33
SentiVeillance SDK Trial 6.0.171442
Instacart Clone 1.0
Dynamic Product Options for Magento 2 2.3.0
AnyChart JS Charts and Dashboards 8.0.0
Key Transformation 8.1131
AnyGantt JS Gantt Charts 8.0.0
Hex Comparison 5.12
SecureBridge 8.1
Hotelline PMS 1.0
TeeBI for RAD Studio Suite 2017
AnyStock Stock and Financial JS Charts 8.0.0
Entrepreneur News Portal 1.0.2
Top Code
A Prolog Expert System 0.2.0
Cuckoo Search (CS) Algorithm 1.0
Cuckoo Optimization Algorithm 1.0
Ping Pong Game Code Script 1.1
Ticket Booking System 1.0
Discrete Cosine Transform based Image Fusion Techniques 1.0
Perl Black Book, 2nd Edition
Deliz Online Food Ordering System 1.1
Web Programming in Python: Techniques for Integrating Linux, Apache and MySQL
Online Vacation Rental Booking Website Script 4.3.0
CellSort 1.0
War Game (Version 2)
Database metadata 1.0
Hotel Management System 6.45
Classic HangMan Game 1.0
Top Rated
Jango Clone Script 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
ADO.NET Provider for ExactTarget 1.0
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
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