

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

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

        


        % now set up heading correction parameters
        % sets heading correction instrument to use (from config if possible)
        % (1) if there isn't one, initialize it
           if ~isfield(cfg, 'hcorr_inst'),
               cfg.hcorr_inst = ''; % 'gyro', 'ashtech', 'seapath', 'posmv'
           end
        % (2) override from quick_adcp.py if desired
           %%====> quick_adcp.py overrriding:
 hcorr_inst = 'ashtech';


        % (3)  override from quick_adcp.py if desired
        %      eg. hcorr_args = {'posmv', 'pmv', 'acc_heading_cutoff', .018};
            

        ping_headcorr = 0;  % for batch processing
        %====> 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/KNOX18RR/raw/nb150/rr2008_190_74489.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_190_75472.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_190_83186.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_191_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_192_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_193_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_194_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_195_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_196_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_197_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_198_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_199_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_200_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_201_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_202_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_203_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_204_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_205_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_206_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_207_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_208_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_209_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_210_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_211_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_212_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_213_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_214_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_215_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_216_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_217_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_218_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_219_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_220_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_221_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_222_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_223_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_36000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_43200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_50400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_57600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_64800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_72000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_224_79200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_225_00000.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_225_07200.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_225_14400.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_225_21600.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_225_28800.raw',...
'/home/data/KNOX18RR/raw/nb150/rr2008_225_36000.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,  ...
            'save_editcfg', 0,...
            'verbose', 0);

        which table1

     