c c compute gain, tsys, sefd curves for l-wide receiver c ramesh@naic, 09/may/2002 c (for g54/search project) c for tsys, c * subtract 3K background c * add galactic synchrotron c 6.14 K towards G54 (l=54.04, b=0.37) c !! use the revised estimate of 8.2 K !! c * synchrotron from nebula T_snr=G(t)*S_snr c S_snr=0.5 Jy, spectral index=~0.0 program gain_N_tsys integer i,nza,nmax,count parameter (nmax=300) real za0,dza,za(nmax),gain(nmax),tsys(nmax) real term1,term2,term3,sefd(nmax),za1(nmax) real avsefd,c0,c1,c2,c3,tcold,tsky,tsnr(nmax) real tsys1(nmax) c read in gain curve paras from a file 13/05/02 open(1, file='lwide.gain') read(1,*)c0,c1,c2,c3 write(6,*) write(6,*)'The model Gain curve: ',c0,c1,c2,c3 write(6,*) close(1) tcold=3.0 c tsky=6.14 revised estimate=8.2 K tsky=8.2 ssnr=0.50 za0=-19.65 dza= 0.1965 nza= 200 avsefd=0.0 count=0 do i=1,nza+1 za(i)=za0+(i-1)*dza za1(i)=za(i) za(i)=abs(za(i)) term1= c0+c1*za(i) if(za(i).gt.14.0)then term2= c2*((za(i)-14.0)**2.0) term3= c3*((za(i)-14)**3.0) else term2=0.0 term3=0.0 end if gain(i)=term1+term2+term3 term1= 36.32+0.153*za(i) if(za(i).gt.14.0)then term2= 0.17094*((za(i)-14.0)**2.0) term3=-0.00741*((za(i)-14.0)**3.0) else term2=0.0 term3=0.0 end if tsys(i)=term1+term2+term3 c subtract cold sky, add tsky + tsnr tsnr(i)=ssnr*gain(i) tsys1(i)=tsys(i)-tcold+tsky+tsnr(i) sefd(i)=tsys1(i)/gain(i) c do averaging only for |za|<1.06 deg 13/05/02 if(za(i).gt.1.06)then avsefd=avsefd+sefd(i) count=count+1 end if write(*,*)za1(i),gain(i),tsys(i),tsys1(i),sefd(i) end do avsefd=avsefd/float(count) write(*,*) write(*,*)'The effective average SEFD: ',avsefd write(*,*) write(*,*)'Total no of za points: ',nza+1 write(*,*)'No outside za < 1.06 : ',count write(*,*) stop end c ignore this! C current best estimate: C Gain(za, az)=10.85523-0.10291*za+0.01343*(za-14)^2-0.00717*(za-14)^3 C Tsys(za)= 36.32 + 0.153*za + 0.17094*(za-14)^2 - 0.00741*(za-14)^3 K C L-wide: C gain(za) = 11.00523 - 0.10291*za + 0.01343*(za-14)^2 - 0.00717*(za-14)^3 C Tsys(za) = 36.32 + 0.153*za + 0.17094*(za-14)^2 - 0.00741*(za-14)^3 K