$ CXIMAGR $--------------------------------------------------------------- $! Procedures for complex imaging $# RUN POPS VLBI UTILITY CALIBRATION $--------------------------------------------------------------- $; Copyright (C) 2020 $; Associated Universities, Inc. Washington DC, USA. $; $; This program is free software; you can redistribute it $; and/or modify it under the terms of the GNU General Public $; License as published by the Free Software Foundation; either $; version 2 of the License, or (at your option) any later $; version. $; $; This program is distributed in the hope that it will be $; useful, but WITHOUT ANY WARRANTY; without even the implied $; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR $; PURPOSE. See the GNU General Public License for more $; details. $; $; You should have received a copy of the GNU General Public $; License along with this program; if not, write to the Free $; Software Foundation, Inc., 675 Massachusetts Ave, Cambridge, $; MA 02139, USA. $; $; Correspondence concerning AIPS should be addressed as $; follows: $; Internet email: aipsmail@nrao.edu. $; Postal address: AIPS Project Office $; National Radio Astronomy Observatory $; 520 Edgemont Road $; Charlottesville, VA 22903-2475 USA $--------------------------------------------------------------- PROCEDURE CXIMAGR tput cximagr; vnumber=36-getpopsn; vput cximagr; dowait 1 $ UVIMG default uvimg; vget cximagr; task 'uvimg'; stokes='i' if ((cellsize(1)<=0) ! (cellsize(2)<=0)) then type 'cellsize must be specified' return; end if ((imsize(1)<=64) ! (imsize(2)<=64)) then type 'imsize must be specified' return; end x = cellsize(1)*3.14159/(3600*180)*imsize(1) y = cellsize(2)*3.14159/(3600*180)*imsize(2) dparm(5)=-1.0/x; dparm(6)=1.0/y; dparm(2)~0,0,0; dparm(9)=1 sort='uv'; nchav=10000; chinc=nchav; outclass = 'CXreal dparm(1)=4; go; outclass='CXimag dparm(1)=5; go; outclass='CXbeam dparm(1)=6; go $ FFT task 'fft'; inname=outname; inseq=outseq; inclass='CXreal indisk=outdisk; in2name=outname; in2class='CXimag in2seq=outseq; in2disk=outdisk; opcode='uvix'; go $ rename inclass='MAREAL'; inseq=0; outclass='QIM001'; rename inclass='MAIMAG'; inseq=0; outclass='UIM001'; rename $ beam inseq=outseq; inclass='CXbeam opcode 'uvir'; clr2name; go $ rename inclass='MAREAL'; inseq=0; outclass='QBM001'; rename inclass='MAIMAG'; inseq=0; outclass='UBM001'; rename $ rescale inclass='qbm001'; pixxy=imsize(1)/2+1,imsize(2)/2+1 docenter=1; qimval; x=pixval; inclass='ubm001'; qimval x = modulus(x,pixval); if (x<=0) then; print 'beam has no value'; return; end factor = 1/x; rescale; inclass='qbm001'; rescale inclass='uim001'; rescale; inclass='qim001'; rescale $ clean if (niter>0) then $ beam if (bmaj<=0) then inclass='qbm001'; ngauss=1; gmax=1,0; blc=pixxy(1)-12,pixxy(2)-12; gpos=pixxy; trc = blc(1)+24,blc(2)+24; gwidth 0; dooutput=-1; offset=0;domodel=-1;outvers=0; prtlev=-1; go jmfit; bmaj=fwidth(1,1)*cellsize(1); bmin=fwidth(2,1)*cellsize(1); bpa=fwidth(3,1); end $ cxcln in2name=outname; in2disk=outdisk; inseq=0; in2seq=0; invers=0; task='cxcln'; go end $ return finish