function d = mk_depth(arg1, tr_depth)
% function d = mk_depth(arg1, tr_depth)
% NOTE:  a.config.bin1distance and  a.config.tr_depth are created in 
%        read(nb,...) so this program will work.  They are initialized to zero.
% tr_depth is an optional input for overriding the recorded transducer depth

if (nargin == 1)
   tr_depth = arg1.config.tr_depth; 
end

NB = arg1.config.ncells;

d = 0:(NB-1);
d = tr_depth + arg1.config.bin1distance + d * arg1.config.cell;

