%an example of aflagit_setup.m for a good (clean) cruise


pfc.cfg.underway           = 100;  % reject underway profiles (ship speed, m/s)
pfc.refl_startbin          = 4;    % ref layer should match what was   
pfc.refl_endbin            = 20;   %  used in smoothr (for consistency) 
pfc.yearbase               = config.yearbase;         % (for labelling)
pfc.cfg.bigtarget_amp      = 25;   % these came from Eric's ky0006 
pfc.cfg.bigtarget_offset   = 5;    % implimentation - I don't know what
pfc.cfg.bigtarget_avg      = 2;    % might be important to tweak
pfc.cfg.pgcutoff           = 50;   % (1) low percent good for all bins 
pfc.cfg.maxpgbin_fudge     = 7;    % (2) ringing (allow this much slop
pfc.cfg.badpgrefl          = 50;   % (3) reference layer PG cutoff
pfc.cfg.badpgrefl_nbins    = 10;   % make it higher to edit out "weak" (i.e.
pfc.cfg.trimtopbins        = 2;    %exclude top N bins anyway
pfc.cfg.amp_cutoff_atbin1  = 0;    %amplitude cutoff at bin 1 is this 
pfc.cfg.ampdecrperbin      = 10;   %relative to bin 1, lose this many amplitude
pfc.cfg.ecutoff            = 120;  % (1) plain old error velocity cutoff
pfc.cfg.wire_ecutoff       = 90;   % (2) wire interference cutoff
pfc.cfg.wire_onstation     = 2;    %   (only look when speed is less than this)
pfc.cfg.wire_binrange      = [1 20];%     (only look in this bin range)
pfc.cfg.jitter_cutoff      = 5;    % 
pfc.cfg.orphan_numbins     = 1;    % number of unflagged bins in ref layer
pfc.cfg.orphan_slide       = 2;    %     half-width of isolation profile


%%% do not edit this part 

pfc.flag.pgcutoff           = 2^0;
pfc.flag.trimtopbins        = 2^1;
pfc.flag.badpgrefl          = 2^2;
pfc.flag.maxampbin          = 2^3;     %flag for maxamp bin
pfc.flag.bottom             = 2^4;     %flag for simulating bottom-editing
pfc.flag.ecutoff            = 2^5;
pfc.flag.orphan             = 2^6;
pfc.flag.wire               = 2^7;
pfc.flag.jitter             = 2^8;     %flag for high jitter
pfc.flag.underway           = 2^9;
