

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

   
           % begin "matcfgstr" string, created by run_lastensq.py
           instclass = nb;
           instname  = 'nb150';
           pingtype  = 'nb';
           yearbase  = 2006;
           cfg =get_uhdascfg('cfgbase'  , 'oc425a',...
                             'cfgpath'  , '/home/data/oc425a/proc/nb150/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/oc425a/raw/nb150/oc2006_156_81763.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_28800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_36000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_43200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_50400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_57600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_64800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_72000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_157_79200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_28800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_36000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_43200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_50400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_57600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_64800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_72000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_158_79200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_28800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_36000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_43200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_50400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_57600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_64800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_72000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_159_79200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_28993.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_36000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_43200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_50400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_57600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_64800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_72000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_160_79200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_28800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_36000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_43200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_50400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_57600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_64800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_72000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_161_79200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_28800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_36000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_43200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_50400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_57600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_64800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_72000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_162_79200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_28800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_36000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_43200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_50400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_57600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_64800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_72000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_163_79200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_28800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_36000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_43200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_50400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_57600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_64800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_72000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_164_79200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_28800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_36000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_43200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_50400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_57600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_64800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_72000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_165_79200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_28800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_36000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_43200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_50400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_57600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_64800.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_72000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_166_79200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_167_00000.raw',...
'/home/data/oc425a/raw/nb150/oc2006_167_07200.raw',...
'/home/data/oc425a/raw/nb150/oc2006_167_14400.raw',...
'/home/data/oc425a/raw/nb150/oc2006_167_21600.raw',...
'/home/data/oc425a/raw/nb150/oc2006_167_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);

