📄 temcon.m
字号:
function II = temcon()
% Temcon Simulate an BF image using the partial coherent imaging model (weak phase object approximation)
% calls ctemconvolution.m, tempot.m
%
% started 07-Jul-06
%
clear all;
disp( 'Temcon: Simulate an BF image using the weak phase imaging model' );
%
kev = input( 'Type electron energy in keV :');
Cs = input( 'Type spherical aberation Cs in mm :');
df = input( 'Type defocus df in Angstroms :');
amax = input( 'Type objective aperture semiangle in mrad :');
ddf = input('Type chromatic aberation defocus spread in Angstroms :');
beta = input( 'Type spread in illumination angles in mrad :');
%
rmax = input( 'Type size of slice in Angstroms:');
nx = input( 'Type number of pixels in slice:');
%
option = input ('1 - Coordinates file; 2 - image file : ');
if option == 1
potfile = input( 'Type name of coordinates file(e.g. si7x5.xyz) : ','s');
V = tempot(rmax,rmax,nx,nx,potfile);
elseif option == 2
potfile = input( 'Type name of the image file(e.g. random.tif) : ','s');
V = double(imread(potfile));
end
dx = rmax/nx;
x = -rmax/2:dx:rmax/2-dx;
imagesc(x,x,V);
axis( [ -rmax/2 rmax/2 -rmax/2 rmax/2 ] );
axis square;
xlabel( 'Position in Angstroms');
title('Projected Potential');
colormap(hot);
colorbar;
figure;
param.Cs = Cs;
param.df = df;
param.kev = kev;
param.amax = amax;
param.ddf = ddf;
param.beta = beta;
II = ctemconvolution(V,rmax,nx,param,0);
imagesc(x,x,II);
colorbar;
axis( [ -rmax/2 rmax/2 -rmax/2 rmax/2 ] );
xlabel( 'Position in Angstroms');
axis square;
colormap(hot);
s = sprintf('TEM Cs= %gmm, df= %gA, E= %gkeV, OA = %gmrad, ddf = %gA, beta = %gmrad', Cs, df, kev, amax, ddf, beta);
title([potfile ' ' s]);
filename = [potfile ' TEM' ' rmax=' num2str(rmax) 'A' ' ' s '.jpg'];
print('-djpeg90',filename);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -