subroutine resp1(w,n,wresp,instp,ic) c............................................................. c This subroutine computes the instrument response spectrum c from given poles and zeros. c By Yuehua Zeng at UNR c............................................................. c dimension w(n) complex wresp(n),ci,cw character*7 instp include 'instdata.h' c c define parameters pi2=3.14159265*2.0 ci=cmplx(0.0,1.0) c c find the instrument type if(instp(1:3).eq.'L22')then ins=1 ic=1 elseif(instp(4:4).eq.'4'.and.instp(6:7).eq.'HI')then ins=2 ic=1 elseif(instp(4:4).eq.'4'.and.instp(6:7).eq.'LO')then ins=3 ic=1 elseif(instp(4:4).eq.'5'.and.instp(6:7).eq.'HI')then ins=4 ic=2 elseif(instp(4:4).eq.'5'.and.instp(6:7).eq.'LO')then ins=5 ic=2 else print*,' error in instrument type!' stop endif c c loop for instrument frequency response do 30 i=1,n cw=cmplx(0.0,w(i)*pi2) wresp(i)=cmplx(sens(ins),0.0) c do 10 j=nzbeg(ins),nzbeg(ins)+nzero(ins)-1 wresp(i)=wresp(i)*(cw-zeros(j)) 10 continue c do 20 j=npbeg(ins),npbeg(ins)+npole(ins)-1 wresp(i)=wresp(i)/(cw-poles(j)) 20 continue 30 continue c return end