ようこそ ゲスト さん。ログインしてください。
新規会員登録は、こちらから。
  ログイン    ID   パスワード      
コンテンツ flagflag

u-inspector sifi Click Here
TEMography Channel


JEM ToolBox スクリプトのサンプル

MATLAB の詳細については、こちらのホームページを参照してください。


サンプル集

No. Title Type Download Last Date
01 Connection to TEM. Cmd line (N/A) ---
02 Connection to CCD camera. Cmd line (N/A)) ---
03 Getting of CL1 value. Cmd line (N/A) ---
04 Setting of CL1 value. Cmd line (N/A)) ---
05 Image acquisition. Cmd line (N/A) ---
06 Disconnect into TEM. Cmd line (N/A)) ---
07 Disconnect into CCD camera. Cmd line (N/A) ---
08 The stage is moved. Script (N/A)) ---
09 Image shift operation. Script (N/A) ---
10 The image is acquired. GUI zipped file 2007/11/06
11 A live image is acquired. GUI zipped file 2007/11/06
12 The image is sampserved. GUI zipped file 2007/11/06

01 Connection to TEM

>>h = startJEM( )
h =
  COM.Mat2TemNetJEOLSvr_Mat2TemNetJEOLCtl
>>

Page top


02 Connection to CCD camera

>>hg = startDM( )
hg =
  COM.Mat2GatanDMJSTSvr_Mat2GatanDMJSTCtl
>>

Page top


03 Getting of CL1 value

>>[X, Y] = algCL1(h)
algCL1(get) : X = 8000, Y = 8000
X =
  50.0008
Y =
  50.0008
>>

Page top


04 Setting of CL1 value

>>algCL1(h, X, Y);
>>[X, Y] = algCL1(h)
algCL1(get) : X = 4CCD, Y = 4CCD
X =
  30.0008
Y =
  30.0008
>>

Page top


05 Image acquisition

>>[ww, hh] = dmccdgetsize(handles.hDef);
>>[IV] = dmacquire(hg, 3, 0.25, 2, 2, 0, 0, hh, ww);
>>imshow(mat2gray(IV));
>>

Page top


06 Disconnect into TEM

>>exitJEM(h)

Page top


07 Disconnect into CCD camera(chapter of Gatan camera)

>>exitDM(hg)

Page top


08 The stage is moved

% Connection to TEM
h = startJEM( );
% The position of the stage is acquired.
[X, Y, Z] = stagepos(h);
% The position of the stage is set (relative value).
stagepos(h, 1000, 1000, 1000, 'rel');
% It waits a little until moving. 
pause(2);
% Whether the set value is reflected is confirmed.
[X, Y, Z] = stagepos(h);
% Cutting into TEM
exitJEM(h);

Page top


09 Image shift operation

% Connection to TEM
h=startJEM( );
% Initial value
r=1;
% Image shift getting.
[x, y] = defIS1(h);
% The value is displayed.
disp(['x = ', num2str(x), ', y = ', num2str(y)]);
% Loop.
for i = 1:36
  % Variable setting
  xx = r * cosd( 10 * i );
  yy = r * sind( 10 * i );
  % The value is displayed.
  disp(['xx = ', num2str(xx), ', yy = ', num2str(yy)]);
  % Image shift setting
  defIS1(h, x+xx, y+yy);
  % The value is displayed.
  disp(['u1 = ', num2str(u1)]);
  % It stops during 0.5 seconds, and it keeps executing it afterwards.
  pause(0.5);
end
% Cutting into TEM
exitJEM(h);

Page top


10 The image is acquired

付属の CCD カメラから画像データを取得する例です。( Gatan 社製 CCD カメラの場合)

On Start

% GatanDM and communication beginning
handles.hDef = actxserver('Mat2GatanDMJSTSvr.Mat2GatanDMJSTCtl');
CreateGatanDM(handles.hDef);
% It stops during 1.0 seconds, and it keeps executing it afterwards.
pause(1);
% Initial value acquisition
[handles.WW, handles.HH] = dmccdgetsize(handles.hDef);
% An initial value is registered
guidata(hObject, handles);

[Acquire] button click

% Processing
pro = get(handles.popupmenu1,'Value');
% Exposure
exp = str2num(get(handles.edit1,'String'));
% Binning
binx_val = get(handles.popupmenu2,'Value');
switch binx_val
  case 1
    binx = 1;
  case 2
    binx = 2;
  case 3
    binx = 4;
end
biny_val = get(handles.popupmenu3,'Value');
switch biny_val
  case 1
    biny = 1;
  case 2
    biny = 2;
  case 3
    biny = 4;
end
% Area
at = 0;
al = 0;
ab = handles.HH;
ar = handles.WW;
handles.data = dmacquire( handles.hDef, pro, exp, binx, biny, at, al, ab, ar );
handles.data = mat2gray( handles.data );
axes( handles.axes1 ); % Select the proper axes
imshow( handles.data );
guidata( hObject, handles );

[Close] button click

delete( handles.hDef );
close();

Page top


11 A live image is acquired

CCD カメラからの動画イメージを取得する例です。(ライブ表示)
( Gatan 社製 CCD カメラの場合)


On Start

% GatanDM and communication beginning
handles.hDef = actxserver( 'Mat2GatanDMJSTSvr.Mat2GatanDMJSTCtl' );
CreateGatanDM( handles.hDef );
% It stops during 1.0 seconds, and it keeps executing it afterwards.
pause(1);
% Initial value acquisition
[handles.WW, handles.HH] = dmccdgetsize( handles.hDef );
% An initial value is registered.
guidata(hObject, handles);

[Start] button click

set( handles.pushbutton1, 'userdata', 'off' )
while 1
  % 'Userdata' property is acquired
  str = get( handles.pushbutton1, 'userdata' );
  if strcmp( str, 'on' )  % Comparison of character strings
    break
  end

  % Processing
  pro = get( handles.pro_popm, 'Value' );
  % Exposure
  exp = str2num( get( handles.exp_edit, 'String' ) );
  % Binning
  binx_val = get( handles.binx_popm, 'Value' );
  switch binx_val
    case 1
      binx = 1;
    case 2
      binx = 2;
    case 3
      binx = 4;
  end
  biny_val = get( handles.biny_popm, 'Value' );
  switch biny_val
    case 1
      biny = 1;
    case 2
      biny = 2;
    case 3
      biny = 4;
  end
  % Area
  at = 0;
  al = 0;
  ab = handles.HH;
  ar = handles.WW;
  handles.data = dmacquire( handles.hDef, pro, exp, binx, biny, at, al, ab, ar );
  handles.data = mat2gray( handles.data );
  axes( handles.axes1 );  % Select the proper axes
  imshow( handles.data );
end
guidata( hObject, handles );

[Stop] button click

% Character string 'On' is set to 'Userdata' property.
set( handles.pushbutton1, 'userdata', 'on' )

[Close] button click

delete( handles.hDef );
close();

Page top


12 The image is preserved

CCD カメラから取得した画像データを画像フォーマットファイルに保存する例です。(JPEG、TIFF)


On Start

% GatanDM and communication beginning
handles.hDef = actxserver( 'Mat2GatanDMJSTSvr.Mat2GatanDMJSTCtl' );
CreateGatanDM( handles.hDef );
% It stops during 1.0 seconds, and it keeps executing it afterwards.
pause(1);
% Initial value acquisition
[ handles.WW, handles.HH ] = dmccdgetsize( handles.hDef );
% An initial value is registered.
guidata( hObject, handles );

[Acquire] button click

% Processing
pro = get( handles.popupmenu1, 'Value' );
% Exposure
exp = str2num( get( handles.edit1,'String' ) );
% Binning
binx_val = get( handles.popupmenu2, 'Value' );
switch binx_val
  case 1
    binx = 1;
  case 2
    binx = 2;
  case 3
    binx = 4;
end
biny_val = get( handles.popupmenu3, 'Value' );
switch biny_val
  case 1
    biny = 1;
  case 2
    biny = 2;
  case 3
    biny = 4;
end
% Area
at = 0;
al = 0;
ab = handles.HH;
ar = handles.WW;
handles.data = dmacquire( handles.hDef, pro, exp, binx, biny, at, al, ab, ar );
handles.data = mat2gray( handles.data );
axes( handles.axes1 );  % Select the proper axes
imshow( handles.data );
guidata( hObject, handles );

[Save JPEG] button click

imwrite( handles.data, get( handles.edit4, 'String' ), 'JPEG' );

[Save TIFF] button click

imwrite( handles.data, get( handles.edit5, 'String'), 'TIFF' );

[Close] button click

delete( handles.hDef );
close();
プリンタ用画面
カテゴリートップ
技術紹介
Pickup photo
HAADF(3D)
ご案内
言語選択

SSL Globalsign Site Seal

Copyright (C) SYSTEM IN FRONTIER INC. All Rights Reserved.