

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

        
            % begin "matcfgstr" string, created by run_lastensq.py
            instclass = nb;
            instname  = 'nb150';
            pingtype  = 'nb';
            yearbase  = 2007;
            cfg =get_uhdascfg('cfgbase'  , 'MGLN18MV',...
                              'cfgpath'  , '/home/data/MGLN18MV/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/MGLN18MV/raw/nb150/mv2007_121_25583.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_121_25643.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_121_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_121_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_121_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_121_46798.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_121_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_121_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_121_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_121_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_121_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_122_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_02976.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_123_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_124_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_78631.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_125_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_126_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_127_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_128_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_129_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_130_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_131_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_132_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_133_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_134_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_135_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_136_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_137_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_138_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_139_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_140_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_00000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_07200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_14400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_21600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_28800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_36000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_43200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_50400.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_57600.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_64800.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_72000.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_141_79200.raw',...
'/home/data/MGLN18MV/raw/nb150/mv2007_142_00000.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);

     