Package reflectometry :: Package model3d :: Module plotting

Source Code for Module reflectometry.model3d.plotting

 1  # Copyright (C) 2008 University of Maryland
 
 2  # All rights reserved.
 
 3  # See LICENSE.txt for details.
 
 4  
 
 5  # Author: Christopher Metting
 
 6  # Starting Date: 4/14/2008
 
 7  
 
 8  '''
 
 9  Qz versus Qx and Intensity versus Qz Plots
 
10  
 
11  This plotting module produces a figure which contains both the three dimentional
 
12  intensity plot as well as a slice of the qz along the specular position.
 
13  This is more useful for DWBA where the calculation are more accurate along the
 
14  specular
 
15  ''' 
16  import pylab 
17  from numpy import log10,linspace,max,min 
18 -def two_Dim_with_z_slice(qx,qz,intensity,plot_points,maxqz):
19 print intensity.dtype 20 intensity = (abs(intensity)**2) 21 pylab.subplot (2,1,1) 22 find_peak = linspace(1,plot_points,plot_points) 23 p=pylab.pcolormesh(qx,qz,log10(intensity+1)) 24 pylab.copper() 25 pylab.colorbar() 26 pylab.xlabel('Qx(A^-1)') 27 pylab.ylabel('Qz(A^-1)') 28 29 pylab.ylim (0,maxqz) 30 pylab.title('Simulated Intensity Plots') 31 32 33 intensity_slice = intensity[:,plot_points/2] 34 35 pylab.subplot (2,1,2) 36 pylab.semilogy(qz,(intensity_slice),marker = 'None',linestyle = '-') 37 38 pylab.xlabel('Qz(A^-1)') 39 pylab.ylabel('Intensity (AU)') 40 pylab.title(' Qz Slice') 41 pylab.xlim (0,maxqz) 42 pylab.show() 43 44 return
45
46 -def differance_plot(qx,qz,intensity,plot_points,maxqz):
47 pylab.pcolormesh(qx,qz,(intensity+1)) 48 pylab.colorbar() 49 pylab.xlabel('Qx(A^-1)') 50 pylab.ylabel('Qz(A^-1)') 51 52 pylab.ylim (0,maxqz) 53 pylab.title('Simulated Intensity Plots') 54 pylab.show() 55 return
56