In [2]:
# Created 2016, Zack Gainsforth
%pylab inline

import sys, os
import QuickPlot
import matplotlib.pylab as pylab
pylab.rcParams['figure.figsize'] = 8, 6  # that's default image size for this interactive session


Populating the interactive namespace from numpy and matplotlib
/Users/Zack/anaconda/envs/conda35/lib/python3.5/site-packages/matplotlib/__init__.py:1357: UserWarning:  This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

  warnings.warn(_use_error_msg)

In [5]:
# No +U, no mag.
Mg_Far = genfromtxt('DFT_nonmag/Mg-K_far/Spectrum-Mg/Spectrum-Ave-Mg', skip_header=1)
Mg_Near = genfromtxt('DFT_nonmag/Mg-K_near/Spectrum-Mg/Spectrum-Ave-Mg', skip_header=1)

O_Far = genfromtxt('DFT_nonmag/O-K_far/Spectrum-O/Spectrum-Ave-O', skip_header=1)
O_Near = genfromtxt('DFT_nonmag/O-K_near/Spectrum-O/Spectrum-Ave-O', skip_header=1)

Ti = genfromtxt('DFT_nonmag/Ti-K/Spectrum-Ti/Spectrum-Ave-Ti', skip_header=1)

fig,ax = QuickPlot.QuickPlot(O_Far[:,0], O_Far[:,1], boldlevel=2, title='O-K Far')
QuickPlot.QuickPlot(O_Near[:,0], O_Near[:,1], boldlevel=2, 
                    title='O-K Near', 
                    figax=(fig,ax), 
                    legendloc='upper left', 
                    legendstrs=['Far', 'Near'],
                    xlim=[-10,40])

fig,ax = QuickPlot.QuickPlot(Mg_Far[:,0], Mg_Far[:,1], boldlevel=2)
QuickPlot.QuickPlot(Mg_Near[:,0], Mg_Near[:,1], boldlevel=2, 
                    title='Mg-K', 
                    figax=(fig,ax), 
                    legendloc='upper left', 
                    legendstrs=['Far', 'Near'],
                    xlim=[-10,40])

QuickPlot.QuickPlot(Ti[:,0], Ti[:,1], boldlevel=2, title='Ti-K')


Out[5]:
(<matplotlib.figure.Figure at 0x10c5f55f8>,
 <matplotlib.axes._subplots.AxesSubplot at 0x10ef53a20>)

In [6]:
Tinonmag = genfromtxt('DFT_nonmag/Ti-K/Spectrum-Ti/Spectrum-Ave-Ti', skip_header=1)
Timag = genfromtxt('DFT_mag/Ti-K/Spectrum-Ti/Spectrum-Ave-Ti', skip_header=1)

fig,ax = QuickPlot.QuickPlot(Tinonmag[:,0], Tinonmag[:,1], boldlevel=2)
QuickPlot.QuickPlot(Timag[:,0]+0.5, Timag[:,1]*2, boldlevel=2, 
                    title='Ti-K', 
                    figax=(fig,ax), 
                    legendloc='upper left', 
                    legendstrs=['Non Magnetic', 'Magnetic'],
                    xlim=[-5,10])


Out[6]:
(<matplotlib.figure.Figure at 0x10ef32b38>,
 <matplotlib.axes._subplots.AxesSubplot at 0x10ef62390>)

In [ ]: