%    PAROSCI - script to plot compensated pressure and raw temperature and
%    pressure period signals from Parosci Digiquartz
%
%    B. A. Moran, 31-Jan-1998

%    Copyright (C) 1995-1998
%    Massachussetts Institute of Technology
%    Sea Grant AUV Laboratory
%    $Id: parosci.m,v 1.1 2000/01/10 19:08:25 rob Exp $	

if exist( 'h_paro' ) ~= 1
    h_paro = figure;
    if strcmp( computer, 'SGI' )
	winpos( [100+200*rand 100+100*rand 800 600] );
    end
else
    h_paro = figure(h_paro);
end

set( h_paro, 'Name', 'Parosci Diagnostics', 'DeleteFcn', 'clear h_paro' );


subplot( 3, 1, 1 )
plot( time, data(:,m_pressure)); set( gca, 'ydir', 'rev' );
zoom on;
title( ['Paroscientific Digiquartz Diagnostics: ' run_name] )
xlabel( 'elapsed time (s)' );
ylabel( 'comp pres (bar)' );

clrs = get( gca, 'ColorOrder' );

subplot( 3, 1, 2 )
plot( time, data(:,m_paro_pres_period), 'color', clrs(2,:) )
zoom on;
xlabel( 'elapsed time (s)' );
ylabel( 'pres period (\mus)' );

subplot( 3, 1, 3 )
plot( time, data(:,m_paro_temp_period), 'color', clrs(3,:) );
zoom on;
xlabel( 'elapsed time (s)' );
ylabel( 'temp period (\mus)' );

clear clrs
