stemhr2d.m

来自「扫描电镜(stem)的matlab模拟程序代码」· M 代码 · 共 35 行

M
35
字号
function psf2d = stemhr2d(rmax,nx,param)
%  STEMHR2D STEM point spread function in 2D (PSF)
%  MATLAB function to calculate STEM probe shape in 2D
%    input array r has the radial positions (in Angs.)
%    input array param has the optical parameters
%          param = [Cs, df, kev, amax]
%    input nk is the number of points in integral over k
%    output array contains the transfer function
%
%  Cs   = spherical aberration (in mm)
%  df   = defocus (in Angstroms)
%  kev  = electron energy (in keV)
%  amax = objective aperture  (in mrad)
%
%  started 10-Apr-1997 David Muller (based on EJK's stemhr)
%
dr = rmax/nx;
%
wav = 12.3986/sqrt((2*511.0+param.kev)*param.kev);  % electron wavelength
%
% Bandwidh limit to keep spherical symmetry
pxmax = rmax/2;
px = 0:dr:pxmax;
psf = stemhr( px, param, 2*nx ); % sample in k space at 2nx points
a = psf(1);
psf = psf/a;  % normalize psf(r)
psf = [ psf; zeros(nx-length(psf)+1,1)];
%
[rx,ry] = meshgrid( -rmax/2:dr:(rmax/2)-dr);
r = sqrt( rx.^2 + ry.^2 );
clear rx,ry;
rx = 0:dr:rmax;
%
%psf2d = zeros(nx,nx);
psf2d = interp1( rx,psf, r ,'cubic' ); 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?