

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

        
            % begin "matcfgstr" string, created by run_lastensq.py
            instclass = os;
            instname  = 'os75';
            pingtype  = 'bb';
            proc_yearbase  = 2010;
            yearbase  = 2010;
            cfg =get_uhdascfg('cfgbase'  , 'EN484',...
                              'cfgpath'  , '/home/data/EN484/proc/os75bb/config',...
                              'instclass', instclass,...
                              'instname' , instname,...
                              'pingtype' , pingtype);
            gbindirbase = cfg.gbindirbase;
            allparams = cfg.allparams;
             

        


        % heading correction instrument comes from config/cruise_cfg.m
        % NEW: override with hcorr_args, not hcorr_inst
        % (1) if there isn't one bomb out.
           if ~isfield(cfg, 'hcorr_args'),
               error('load_uhblk_tmp.m: no heading correction setting: check config/cruise_cfg.m -- version mismatch??')
           end

        % (3)  override from quick_adcp.py if desired
        %      eg. hcorr_args = {'posmv', 'pmv', 'acc_heading_cutoff', .018};
           cfg.hcorr_inst = 'ashpaq2';              % this should be obsolete, but here for constistency
        % this is what is used. see get_rbinheading.m :
           %% cfg.hcorr_args : defaulting to values from get_uhdascfg, above

        % matlab does not know about post_headcorr at this point; only
        % "ping_headcorr = 0" or "ping_headcorr = 1"
        % matlab initializing ping_headcorr = 0
        ping_headcorr = 0;

        % quick_adcp.py overrides follow:
        %====> 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.proc_yearbase = proc_yearbase;
        params.yearbase = yearbase;


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

        %%====> quick_adcp.py overrriding:
 params.bottom = 'xy2z';

        % 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/EN484/raw/os75/en2010_262_67709.raw',...
'/home/data/EN484/raw/os75/en2010_262_67845.raw',...
'/home/data/EN484/raw/os75/en2010_262_68212.raw',...
'/home/data/EN484/raw/os75/en2010_262_72000.raw',...
'/home/data/EN484/raw/os75/en2010_262_79200.raw',...
'/home/data/EN484/raw/os75/en2010_263_00000.raw',...
'/home/data/EN484/raw/os75/en2010_263_07200.raw',...
'/home/data/EN484/raw/os75/en2010_263_14400.raw',...
'/home/data/EN484/raw/os75/en2010_263_21600.raw',...
'/home/data/EN484/raw/os75/en2010_263_28800.raw',...
'/home/data/EN484/raw/os75/en2010_263_36000.raw',...
'/home/data/EN484/raw/os75/en2010_263_43200.raw',...
'/home/data/EN484/raw/os75/en2010_263_50400.raw',...
'/home/data/EN484/raw/os75/en2010_263_83504.raw',...
'/home/data/EN484/raw/os75/en2010_264_00000.raw',...
'/home/data/EN484/raw/os75/en2010_264_58260.raw',...
'/home/data/EN484/raw/os75/en2010_264_58468.raw',...
'/home/data/EN484/raw/os75/en2010_264_58547.raw',...
'/home/data/EN484/raw/os75/en2010_264_58955.raw',...
'/home/data/EN484/raw/os75/en2010_264_73961.raw',...
'/home/data/EN484/raw/os75/en2010_264_79200.raw',...
'/home/data/EN484/raw/os75/en2010_265_00000.raw',...
'/home/data/EN484/raw/os75/en2010_265_05335.raw',...
'/home/data/EN484/raw/os75/en2010_265_14400.raw',...
'/home/data/EN484/raw/os75/en2010_265_36000.raw',...
'/home/data/EN484/raw/os75/en2010_265_39590.raw',...
'/home/data/EN484/raw/os75/en2010_265_43200.raw',...
'/home/data/EN484/raw/os75/en2010_265_50400.raw',...
'/home/data/EN484/raw/os75/en2010_265_57600.raw',...
'/home/data/EN484/raw/os75/en2010_265_64800.raw',...
'/home/data/EN484/raw/os75/en2010_265_72000.raw',...
'/home/data/EN484/raw/os75/en2010_265_79200.raw',...
'/home/data/EN484/raw/os75/en2010_266_00000.raw',...
'/home/data/EN484/raw/os75/en2010_266_07200.raw',...
'/home/data/EN484/raw/os75/en2010_266_14400.raw',...
'/home/data/EN484/raw/os75/en2010_266_21600.raw',...
'/home/data/EN484/raw/os75/en2010_266_28800.raw',...
'/home/data/EN484/raw/os75/en2010_266_36000.raw',...
'/home/data/EN484/raw/os75/en2010_266_43200.raw',...
'/home/data/EN484/raw/os75/en2010_266_50400.raw',...
'/home/data/EN484/raw/os75/en2010_266_57600.raw',...
'/home/data/EN484/raw/os75/en2010_266_64800.raw',...
'/home/data/EN484/raw/os75/en2010_266_72000.raw',...
'/home/data/EN484/raw/os75/en2010_266_74459.raw',...
'/home/data/EN484/raw/os75/en2010_266_77995.raw',...
'/home/data/EN484/raw/os75/en2010_266_82272.raw',...
'/home/data/EN484/raw/os75/en2010_266_82492.raw',...
'/home/data/EN484/raw/os75/en2010_266_82734.raw',...
'/home/data/EN484/raw/os75/en2010_266_82807.raw',...
'/home/data/EN484/raw/os75/en2010_267_04979.raw',...
'/home/data/EN484/raw/os75/en2010_267_07200.raw',...
'/home/data/EN484/raw/os75/en2010_267_14400.raw',...
'/home/data/EN484/raw/os75/en2010_267_21600.raw',...
'/home/data/EN484/raw/os75/en2010_267_28800.raw',...
'/home/data/EN484/raw/os75/en2010_267_36000.raw',...
'/home/data/EN484/raw/os75/en2010_267_43200.raw',...
'/home/data/EN484/raw/os75/en2010_267_50400.raw',...
'/home/data/EN484/raw/os75/en2010_267_57600.raw',...
'/home/data/EN484/raw/os75/en2010_267_62766.raw',...
'/home/data/EN484/raw/os75/en2010_267_66184.raw',...
'/home/data/EN484/raw/os75/en2010_267_72000.raw',...
'/home/data/EN484/raw/os75/en2010_267_79200.raw',...
'/home/data/EN484/raw/os75/en2010_268_00000.raw',...
'/home/data/EN484/raw/os75/en2010_268_07200.raw',...
'/home/data/EN484/raw/os75/en2010_268_14400.raw',...
'/home/data/EN484/raw/os75/en2010_268_21600.raw',...
'/home/data/EN484/raw/os75/en2010_268_28800.raw',...
'/home/data/EN484/raw/os75/en2010_268_36000.raw',...
'/home/data/EN484/raw/os75/en2010_268_43200.raw',...
'/home/data/EN484/raw/os75/en2010_268_50400.raw',...
'/home/data/EN484/raw/os75/en2010_268_57600.raw',...
'/home/data/EN484/raw/os75/en2010_268_64800.raw',...
'/home/data/EN484/raw/os75/en2010_268_72000.raw',...
'/home/data/EN484/raw/os75/en2010_268_79200.raw',...
'/home/data/EN484/raw/os75/en2010_269_00000.raw',...
'/home/data/EN484/raw/os75/en2010_269_07200.raw',...
'/home/data/EN484/raw/os75/en2010_269_14400.raw',...
'/home/data/EN484/raw/os75/en2010_269_21600.raw',...
'/home/data/EN484/raw/os75/en2010_269_28800.raw',...
'/home/data/EN484/raw/os75/en2010_269_34125.raw',...
'/home/data/EN484/raw/os75/en2010_269_36000.raw',...
'/home/data/EN484/raw/os75/en2010_269_43200.raw',...
'/home/data/EN484/raw/os75/en2010_269_50400.raw',...
'/home/data/EN484/raw/os75/en2010_269_57600.raw',...
'/home/data/EN484/raw/os75/en2010_269_64800.raw',...
'/home/data/EN484/raw/os75/en2010_269_72000.raw',...
'/home/data/EN484/raw/os75/en2010_269_79200.raw',...
'/home/data/EN484/raw/os75/en2010_270_00000.raw',...
'/home/data/EN484/raw/os75/en2010_270_07200.raw',...
'/home/data/EN484/raw/os75/en2010_270_14400.raw',...
'/home/data/EN484/raw/os75/en2010_270_21600.raw',...
'/home/data/EN484/raw/os75/en2010_270_28800.raw',...
'/home/data/EN484/raw/os75/en2010_270_36000.raw',...
'/home/data/EN484/raw/os75/en2010_270_43200.raw',...
'/home/data/EN484/raw/os75/en2010_270_50400.raw',...
'/home/data/EN484/raw/os75/en2010_270_57600.raw',...
'/home/data/EN484/raw/os75/en2010_270_64800.raw',...
'/home/data/EN484/raw/os75/en2010_270_72000.raw',...
'/home/data/EN484/raw/os75/en2010_270_79200.raw',...
'/home/data/EN484/raw/os75/en2010_271_00000.raw',...
'/home/data/EN484/raw/os75/en2010_271_07200.raw',...
'/home/data/EN484/raw/os75/en2010_271_14400.raw',...
'/home/data/EN484/raw/os75/en2010_271_21600.raw',...
'/home/data/EN484/raw/os75/en2010_271_28800.raw',...
'/home/data/EN484/raw/os75/en2010_271_36000.raw',...
'/home/data/EN484/raw/os75/en2010_271_43200.raw',...
'/home/data/EN484/raw/os75/en2010_271_50400.raw',...
'/home/data/EN484/raw/os75/en2010_271_57246.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_args', cfg.hcorr_args, ...
            'gyro_msginfo', cfg.best.heading_rule,...
            'ping_headcorr', ping_headcorr, ...
            'num_persistence', num_persistence, ...
            'pingtype', pingtype,  'max_BLKprofiles', 144,   'maxrunsecs', 300,...
            'save_editcfg', 0,...
            'verbose', 0);


     