%% Provision exists for a uwer-written editing function.
%  
%  requirements: the function should have the form:
%
%
%%%%%% begin user-written function
%
%  function mask = test_useredit1(data, editcfg)
%  % mask = user_function(data,editcfg)
%  % who: called by pingedit
%  % output: returns a mask with 1 where data are bad according to this program
%  % input:  (1) data: structure containing fields
%  %         (2) editcfg:  structure from get_pedefaults 
%  
%  % example
%  
%  [nr, nc] = size(data.cuv);
%  
% submask = ...
%     [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
%      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
%   
%  
%  
%  submask = repmat(submask, 1, nc/5);
%  submask = repmat(submask, nr/5, 1);
%  
%  mask = submask(1:nr, 1:nc);
%  
%%%%%% end user-written function
%  
%  
%  To invoke this function, 
%      (1) put it on your path (best in the load/ subdirectory)
%      (2) get the editcfg structure using "get_pedefaults":
%             editcfg = get_pedefatils(instclass, pingtype)
%      (3) add this function name to the field editcfg.useredit as a cellarray:
%             editcfg.useredit_functions = {'user_function'};
%  
%  
%  
%  
%  
%  
%  
%  
%  
%  
%  
%  
%  
%  
%  
%  
%  
%  
%  







