function str=configstr(datastruct)
% str=configstr(datastruct, verbose)
% return a useful string for annotation or titles, 
% input is data structure from read(instclass,...)
%
% basic: pingtype, ncells, cellsize, blank, pulse, BT, coordsystem

if rem(datastruct.config.cell, 1) == 0
   cellstr = sprintf('%dm cell', datastruct.config.cell);
else
   cellstr = sprintf('%1.1fm cell', datastruct.config.cell);
end

if rem(datastruct.config.blank, 1) == 0
   blankstr = sprintf('%dm blank', datastruct.config.blank);
else
   blankstr = sprintf('%1.1fm blank', datastruct.config.blank);
end

if rem(datastruct.config.pulse, 1) == 0
   pulsestr = sprintf('%dm pulse', datastruct.config.pulse);
else
   pulsestr = sprintf('%1.1fm pulse', datastruct.config.pulse);
end


if datastruct.config.bt_was_on
   btstr = 'BT=on';
else
   btstr = 'BT=off';   
end



str = sprintf('%s(%s): %d cells; %s, %s, %s, %s',...
              datastruct.config.pingtype,...
              datastruct.config.coordsystem,...
              datastruct.config.ncells,...              
              cellstr, blankstr, pulsestr, btstr);

              
              
              