function listpeaks(offset)
nfreqs=39;if offset>1.5 nfreqs=40; end;
ints=[1:nfreqs];freqs=50*ints-offset;frate=4096/2000;
flows=freqs-1.5;fups=freqs+1.5;
nflows=round(flows*frate+1);nfups=round(fups*frate+1);
load results_before
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 results_after
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
doublehist(freqs,log10(yb),log10(ya))
save peakslist.txt freqs yb ya -ascii