%run_areflsm.m
% calls areflsm.m
% optional - 
%      just combines the stuff from the database as follows (for easier access)
% reads smoothr, adcpsect, and  refabs  output (as for reference layer plots),
% combines what we want, and writes to "auto_refsm.mat" in the current
% directory (presumably cruiseid/edit)

%run asetup.m; use those parameters; set more:
asetup

%setting the path for the executable files ref2mat and sm2mat
%should be left with something like "/home/noio/programs/"
test_file = 'aeditpath';
base_path = which(test_file);            %find path to dir_edit_base
bl = length(base_path);                  %length of total path
base_path((bl-(length(test_file)+1)):bl) = [];  %strip the file off
bl = length(base_path);                  %length of total path
base_path((bl-(length('matlab'))):bl) = [];  %strip the 'matlab' directory off


if (sum(ismember('lnx', (lower(computer)))) == length('lnx'))
   binpath = [base_path 'codas3/bin/lnx'];
elseif (sum(ismember('sol', (lower(computer)))) == length('sol'))
   binpath = [base_path 'codas3/bin/sol'];
else
   error('run_areflsm is only set up for solaris and lnx at the moment')
end

   
   

%%%% end of section for user to edit %%%
max_gap_ratio = 0.05;      
min_speed     = 1.0;      
max_speed     = 5.0;

%run it
areflsm