sacfilename='2005.295.00.04.41.0000.YZ.TERE..BHZ.D.SAC';
[tracetere,fs,sy,jsectere]=loadsac(sacfilename);
framehz=0.5; % Hz frame sampling speed for filterbank
[etere]=dobank(tracetere,fs,framehz); % compute filterbank

sacfilename='2005.295.00.29.34.0000.YZ.SILE..BHZ.D.SAC';
[tracesile,fs,sy,jsecsile]=loadsac(sacfilename);
[esile]=dobank(tracesile,fs,framehz); 

sacfilename='2005.295.00.36.25.0000.YZ.BOOE..BHZ.D.SAC';
[tracebooe,fs,sy,jsecbooe]=loadsac(sacfilename);
[eventliston,eventlistoff] = tagevents(sy,1e4,8e3,1.0*fs); 
[ebooe]=dobank(tracebooe,fs,framehz); 
clim = 10.0; %db color trigger
[clistv] = docolor(eventliston,eventlistoff,clim,ebooe,fs,framehz);

k=12;
timei = eventliston(clistv(k));
timestring = tstring(jsecbooe,fs,timei);
dtfiles=fix(jsecbooe-jsectere);
dtfiles2= fix(jsecbooe-jsecsile);

jstring = tstring(jsectere,fs,timei+fix(dtfiles*fs))
pltevent(trace2,timei/fs,fs,e,framehz,timestring);
pltevent(tracetere,timei/fs+dtfiles,fs,etere,framehz,jstring);


lets look at every single event relocated 1022

day = 295;
ysec = dhmstos(day,1,29,4,0.0); % #235
t_string='295:01:29:04';
timev = ysec - jsecbooe;

figure;
pltevent(tracebooe,timev,fs,ebooe,framehz,['booe' t_string]);
figure;
pltevent(tracetere,timev+dtfiles,fs,etere,framehz,['tere' t_string]);
figure;
pltevent(tracesile,timev+dtfiles2,fs,esile,framehz,['sile' t_string]);

ysec = dhmstos(day,17,17,0,0.0); % #258
t_string='295:17:17:00';
timev = ysec - jsec;
ysec = dhmstos(day,17,55,7,0.0); % #260
t_string='295:17:55:07';
timev = ysec - jsec;
ysec = dhmstos(day,11,13,21,0.0); % #250
t_string='295:11:13:21';
timev = ysec - jsec;


