%
%  Name: cpxtool.m
% 
%  Usage: cpxtool
% 
%  Description:
%     Set up Complex to real conversion figure
%

%  Version SWD970402
%
%  Author(s): Scott W. Doebling, doebling@lanl.gov
%
%  Institution: Los Alamos National Laboratory,
%		ESA-EA
%
%  Copyright (c) 1997, The Regents of the University
%     	of California. (See top level of code for
%        full copyright statement)
%


hcx2rl(1) = figure('visible','off',...
		'units','normal',...
		'position',[0.25 0.3 0.5 0.35],...
		'numbertitle','off',...
		'name','DIAMOND: Complex to Real Conversion');

%  Display text

    uicontrol(hcx2rl(1),...
	'style','text',...
	'units','normal',...
	'position',[0.0 0.8 1.0 0.1],...
	'string','Please Select Real-to-Complex Conversion Method:');

%  Conversion Methods popup

hcx2rl(2) = uicontrol(hcx2rl(1),...
      'style','popup', ...
      'units','normalized', ...
      'position',[0.1 0.4 0.8 0.1], ...
      'string','Real Part|Phase Rounding',...
      'value',1,...
      'callback',['ic2rmeth = get(hcx2rl(2),''value'');',...
		  'set(hcx2rl(1),''visible'',''off''),',...
        'disp(''Creating Real Modes...''),',...
        'if exist(''phic_resp'')==1,',...
        '[phir_resp,phir_ref] = cpx2real(phic_resp,phic_ref,ic2rmeth);',...
        'end,',...
        'if exist(''phic_resp_t'')==1,',...
        '[phir_resp_t,phir_ref_t] = cpx2real(phic_resp_t,phic_ref_t,ic2rmeth);',...
        'end,',...
		  'disp(''Real Modes Created''),']);

