

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

        
            % begin "matcfgstr" string, created by run_lastensq.py
            instclass = os;
            instname  = 'os75';
            pingtype  = 'bb';
            proc_yearbase  = 2009;
            yearbase  = 2009;
            cfg =get_uhdascfg('cfgbase'  , 'TN236',...
                              'cfgpath'  , '/home/data/TN236/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 = 'posmv';              % this should be obsolete, but here for constistency
        % this is what is used. see get_rbinheading.m :
           %%====> quick_adcp.py overrriding:
 cfg.hcorr_args = {'posmv', 'pmv'};

        % 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/TN236/raw/os75/tt2009_162_01054.raw',...
'/home/data/TN236/raw/os75/tt2009_162_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_162_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_162_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_162_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_162_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_162_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_162_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_162_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_162_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_162_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_162_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_163_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_163_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_163_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_163_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_163_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_163_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_163_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_163_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_163_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_163_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_163_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_163_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_164_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_164_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_164_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_164_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_164_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_164_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_164_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_164_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_164_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_164_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_164_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_164_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_165_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_165_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_165_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_165_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_165_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_165_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_165_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_165_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_165_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_165_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_165_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_165_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_166_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_166_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_166_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_166_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_166_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_166_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_166_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_166_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_166_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_166_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_166_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_166_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_167_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_167_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_167_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_167_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_167_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_167_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_167_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_167_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_167_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_167_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_167_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_167_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_168_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_168_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_168_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_168_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_168_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_168_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_168_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_168_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_168_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_168_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_168_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_168_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_169_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_169_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_169_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_169_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_169_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_169_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_169_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_169_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_169_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_169_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_169_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_169_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_170_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_170_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_170_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_170_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_170_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_170_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_170_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_170_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_170_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_170_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_170_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_170_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_171_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_171_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_171_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_171_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_171_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_171_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_171_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_171_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_171_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_171_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_171_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_171_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_172_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_172_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_172_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_172_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_172_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_172_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_172_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_172_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_172_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_172_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_172_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_172_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_173_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_173_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_173_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_173_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_173_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_173_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_173_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_173_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_173_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_173_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_173_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_173_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_174_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_174_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_174_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_174_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_174_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_174_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_174_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_174_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_174_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_174_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_174_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_174_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_175_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_175_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_175_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_175_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_175_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_175_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_175_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_175_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_175_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_175_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_175_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_175_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_176_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_176_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_176_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_176_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_176_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_176_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_176_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_176_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_176_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_176_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_176_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_176_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_177_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_177_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_177_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_177_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_177_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_177_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_177_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_177_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_177_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_177_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_177_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_177_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_178_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_178_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_178_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_178_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_178_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_178_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_178_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_178_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_178_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_178_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_178_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_178_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_179_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_179_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_179_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_179_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_179_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_179_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_179_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_179_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_179_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_179_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_179_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_179_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_180_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_180_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_180_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_180_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_180_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_180_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_180_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_180_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_180_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_180_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_180_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_180_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_181_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_181_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_181_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_181_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_181_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_181_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_181_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_181_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_181_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_181_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_181_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_181_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_182_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_182_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_182_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_182_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_182_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_182_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_182_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_182_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_182_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_182_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_182_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_182_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_183_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_183_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_183_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_183_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_183_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_183_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_183_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_183_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_183_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_183_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_183_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_183_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_184_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_184_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_184_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_184_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_184_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_184_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_184_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_184_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_184_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_184_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_184_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_184_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_185_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_185_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_185_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_185_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_185_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_185_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_185_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_185_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_185_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_185_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_185_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_185_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_186_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_186_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_186_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_186_21600.raw',...
'/home/data/TN236/raw/os75/tt2009_186_28800.raw',...
'/home/data/TN236/raw/os75/tt2009_186_36000.raw',...
'/home/data/TN236/raw/os75/tt2009_186_43200.raw',...
'/home/data/TN236/raw/os75/tt2009_186_50400.raw',...
'/home/data/TN236/raw/os75/tt2009_186_57600.raw',...
'/home/data/TN236/raw/os75/tt2009_186_64800.raw',...
'/home/data/TN236/raw/os75/tt2009_186_72000.raw',...
'/home/data/TN236/raw/os75/tt2009_186_79200.raw',...
'/home/data/TN236/raw/os75/tt2009_187_00000.raw',...
'/home/data/TN236/raw/os75/tt2009_187_07200.raw',...
'/home/data/TN236/raw/os75/tt2009_187_14400.raw',...
'/home/data/TN236/raw/os75/tt2009_187_21600.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);


     