function [t,g] = get_series(test,inst,iplot);
%
% function to extract measured data from LIP11D data files
%
% use [t,g] = get_series(test,inst,iplot);
% 
% inst = name of instrument (character)
% iplot= switch:   plot results if iplot == 1
% test = name of test (character)
% g    = output time series
% t    = time
%
% test refers to the data files
% a typical exmaple is '#1a0102'
% where 1a refers to the test
%       01 to hour 1
%       02 to the cross-shore position of the instrument sled
%
% inst refers to the instrument 
% a typical example is 'WHM01'
% where WHM stands for Wave Height Meter
% and 01 for the number. 
% other examples are 'DRO01' referrring to a pressure sensor and
% 'EMF01' for a current velocity sensor
%
% [t,g] = get_series('#2a0102','EMF01',1);
%
% information on the position of the sensors for a specific test can be found in the 
% sequential file, e.g. '#1a0102.seq' within the test-data directory.
%

eval(['cd test-data'])
[t,g] = aukmat(test,inst,0);
eval(['cd ..'])

if iplot == 1
if ~isempty(g)
plot(t,g)
xlabel('T (s)')

if (inst(1:3) == 'DRO') 
ylabel('m')
end
if (inst(1:3) == 'EMF') 
ylabel('m/s')
end
if (inst(1:3) == 'WHM') 
ylabel('m')
end

end
end