⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stempsf.m

📁 扫描电镜(stem)的matlab模拟程序代码
💻 M
字号:
%
%  Matlab file to plot the STEM probe profile
%  this script calls stemhr.m
%
%  started 27-feb-1997 E. Kirkland
%  last modified 6-June-2006 DAM
%
npoints=400; % number of points in real space.  Increase to check convergence

disp( 'Plot STEM probe intensity' );
kev  = input( 'Type electron energy in keV :');
wav = 12.3986/sqrt((2*511.0+kev)*kev);  % electron wavelength

Cs   = input( 'Type spherical aberation Cs in mm :');
fopt = sqrt(Cs* 1e7*wav);  % calculate optimal defocus in Angstroms
aopt = 1e3*(4*wav/(Cs* 1e7))^0.25;  % calculate optimal aperture in mrad
sprintf('Optimal defocus is %f Angstroms, Optimal aperture is %f mrad',fopt,aopt )

df   = input( 'Type defocus df in Angstroms :');
amax = input( 'Type objective aperture semiangle in mrad :');
d0   = input( 'Type source size in Angstroms :');
%
wav = 12.3986/sqrt((2*511.0+kev)*kev);  % electron wavelength
rmax = 6*sqrt( sqrt( Cs*1.0e7*wav*wav*wav ));
r = 0:(rmax/npoints):rmax;  
param.Cs   = Cs;
param.df   = df;
param.kev  = kev;
param.amax = amax;
param.d0=d0;

psf = stemhr( r, param, npoints );
intpsf=cumtrapz(r,2*pi*r.*psf');

figure;
plot( r, psf );
xlabel( 'radius in Angstroms');
ylabel( 'PSF' );
s1 = sprintf('Cs= %gmm, df= %gA, E= %gkeV, ', Cs, df, kev);
s2 = sprintf('OA= %gmrad, d0=%gA', amax,d0);
title([s1 s2]);

figure;
plot( r, intpsf );
xlabel( 'radius in Angstroms');
ylabel( 'Radially Integrated PSF' );
s1 = sprintf('Cs= %gmm, df= %gA, E= %gkeV, ', Cs, df, kev);
s2 = sprintf('OA= %gmrad, d0=%gA', amax,d0);
title([s1 s2]);

⌨️ 快捷键说明

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