function fig = summ_inp()
% This is the machine-generated representation of a Handle Graphics object
% and its children.  Note that handle values may change when these objects
% are re-created. This may cause problems with any callbacks written to
% depend on the value of the handle at the time the object was saved.
% This problem is solved by saving the output as a FIG-file.
%
% To reopen this object, just type the name of the M-file at the MATLAB
% prompt. The M-file and its associated MAT-file must be on your path.
% 
% NOTE: certain newer features in MATLAB may not have been saved in this
% M-file due to limitations of this format, which has been superseded by
% FIG-files.  Figures which have been annotated using the plot editor tools
% are incompatible with the M-file/MAT-file format, and should be saved as
% FIG-files.

arch=computer;
  if (strcmp(arch,'PCWIN') | strcmp(arch,'MAC2'))
     win_dim=[155 125 413 320];
  else
     if (isunix)
        win_dim=[420 200 413 320];
     else
        win_dim=[155 125 413 320];
     end
  end

h0 = figure('Units','points', ...
	'Color',[0.5 0.7 0.7], ...
	'Colormap','default',...
	'FileName','summ_inp.m', ...
	'Name','disp_summary input', ...
	'NumberTitle','off', ...
	'PaperPosition',[18 180 576 432], ...
	'PaperUnits','points', ...
	'Position',win_dim, ...
	'Tag','setupWindow', ...
	'ToolBar','none');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.5 0.7 0.7], ...
	'ListboxTop',0, ...
	'Position',[0 0 412 340], ...
	'Style','frame', ...
	'Tag','bgFrame');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.5014999999999999 0.702 0.702], ...
	'ListboxTop',0, ...
	'Position',[11.2 296 380.8 17.6], ...
	'String','Enter MP summary set-up parameters', ...
	'Style','text', ...
	'Tag','hdrText');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.3 0.6 0.7], ...
	'ListboxTop',0, ...
	'Position',[10.4 247.2 386.4 43.2], ...
	'Style','frame', ...
	'Tag','inFrame');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.3 0.6 0.7], ...
	'ListboxTop',0, ...
	'Position',[12.8 252.8 124 29.6], ...
	'String','Enter INPUT file directory (use full path)', ...
	'Style','text', ...
	'Tag','inText');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[140.8 260 244 22], ...
	'Style','edit', ...
	'Tag','inEd');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.3 0.6 0.7], ...
	'ListboxTop',0, ...
	'Position',[9.600000000000001 192.8 386.4 43.2], ...
	'Style','frame', ...
	'Tag','outFrame');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.3 0.6 0.7], ...
	'ListboxTop',0, ...
	'Position',[12.8 201.6 131.2 27.2], ...
	'String','Enter OUTPUT file directory (use full path)', ...
	'Style','text', ...
	'Tag','outText');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[145.6 204 244 22], ...
	'Style','edit', ...
	'Tag','outEd');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.3 0.6 0.7], ...
	'ListboxTop',0, ...
	'Position',[9.6 136.8 200 45.6], ...
	'Style','frame', ...
	'Tag','nmFrame');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.3 0.6 0.7], ...
	'ListboxTop',0, ...
	'Position',[13 139 75 33], ...
	'String','Enter summary file name', ...
	'Style','text', ...
	'Tag','nmText');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[90 150 110 22], ...
	'Style','edit', ...
	'Tag','nmEd');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.3 0.6 0.7], ...
	'ListboxTop',0, ...
	'Position',[220 136.8 177 45.6], ...
	'Style','frame', ...
	'Tag','drngFrame');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.3 0.6 0.7], ...
	'ListboxTop',0, ...
	'Position',[222 139 81 39], ...
	'String','Enter dive range  to process      (ie [3 10])', ...
	'Style','text', ...
	'Tag','drngText');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'ListboxTop',0, ...
	'Position',[306 150 80 22], ...
	'Style','edit', ...
	'Tag','drngEd');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.3 0.6 0.7], ...
	'ListboxTop',0, ...
	'Position',[59.2 81.6 280.8 45.6], ...
	'Style','frame', ...
	'Tag','prngFrame');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.3 0.6 0.7], ...
	'ListboxTop',0, ...
	'Position',[67.2 84 126.4 38.4], ...
	'String','Enter pressure interval to use to estimate profiling speed (ie [pmin pmax])', ...
	'Style','text', ...
	'Tag','prngText');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'ListboxTop',0, ...
	'Position',[202.4 92 117.6 22], ...
	'Style','edit', ...
	'Tag','prngEd');

h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.1 0.85 0.2], ...
	'Callback','disp_summary; close;', ...
	'FontSize',12, ...
	'ListboxTop',0, ...
	'Position',[30 20 108 29.6], ...
	'String','make summary', ...
	'Tag','SetupPush');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.1 0.15], ...
	'Callback','close;', ...
	'FontSize',12, ...
	'ListboxTop',0, ...
	'Position',[150 20 80 29.6], ...
	'String','QUIT', ...
	'Tag','quitPush');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.9 0.7 0.15], ...
	'Callback','save_params(''sm_params'');', ...
	'FontSize',12, ...
	'ListboxTop',0, ...
	'Position',[250 20 150 30], ...
	'String','Save current settings', ...
	'Tag','savePush');

% now add in the default values
 if exist('sm_params.mat','file')
    load sm_params;
    t=findobj(gcf,'Style','Edit');
      for ik=1:length(t)                      
       set(t(ik),'String',cellstr(params{ik}))
      end
 else
     load def_params;
% when using the default use 1,2 & 5th values (works from bottom up!)
     t=findobj(gcf,'Style','Edit');
      set(t(5),'String',cellstr(params{length(pl)}))
      set(t(4),'String',cellstr(params{length(pl)}))
      set(t(3),'String','FileName')
      set(t(2),'String',cellstr(params{length(pl)-4}))
      set(t(1),'String','[500 1000]')
 end
   set(t,'fontsize',14)
%

if nargout > 0, fig = h0; end
