Last active
August 29, 2015 14:14
-
-
Save ZGainsforth/678df181ec1f5cd1bb46 to your computer and use it in GitHub Desktop.
Plot absorption cross-sections for Mn-Co by Cu-Ka
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
# Written by Zack Gainsforth 2015 | |
# Using the constants from | |
# | |
# Low-Energy X-ray Interaction Coefficients: | |
# Photoabsorption, Scattering, and Reflection | |
# E = 30-30,000 eV, Z = 1-92 | |
# | |
# B. L. Henke, E. M. Gullikson, and J. C. Davis | |
# Center for X-Ray Optics, 2-400 | |
# Lawrence Berkeley Laboratory | |
# Berkeley, California 94720 | |
# | |
# To download the nff files used below, go here: | |
# http://henke.lbl.gov/optical_constants/asf.html | |
# Using QuickPlot from https://gist.github.com/f16e032f26994d02e480 | |
from pylab import * | |
import QuickPlot | |
Mn = genfromtxt('mn.nff') | |
Fe = genfromtxt('fe.nff') | |
Co = genfromtxt('co.nff') | |
Eindexes = range(400,440) | |
#Eindexes = range(409,450) | |
E = Mn[Eindexes,0] | |
Mn = Mn[Eindexes,2] | |
Fe = Fe[Eindexes,2] | |
Co = Co[Eindexes,2] | |
h = 4.135667516e-15 | |
c = 299792458 | |
r0 = 2.8179403268e-15 | |
NAvogadro = 6.02214129e23 | |
muMn = 2 * r0 * h*c/E * Mn/54.93805 | |
muFe = 2 * r0 * h*c/E * Fe/55.84515 | |
muCo = 2 * r0 * h*c/E * Co/58.93320 | |
# My units are m^2/g | |
# This converts it to cm^2/g | |
AMn = NAvogadro * muMn * 10000 | |
AFe = NAvogadro * muFe * 10000 | |
ACo = NAvogadro * muCo * 10000 | |
# Now these are photoabsorption cross sections in cm^2/g | |
QuickPlot.QuickPlot(vstack((E,E,E)), vstack((AMn, AFe, ACo)), boldlevel=3, xlabel='eV', ylabel='$\sigma$ cm$^2$/g') | |
axvline(x=8048, ymin=0, ymax = 200, linewidth=3, color='k') | |
legend(['Mn', 'Fe', 'Co']) | |
tight_layout() | |
show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment