diff --git a/fraunhofer.py b/fraunhofer.py index 994da66..2fe9723 100644 --- a/fraunhofer.py +++ b/fraunhofer.py @@ -308,10 +308,10 @@ def propagator2d_fraunhoffer(p_x,p_y,image,wavelength=1e-10): def line_image(image,horizontal_or_vertical='H'): if horizontal_or_vertical == "H": npixels = image.shape[0] - tmp = image[:,image.shape[1]/2] + tmp = image[:,image.shape[1] // 2] else: npixels = image.shape[1] - tmp = image[image.shape[0]/2,:] + tmp = image[image.shape[0] // 2, :] return tmp def line_fwhm(line): @@ -519,4 +519,4 @@ def main(): title="Vertical profile of diffracted intensity (%s)"%method,xtitle='theta [urad]',ytitle='Diffracted intensity [a.u.]') if __name__ == "__main__": - main() \ No newline at end of file + main()