

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

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

   

   % sets heading correction instrumetn 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 = 'gyro';
   %====> quick_adcp.py overrriding:
   ping_headcorr = 1;


   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/at15_26/raw/os75/at2007_317_75086.raw',...
'/home/data/at15_26/raw/os75/at2007_317_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_318_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_318_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_318_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_318_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_318_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_318_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_318_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_318_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_318_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_318_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_318_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_318_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_319_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_319_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_319_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_319_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_319_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_319_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_319_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_319_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_319_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_319_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_319_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_319_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_320_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_320_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_320_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_320_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_320_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_320_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_320_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_320_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_320_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_320_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_320_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_320_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_321_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_321_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_321_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_321_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_321_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_321_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_321_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_321_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_321_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_321_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_321_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_321_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_322_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_322_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_322_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_322_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_322_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_322_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_322_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_322_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_322_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_322_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_322_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_322_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_323_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_323_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_323_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_323_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_323_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_323_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_323_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_323_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_323_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_323_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_323_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_323_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_324_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_324_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_324_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_324_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_324_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_324_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_324_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_324_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_324_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_324_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_324_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_324_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_325_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_325_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_325_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_325_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_325_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_325_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_325_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_325_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_325_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_325_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_325_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_325_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_326_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_326_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_326_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_326_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_326_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_326_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_326_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_326_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_326_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_326_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_326_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_326_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_327_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_327_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_327_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_327_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_327_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_327_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_327_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_327_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_327_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_327_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_327_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_327_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_328_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_328_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_328_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_328_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_328_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_328_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_328_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_328_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_328_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_328_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_328_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_328_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_329_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_329_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_329_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_329_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_329_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_329_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_329_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_329_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_329_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_329_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_329_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_329_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_330_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_330_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_330_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_330_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_330_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_330_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_330_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_330_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_330_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_330_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_330_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_330_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_331_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_331_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_331_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_331_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_331_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_331_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_331_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_331_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_331_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_331_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_331_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_331_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_332_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_332_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_332_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_332_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_332_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_332_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_332_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_332_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_332_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_332_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_332_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_332_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_333_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_333_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_333_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_333_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_333_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_333_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_333_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_333_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_333_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_333_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_333_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_333_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_334_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_334_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_334_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_334_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_334_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_334_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_334_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_334_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_334_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_334_64800.raw',...
'/home/data/at15_26/raw/os75/at2007_334_72000.raw',...
'/home/data/at15_26/raw/os75/at2007_334_79200.raw',...
'/home/data/at15_26/raw/os75/at2007_335_00000.raw',...
'/home/data/at15_26/raw/os75/at2007_335_07200.raw',...
'/home/data/at15_26/raw/os75/at2007_335_14400.raw',...
'/home/data/at15_26/raw/os75/at2007_335_21600.raw',...
'/home/data/at15_26/raw/os75/at2007_335_28800.raw',...
'/home/data/at15_26/raw/os75/at2007_335_36000.raw',...
'/home/data/at15_26/raw/os75/at2007_335_43200.raw',...
'/home/data/at15_26/raw/os75/at2007_335_50400.raw',...
'/home/data/at15_26/raw/os75/at2007_335_57600.raw',...
'/home/data/at15_26/raw/os75/at2007_335_64800.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,...
       'pingtype', pingtype,  'max_BLKprofiles', 144,  ...
       'save_editcfg', 0,...
       'verbose', 0);

