• 沒有找到結果。

下面將要介紹的是用來分離相位與強度的程式,在這裡我要感謝 中山資工所柯正雯老師實驗室許正昀同學的幫忙以及陽明大學生醫 光電所陳俊熿同學的指教之下,讓這個程式更趨於完備。整個程式包 含了兩個檔案與兩張 logo,一個是程式碼檔案,另一個是 GUI 介面, 下圖是程式的操作介面:

本程式是為一全圖像介面,按照指示將 X 與 Y 圖輸入,即可得到 相位與強度分布。在相位方面包含了零相位校正的功能,它主要是用 來平移整個圖像中,屬於非零點的相位,平移的有效值在 0~90 度之

圖 C-1 程式操作介面

% RF_SHOW M-file for rf_show.fig

% RF_SHOW('CALLBACK',hObject,eventData,handles,...) calls the local

% function named CALLBACK in RF_SHOW.M with the given input arguments.

%

% RF_SHOW('Property','Value',...) creates a new RF_SHOW or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before rf_show_OpeningFunction gets called. An

% unrecognized property name or invalid value makes property application

% stop. All inputs are passed to rf_show_OpeningFcn via varargin.

%

% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one

% instance to run (singleton)".

%

% See also: GUIDE, GUIDATA, GUIHANDLES

% Copyright 2002-2003 The MathWorks, Inc.

% Edit the above text to modify the response to help rf_show

% Last Modified by GUIDE v2.5 18-Apr-2007 16:32:03

% Begin initialization code - DO NOT EDIT gui_Singleton = 1;

gui_State = struct('gui_Name', mfilename, ...

if nargin && ischar(varargin{1})

end

if nargout

[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

else

gui_mainfcn(gui_State, varargin{:});

end

% End initialization code - DO NOT EDIT

% --- Executes just before rf_show is made visible.

function rf_show_OpeningFcn(hObject, eventdata, handles, varargin)

% This function has no output args, see OutputFcn.

% hObject handle to figure

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% varargin command line arguments to rf_show (see VARARGIN)

% Choose default command line output for rf_show handles.output = hObject;

axes(handles.axe_X);

% Update handles structure guidata(hObject, handles);

initialize_gui(hObject, handles);

% UIWAIT makes rf_show wait for user response (see UIRESUME)

% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.

function varargout = rf_show_OutputFcn(hObject, eventdata, handles)

% varargout cell array for returning output args (see VARARGOUT);

% hObject handle to figure

% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure varargout{1} = handles.output;

% --- Executes on button press in loadfile_x.

function loadfile_x_Callback(hObject, eventdata, handles)

% hObject handle to loadfile_x (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) [fname,fpath]=uigetfile({'*.bmp','bmp(*.bmp)';'*.tif','tif(*.tif)'});

if strcmp(int2str(fname),'0') | strcmp(int2str(fpath),'0') return; end filepath=strcat(fpath,fname);

if strcmp(filepath,handles.data.filename1)

errordlg('This file has already been opened!!');

return end

if handles.data.nfile==2 handles.data.nfile=1;

else

handles.data.nfile=handles.data.nfile+1;

end

function initialize_gui(fig_handle, handles)

if isfield(handles, 'data') return;

end

map_hsv = ones(30,3);

map_hsv(2:30,1) = [0.6667:-0.6667/28:0]';

map_rgb = hsv2rgb(map_hsv);

handles.data.map_hsv=map_hsv;

handles.data.map_rgb=map_rgb;

handles.data.filename1='No file';

handles.data.filename2='No file';

handles.data.coloreditflg=0;

guidata(handles.figure1, handles);

% --- Executes on button press in loadfile_y.

function loadfile_y_Callback(hObject, eventdata, handles) [fname,fpath]=uigetfile({'*.bmp','bmp(*.bmp)';'*.tif','tif(*.tif)'});

if strcmp(int2str(fname),'0') | strcmp(int2str(fpath),'0') return; end filepath=strcat(fpath,fname);

if strcmp(filepath,handles.data.filename2)

errordlg('This file has already been opened!!');

return end

if handles.data.nfile==2 handles.data.nfile=1;

else

handles.data.nfile=handles.data.nfile+1;

end

set(handles.xpath,'string',handles.data.filename1);

guidata(hObject,handles);

set(handles.ypath,'string',handles.data.filename2);

check_data_full(hObject,handles,0);

% hObject handle to loadfile_y (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% --- Executes on button press in phase.

function phase_Callback(hObject, eventdata, handles)

% hObject handle to phase (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) handles.data.lee = str2double(get(handles.input,'string'));

guidata(hObject,handles);

if strcmp(check_data_full(hObject,handles,1),'lose files') return

end

figure;

colormap(handles.data.map_rgb);

imagesc(handles.data.phase./pi.*180,[0 90]);axis square;

set(gca,'xtick',[0:20:220]);

set(gca,'xticklabel',{'0','20','40','60','80','100','120','140','160','180','200','220'});

g=colorbar;

set(g,'ytick',[0:30:90]);

set(g,'yticklabel',{'0','30','60','90'});

if handles.data.coloreditflg colormapeditor;

end

%guidata(hObject,handles);

% --- Executes on button press in coloredit.

function coloredit_Callback(hObject, eventdata, handles)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of coloredit handles.data.coloreditflg=get(hObject,'Value');

guidata(hObject,handles);

% --- Executes on button press in Intensity.

function intensity_Callback(hObject, eventdata, handles)

% hObject handle to Intensity (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) if strcmp(check_data_full(hObject,handles,1),'lose files')

return

imagesc(handles.data.intensity,[0 400]),axis square;

set(gca,'xtick',[0:20:220]);

function varargout = check_data_full(h,handles,exe)

if handles.data.nfile<2 if exe

handles.data.dX = double(handles.data.dX);

handles.data.dY = double(handles.data.dY);

handles.data.dY(find(handles.data.dY<15)) = 0;

handles.data.mask = handles.data.dY & handles.data.dX;

handles.data.phase = zeros(size(handles.data.dX));

handles.data.phase(find(handles.data.mask)) =

atan(handles.data.dY(find(handles.data.mask))./handles.data.dX(find(handl es.data.mask)));

handles.data.phase(find(handles.data.mask)) =

handles.data.phase(find(handles.data.mask))-(handles.data.lee./180.*pi);

handles.data.intensity=zeros(size(handles.data.dX));

handles.data.intensity=(handles.data.dX.^2+handles.data.dY.^2).^0.5;

varargout(1)={'success'};

guidata(h,handles);

end

% --- Executes on button press in pi_style1.

function pi_style1_Callback(hObject, eventdata, handles)

% hObject handle to pi_style1 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) if strcmp(check_data_full(hObject,handles,1),'lose files')

return

% --- Executes on button press in pushbutton6.

function pushbutton6_Callback(hObject, eventdata, handles)

% hObject handle to pushbutton6 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

%handles.data.map_hsv =

[h,handles.data.map_hsv]=mycolorbaredit(handles.data.map_hsv);

%uiwait(s);

handles.data.map_rgb = hsv2rgb(handles.data.map_hsv);

guidata(hObject,handles);

% --- Executes on button press in loadmycolorbar.

function loadmycolorbar_Callback(hObject, eventdata, handles)

% hObject handle to loadmycolorbar (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) [fname,fpath]=uigetfile({'*.mybar'});

if strcmp(int2str(fname),'0') | strcmp(int2str(fpath),'0') return; end filepath=strcat(fpath,fname);

set(handles.bartxt,'string',fname);

fid=fopen(filepath,'r');

handles.data.map_hsv=fread(fid,[30 3],'double');

handles.data.map_rgb=hsv2rgb(handles.data.map_hsv);

guidata(hObject,handles);

function input_Callback(hObject, eventdata, handles)

% hObject handle to input (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of input as text

% str2double(get(hObject,'String')) returns contents of input as a double handles.data.lee = str2double(get(handles.input,'string'));

handles.data.phase(find(handles.data.mask)) =

atan(handles.data.dY(find(handles.data.mask))./handles.data.dX(find(handl es.data.mask)));

handles.data.phase(find(handles.data.mask))-(handles.data.lee./180.*pi);

figure;

colormap(handles.data.map_rgb);

imagesc(handles.data.phase./pi.*180,[0 90]),axis square;

set(gca,'xtick',[0:20:220]);

set(gca,'xticklabel',{'0','20','40','60','80','100','120','140','160','180','200','220'});

g=colorbar;

set(g,'ytick',[0:30:90]);

set(g,'yticklabel',{'0','30','60','90'});

if handles.data.coloreditflg colormapeditor;

end

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function input_CreateFcn(hObject, eventdata, handles)

% hObject handle to input (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc

set(hObject,'BackgroundColor','white');

else

set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));

end

參考資料

[1] H. Tews, R. Averbeck, A. Graber, H. Riechert, “Blue and green electroluminescence from MBE grown GaN/InGaN heterostructures”, IEEE, 1996

[2] I. Akasaki, H. Amano, M. Kito, K. Hiramatsu , “Photoluminescence of Mg-doped p-type GaN and electroluminescence of GaN p-n junction LED” , Journal of Luminescence, 1991

[3] 王宏嘉,“結合時間解析電激發光顯微術暨雷射切割-觀測大尺 寸 LED 電性”, 國立中山大學光電工程研究所碩士論文, 2006 [4] Chi-Kuang Sun, Kian-Giap Gan, Fu-Jen Kao, Mao-Kuo Huang, Yung-Shun Wamg. Michael P . Mack, and Steven p. Denbaars,

“Two-photon Photoluminescence and current image of bulk GaN and InGaN Green LEDs”, IEEE, 1999

[5] Reinhard stengl, “High-voltage planar Junctions investigated by the OBIC method”, IEEE, 1987

[6] Koshi Haraguchi, “Microscopic Optical Beam Induced Current Measurement and their Application, IEEE, 1994

[7] Fu-Jen Kao, Mao-Kuo Huang, Yung-Shun Wang, Sheng-Lung Huang, Ming-Kwei Lee, and Chi-Kuang Sun, “Two-photon optical-beam-induced current imaging of indium gallium nitride blue light-emitting diodes”, Optical Society of America, 1999

[8]J.M. Chin, J.C.H. Phang, D.S.H. Chan, C.E. soh, G. Gilfeather,

“Single Contact Optical Beam Induced Current- A New Failure Analysis Technique ”, IEEE, 2000

[9] Yosuke Morita, Koichi Wakita, “Response speed and optical investigation of InGaN/GaN multiple quantum well LED”, Scripta Technica, 2001

[10] Tatsuya Takeshita, Mitsuo Yamamoto, Ryuzo Iga, Mitsuru Sugo, Yasuhiro Kondo, and Kazutoshi Kato, “Analysis of Wear-Out

Degradation of a DFB Laser Using an Optical-Beam-Induced Current Monitor, IEEE, 2007

[11] 廖育麒, ’’時間解析之光致電流顯微術”, 國立中山大學光電工程 研究所碩士論文, 2005

[12] 劉泰成, ”有機光電元件之時間解析光致電流顯微術”, 國立 中山大學光電工程研究所碩士論文, 2006

[13] Epistar corporation “InGaN Venus Green LED Chip”

[14] Sung-Nam Lee, H. S. Paek, H. Kim, T. Jang, and Y. Park,

“Monolithic InGaN-based white light-emitting diodes with blue, green, and amber emissions”, Applied Physics Letter, 2008

[15] Adel S. Sedra, Kenneth C. Smith, “Microelectronic Circuits”, Fourth edition

[16] S.M. Sze, “SEMICONDUCTOR DEVICE Physics and Technology”, fourth edition, Chapter 3, 75-81

[17] Arthur Beiser, “Modern Physics”, Sixth edition, Chapter 2, 52-67 [18] Conoptics INC., “Electro-optic components and systems”

相關文件