%    EDGEPS8K - Raw travel times of channels with nonzero replies
%
%    B. A. Moran, 21-May-1998

%    Copyright (C) 1995-1998, Massachussetts Institute of Technology
%    Sea Grant Autonomous Underwater Vehicles Laboratory
%    $Id: edgeps8k.m,v 1.1 2000/01/10 19:07:55 rob Exp $

if exist( 'm_ps8k_t01' ) == 1

    chn = [ m_ps8k_t01 m_ps8k_t02 m_ps8k_t03 m_ps8k_t04 m_ps8k_t05 ...
            m_ps8k_t06 m_ps8k_t07 m_ps8k_t08 m_ps8k_t09 m_ps8k_t10 ];

    yep = find(any( data(:,chn) > 0 ));
    tmax = 0;

   for ii = 1:length(yep)
       subplot( length(yep), 1, ii );
       ind = find( data(:,chn(yep(ii))) > 0 );
       tmax = max( tmax, max(data(ind,chn(yep(ii)))) );
       plot( data(ind,m_present_time), data(ind,chn(yep(ii))), 'o' )
       if ii == 1
           title(sprintf('Raw LBL Travel Times (s): %s', run_name))
       end
       ylabel(sprintf( 'Ch %02d', yep(ii) ));
   end

   ywin([0 tmax])
   xlabel( 'elapsed time (s)' )

end