function listpeaks40(offset)
nfreqs=82;hfreqs=nfreqs/2+1;srate=750000/76;
% if offset>1.5 nfreqs=83; end;
ints=[1:nfreqs];freqs=60*ints-offset;frate=4096*2/srate;
flows=freqs-1.5;fups=freqs+1.5;
nflows=round(flows*frate+1);nfups=round(fups*frate+1);
load /ligo/tmp2/bernard/matlab/results_1000
for i=1:nfreqs,
   tmp=sqrt(varr(nflows(i):nfups(i))+vari(nflows(i):nfups(i)));
   [yb(i),indb(i)]=max(tmp);indb(i)=indb(i)+nflows(i)-1;
end
load /ligo/tmp2/bernard/matlab/results_afterLR
for i=1:nfreqs,
   tmp=sqrt(varr(nflows(i):nfups(i))+vari(nflows(i):nfups(i)));
   [ya(i),inda(i)]=max(tmp);inda(i)=inda(i)+nflows(i)-1;
end
subplot(2,1,1)
doublehist(freqs(1:hfreqs),log10(yb(1:hfreqs)),log10(ya(1:hfreqs)))
subplot(2,1,2)
doublehist(freqs(hfreqs:nfreqs),log10(yb(hfreqs:nfreqs)),log10(ya(hfreqs:nfreqs)))

% save peakslist40.txt freqs yb ya -ascii