

    %% no diary written %% 
    %% no change to display %% 

   
           % begin "matcfgstr" string, created by run_lastensq.py
           instclass = os;
           instname  = 'os75';
           pingtype  = 'nb';
           yearbase  = 2008;
           cfg =get_uhdascfg('cfgbase'  , 'oc447',...
                             'cfgpath'  , '/home/data/oc447/proc/os75nb/config',...
                             'instclass', instclass,...
                             'instname' , instname,...
                             'pingtype' , pingtype);
           gbindirbase = cfg.gbindirbase;
           allparams = cfg.allparams;
            

   

   % sets heading correction instrument to use (from config if possible)
   if ~isfield(cfg, 'hcorr_inst'),
       cfg.hcorr_inst = ''; % 'gyro', 'ashtech', 'seapath', 'posmv'
   end
   ping_headcorr = 0;  % for batch processing

   %====> quick_adcp.py overrriding:
 hcorr_inst = 'ashtech';
   %====> quick_adcp.py overrriding:
 ping_headcorr = 1;
   %====> quick_adcp.py overrriding:
 num_persistence = 24;


   params = get_params(allparams, instname, pingtype);

   params.showverbose = 0;
   params.pingedit = 'all';
   params.yearbase = yearbase;


   % params comes from ../config/cruiseid_proc.m
   % this matlab file is written by python: override some things here
   params.interval = 300;


   % can override single ping editing either manually ...
   % see get_pedefaults
   % ... or in an m-file
   if exist('override_editcfg.m','file')
           override_editcfg
   else
       fprintf('Using pingedit defaults (no editcfg override file: override_editcfg)\n')
   end


   % This list MUST start at the beginning if the list of all
   % possible files.  DO NOT delete any files from the raw
   % directory after processing (averaging) has begun or it will
   % throw off total ensemble count used by write_ensblk.m


   % all files:
   files = {'/home/data/oc447/raw/os75/oc2008_147_55352.raw',...
'/home/data/oc447/raw/os75/oc2008_147_57600.raw',...
'/home/data/oc447/raw/os75/oc2008_147_64800.raw',...
'/home/data/oc447/raw/os75/oc2008_147_72000.raw',...
'/home/data/oc447/raw/os75/oc2008_147_79200.raw',...
'/home/data/oc447/raw/os75/oc2008_148_00000.raw',...
'/home/data/oc447/raw/os75/oc2008_148_07200.raw',...
'/home/data/oc447/raw/os75/oc2008_148_14400.raw',...
'/home/data/oc447/raw/os75/oc2008_148_21600.raw',...
'/home/data/oc447/raw/os75/oc2008_148_28800.raw',...
'/home/data/oc447/raw/os75/oc2008_148_36000.raw',...
'/home/data/oc447/raw/os75/oc2008_148_43200.raw',...
'/home/data/oc447/raw/os75/oc2008_148_50400.raw',...
'/home/data/oc447/raw/os75/oc2008_148_57600.raw',...
'/home/data/oc447/raw/os75/oc2008_148_64800.raw',...
'/home/data/oc447/raw/os75/oc2008_148_72000.raw',...
'/home/data/oc447/raw/os75/oc2008_148_79200.raw',...
'/home/data/oc447/raw/os75/oc2008_149_00000.raw',...
'/home/data/oc447/raw/os75/oc2008_149_07200.raw',...
'/home/data/oc447/raw/os75/oc2008_149_14400.raw',...
'/home/data/oc447/raw/os75/oc2008_149_21600.raw',...
'/home/data/oc447/raw/os75/oc2008_149_28800.raw',...
'/home/data/oc447/raw/os75/oc2008_149_36000.raw',...
'/home/data/oc447/raw/os75/oc2008_149_43200.raw',...
'/home/data/oc447/raw/os75/oc2008_149_50400.raw',...
'/home/data/oc447/raw/os75/oc2008_149_57600.raw',...
'/home/data/oc447/raw/os75/oc2008_149_64800.raw',...
'/home/data/oc447/raw/os75/oc2008_149_72000.raw',...
'/home/data/oc447/raw/os75/oc2008_149_79200.raw',...
'/home/data/oc447/raw/os75/oc2008_150_00000.raw',...
'/home/data/oc447/raw/os75/oc2008_150_07200.raw',...
'/home/data/oc447/raw/os75/oc2008_150_14400.raw',...
'/home/data/oc447/raw/os75/oc2008_150_21600.raw',...
'/home/data/oc447/raw/os75/oc2008_150_28800.raw',...
'/home/data/oc447/raw/os75/oc2008_150_36000.raw',...
'/home/data/oc447/raw/os75/oc2008_150_43200.raw',...
'/home/data/oc447/raw/os75/oc2008_150_50400.raw',...
'/home/data/oc447/raw/os75/oc2008_150_57600.raw',...
'/home/data/oc447/raw/os75/oc2008_150_64800.raw',...
'/home/data/oc447/raw/os75/oc2008_150_72000.raw',...
'/home/data/oc447/raw/os75/oc2008_150_79200.raw',...
'/home/data/oc447/raw/os75/oc2008_151_00000.raw',...
'/home/data/oc447/raw/os75/oc2008_151_07200.raw',...
'/home/data/oc447/raw/os75/oc2008_151_14400.raw',...
'/home/data/oc447/raw/os75/oc2008_151_21600.raw',...
'/home/data/oc447/raw/os75/oc2008_151_28800.raw',...
'/home/data/oc447/raw/os75/oc2008_151_36000.raw',...
'/home/data/oc447/raw/os75/oc2008_151_43200.raw',...
'/home/data/oc447/raw/os75/oc2008_151_50400.raw',...
'/home/data/oc447/raw/os75/oc2008_151_57600.raw',...
'/home/data/oc447/raw/os75/oc2008_151_64800.raw',...
'/home/data/oc447/raw/os75/oc2008_151_72000.raw',...
'/home/data/oc447/raw/os75/oc2008_151_79200.raw',...
'/home/data/oc447/raw/os75/oc2008_152_00000.raw',...
'/home/data/oc447/raw/os75/oc2008_152_07200.raw',...
'/home/data/oc447/raw/os75/oc2008_152_14400.raw',...
'/home/data/oc447/raw/os75/oc2008_152_21600.raw',...
'/home/data/oc447/raw/os75/oc2008_152_28800.raw',...
'/home/data/oc447/raw/os75/oc2008_152_36000.raw',...
'/home/data/oc447/raw/os75/oc2008_152_43200.raw',...
'/home/data/oc447/raw/os75/oc2008_152_50400.raw',...
'/home/data/oc447/raw/os75/oc2008_152_57600.raw',...
'/home/data/oc447/raw/os75/oc2008_152_64800.raw',...
'/home/data/oc447/raw/os75/oc2008_152_72000.raw',...
'/home/data/oc447/raw/os75/oc2008_152_79200.raw',...
'/home/data/oc447/raw/os75/oc2008_153_00000.raw',...
'/home/data/oc447/raw/os75/oc2008_153_07200.raw',...
'/home/data/oc447/raw/os75/oc2008_153_14400.raw',...
'/home/data/oc447/raw/os75/oc2008_153_21600.raw',...
'/home/data/oc447/raw/os75/oc2008_153_28800.raw',...
'/home/data/oc447/raw/os75/oc2008_153_36000.raw',...
'/home/data/oc447/raw/os75/oc2008_153_43200.raw',...
'/home/data/oc447/raw/os75/oc2008_153_50400.raw',...
'/home/data/oc447/raw/os75/oc2008_153_57600.raw',...
'/home/data/oc447/raw/os75/oc2008_153_64800.raw',...
'/home/data/oc447/raw/os75/oc2008_153_72000.raw',...
'/home/data/oc447/raw/os75/oc2008_153_79200.raw',...
'/home/data/oc447/raw/os75/oc2008_154_00000.raw',...
'/home/data/oc447/raw/os75/oc2008_154_07200.raw',...
'/home/data/oc447/raw/os75/oc2008_154_14400.raw',...
'/home/data/oc447/raw/os75/oc2008_154_21600.raw',...
'/home/data/oc447/raw/os75/oc2008_154_28800.raw',...
'/home/data/oc447/raw/os75/oc2008_154_36000.raw',...
'/home/data/oc447/raw/os75/oc2008_154_43200.raw',...
'/home/data/oc447/raw/os75/oc2008_154_50400.raw',...
'/home/data/oc447/raw/os75/oc2008_154_57600.raw',...
'/home/data/oc447/raw/os75/oc2008_154_64800.raw',...
'/home/data/oc447/raw/os75/oc2008_154_72000.raw',...
'/home/data/oc447/raw/os75/oc2008_154_79200.raw',...
'/home/data/oc447/raw/os75/oc2008_155_00000.raw',...
'/home/data/oc447/raw/os75/oc2008_155_07200.raw',...
'/home/data/oc447/raw/os75/oc2008_155_14400.raw',...
'/home/data/oc447/raw/os75/oc2008_155_21600.raw',...
'/home/data/oc447/raw/os75/oc2008_155_28800.raw'};


   % this should start with the most recent profile (from ens_blk*.log)
   % and start there. no need to fiddle with filelists.
   % It is automatically in incremental mode.

   write_ensblk(instclass, files, params,...
       'gbindir', fullfile(gbindirbase, instname),...
       'save_lastens', 1,...
             'hcorr_inst', hcorr_inst, ...
             'ping_headcorr', ping_headcorr, ...
             'num_persistence', num_persistence, ...
       'pingtype', pingtype,  'max_BLKprofiles', 144,  ...
       'save_editcfg', 0,...
       'verbose', 0);

