function hlaa2cts(event,iifreq,iiper)
% Call hlaa2cts(event,iifreq,iiper)
%
% where
% event		= event number (122, 545);
% iifreq		= frequency index(122=[150 187 250 305 350], 545=[250 400]);
% iiper		= time period index (122=[1], 545=[1 2 3]
%
%
% COPYRIGHT (c) 2008
% 
% Applied Research Laboratories, The University of Texas at Austin
% (ARL:UT)
% All rights reserved.
% 
% This material may be reproduced by or for the U.S. Government
% only. This notice must appear in all copies of this file and its
% derivatives. Further distribution outside the U.S. Government is
% prohibited without the explicit written authorization from the
% Director of the Environmental Sciences Laboratory, ARL:UT.
% 
% THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
% EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE
% IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
% PURPOSE, OR NONINFRINGEMENT.
% 
% IN NO EVENT WILL ARL:UT BE LIABLE FOR ANY DAMAGES WHATSOEVER ARISING
% OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN IF ARL:UT HAS
% BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
switch event
case 122,
% Event 122: J223 03:53:56.846
   f_bb_shifts=[150 187 250 305 350]; data_root='cm_evt122_band';
   Jday=223; Jhour=3+53/60+56.846/3600;  nrec=73;
	fs=2730.576/256;
case 545,
% Event 545:
% J228 23:30:00.585
% J229 00:28:28.846
% J229 01:29:13.780
	fs=2730.576/54; f_bb_shifts=[250 400];
	data_root='cm_evt545_band';
   Jday=[228; 229; 229];
   Jhour=[23+30/60+.585/3600; 00+28/60+28.846/3500; 01+29/60+13.780/3600];
   nrec=121;
otherwise,
   disp(['Unknown Event Number: ',int2str(event)]);
end
%
nfreq=length(f_bb_shifts); nper=length(Jday);
if nargin<2 | isempty(iifreq), iifreq=[1:nfreq]; end
if nargin<3 | isempty(iiper), iiper=[1:nper]; end
%
for jf=1:length(iifreq),
   for jp=1:length(iiper),
      jper=iiper(jp);
		jfreq=iifreq(jf);
	   data_file=[data_root,int2str(jfreq),'_',int2str(jper),'.dat'],
	   cts_root=[];
		f_bb_shift=f_bb_shifts(jfreq),
      cts_from_hla(data_file,cts_root,fs,f_bb_shift,Jday(jper),Jhour(jper),nrec);
   end
end
