program cal_search34 *********************************************************************** * search calibration file * * September 5, 2007 H. Koshiishi * *********************************************************************** c integer naxes(2),nantst(84),icimg(1000),iimg(1000), - pi(2000),pl(2000),pw(2000) integer*2 iccald(168) real gbeam(512,512,0:10),flx(84), - mapa(512,512),mapb(512,512), - cmap(1024,1024),pmat(4),pa(2000) character*80 filehd,infpar,infref,outf character*12 dateframe c ccc write(6,'(/'' input directory for output files : ''$)') read(5,'(a)') outf ccc write(6,'('' input rawdata filename header : ''$)') read(5,'(a)') filehd ccc write(6,'('' input parameter filename : ''$)') read(5,'(a)') infpar c ccc write(6,'('' input reference filename : ''$)') read(5,'(a)') infref c ccc write(6,'('' input first frame number : ''$)') read(5,*) ncfrst if (ncfrst.ne.0) then ccc write(6,'('' input last frame number : ''$)') read(5,*) ncfrend ccc write(6,'('' input frame interval : ''$)') read(5,*) ictvl ncimg=0 do 150 i=ncfrst,ncfrend,ictvl ncimg=ncimg+1 icimg(ncimg)=i 150 continue else ccc write(6,'('' input number of frames : ''$)') read(5,*) ncimg ccc write(6,'('' input frame numbers : ''$)') read(5,*) (icimg(i),i=1,ncimg) end if ccc write(6,'('' input integration frames'')') ccc write(6,'('' for calibration : ''$)') read(5,*) iccal ccc write(6,'('' for image processing : ''$)') read(5,*) ictgr c ccc write(6,'('' quiet : 1 / burst : 2 : ''$)') read(5,*) iqb c ccc write(6,'('' input pixel-size of the output files : ''$)') read(5,*) npix c ccc write(6,'('' input offset of the image center'')') ccc write(6,'('' unit(1:arcsec/2:pixel) & x-/y-offsets : ''$)') read(5,*) nuoff,xoffa,yoffa if (nuoff .eq. 1) then xoffp=xoffa/2.45553 yoffp=yoffa/2.45553 else xoffp=xoffa yoffp=yoffa xoffa=xoffp*2.45553 yoffa=yoffp*2.45553 endif c ccc write(6,'('' input first frame number : ''$)') read(5,*) nfrst if (nfrst.ne.0) then ccc write(6,'('' input last frame number : ''$)') read(5,*) nfrend ccc write(6,'('' input frame interval : ''$)') read(5,*) itvl nimg=0 do 160 i=nfrst,nfrend,itvl nimg=nimg+1 iimg(nimg)=i 160 continue else ccc write(6,'('' input number of frames : ''$)') read(5,*) nimg ccc write(6,'('' input frame numbers : ''$)') read(5,*) (iimg(i),i=1,nimg) end if ccc write(6,'('' input integration frames'')') ccc write(6,'('' for calibration : ''$)') read(5,*) ical ccc write(6,'('' for image processing : ''$)') read(5,*) itgr c ccc write(6,'('' input number limit of criterion : ''$)') read(5,*) nmaxa ccc write(6,'('' input lower limit of criterion : ''$)') read(5,*) cradd ccc write(6,'('' input factor of criterion : ''$)') read(5,*) crfac c ***** default parameters ***** c loutf=index(outf,' ')-1 c call cft512(mapa,mapb,0) c iunit=11 c call rdpar(iunit,infpar, - dec1,dec2,dec3,ha1,ha2,ha3, - solr1,solr2,solr3,solp1,solp2,solp3,solb1,solb2,solb3, - nantst) c call msrc(nantst,1.,gbeam) c iounit=2 nbit=32 naxis=2 naxes(1)=168 naxes(2)=1 c do 100 iifr=1,ncimg c iframe=icimg(iifr) c call snapuv34(iunit,filehd,iframe,iframe+ictgr-1, - nantst,iccal,iccald,1., - ndjst,msjst,msjsts,msjste,natt,nfalt,nfreq,nstat, - flx,mapa,mapb,nfrmst) if (nfrmst.ne.0) go to 100 c call cft512(mapa,mapb,-1) c call caleph(dec1,dec2,dec3,ha1,ha2,ha3, - solr1,solr2,solr3,solp1,solp2,solp3,solb1,solb2,solb3, - msjst,dec,ha,solr,solp,solb,az,alt,za,pmat) c ***** clean process ***** c pxew=999. pxns=999. nmaxa=2000 nmaxs=2000 c call clean34(2,mapa,pmat,solr*1.0125, - nantst,gbeam,cradd,crfac,cra,pxew,pxns,corf, - nmaxa,bgr,dskbr,pi,pl,pw,pa,cmap) c lfilehd=index(filehd,' ')-1 write(dateframe,'(a6,''_'',i5)')filehd(lfilehd-5:lfilehd),iframe c if (corf.lt.0.) corf=0. px=sqrt(pxew*pxew+pxns*pxns) c write(6,'(a12,x,a12)') 'date_frame =',dateframe write(6,'(a6,x,f7.5)') 'corf =',corf write(6,'(a18,x,f8.2,x,a1,x,f8.2,x,a1,x,f8.2)') - 'pxew , pxns , px =',pxew,',',pxns,',',px write(6,*) ' ' c 100 continue c end