include 'ms.g' include 'flagger.g' include 'imager.g' include 'calibrater.g' include 'logger.g' msname:='planets1.ms' myms:=fitstoms(msname, '/aips++/data/nrao/VLA/planets_6cm.fits') myms.summary(verbose=T); myms.done(); myfl:=flagger(msname); myfl.quack(); myfl.flagac(); myfl.done(); myimgr:=imager(msname) myimgr.setjy(fieldid=1); myimgr.setjy(fieldid=8); myimgr.setjy(fieldid=13); myimgr.done() mycal:=calibrater(msname); mycal.setdata(msselect='FIELD_ID IN [1,8]'); mycal.setapply(type='P',t=5); mycal.setsolve(type='G',table='planets.gcal.1',t=0.0); mycal.solve(); mycal.setdata(msselect=''); mycal.smooth('planets.gcal.1','planets.gcal.mean',F,'','median',500.0,'cubic',108.0); mycal.done(); include 'table.g' include 'pgplotter.g' mypg:=pgplotter(); t1:=table('planets.gcal.1') t2:=table('planets.gcal.mean') # set these as you like, then run the rest of the script ant:=2; spw:=1; st1:=t1.query( spaste('(ANTENNA1+1)==',ant) ) times1:=st1.getcol('TIME'); times1-:=(86400.0*floor(times1[1]/86400.0)); gain1:=st1.getcol('GAIN') sok1:=st1.getcol('SOLUTION_OK') st1.done(); st2:=t2.query( spaste('(ANTENNA1+1)==',ant) ) times2:=st2.getcol('TIME'); times2-:=(86400.0*floor(times2[1]/86400.0)); gain2:=st2.getcol('GAIN') sok2:=st2.getcol('SOLUTION_OK') st2.done(); tmin:=min([times1,times2])-1800; tmax:=max([times1,times2])+1800; pmin:=min([arg(gain1[1,1,spw,[sok1[spw,]]]),arg(gain2[1,1,spw,[sok2[spw,]]])])*180/pi - 10; pmax:=max([arg(gain1[1,1,spw,[sok1[spw,]]]),arg(gain2[1,1,spw,[sok2[spw,]]])])*180/pi + 10; mypg.clear(); mypg.env(tmin,tmax,pmin,pmax,0,0); mypg.sch(2.0); mypg.plotxy(times1[sok1[spw,]],arg(gain1[1,1,spw,[sok1[spw,]]])*180/pi, plotlines=F,ptsymbol=4,newplot=F) mypg.plotxy(times2[sok2[spw,]],arg(gain2[1,1,spw,[sok2[spw,]]])*180/pi, plotlines=F,ptsymbol=3,linecolor=3,newplot=F); t1.close(); t2.close();