Date - 2000.09.05 Tester - S.T. Myers (AOC) Platform - Linux (kernow) Version - Stable (1.4 build 241) Note: bugs are denoted by lines with prefix: >>>BUG and queries are denoted by lines with prefix: >>>QUERY while comments are prefixed by: >>>COMMENT: ------------------------------------------------------------------------------- GOAL: Start working Greg's Cband data testing into a useable script. Start by following through Greg's script to get to the polarization calibration point. Data taken 24 Feb 2000 AIPS Results in /home/kernow/smyers/VLA/Pol/20000224/ From Greg's Original Directory: /home/pegaso/gbt/aips++/ Working Directory: /home/kernow/smyers/Testing/Feb2000/ First trying out the version Weekly (1.4 build 269) 1. Make ms = cband.ms from CALS00FEB.CEDT <== readfits.g 2. Try the Imagerwizard GUI. include 'imagerwizard.g" imagerwizard() <== Actually, started it up from the Tool Manager >>>BUG: When I clicked "Go" on the constructor a dialog box came up saying the scripter needed saving or dismissal. I clicked "Save" and it bombed glish: - "glishtk.g", line 118: warning, event glishtk.fail () dropped LocalExec::SetStatus: abnormal child termination for /home/cluster/aips++/weekly/linux_egcs/bin/glishtk [fatal error, 'segmentation violation' (signal 11), exiting] Segmentation fault (core dumped) It left an empty "scripter.log_8464" file also -> delete. OK - try this again but in stable (1.4 build 241): This seemst to start up OK (I will go back later and see if I can recreate the crash in weekly) - continue. 3. Imagerwizard continued -- step by step (1) set ms by spanner from catalog gui - send&dismiss + Next-> (2) choose first spectral window (IF 1) only + Next-> (3) choose polarization calibrator 0927+390 only + Next-> (4) starting imager (taking a long time) - set initial parameters cell size = 0.25 arcsec weighting = natural let it set the rest + apply + Next-> (5) note it comes up with User Choice dialog asking to stop or continue cleaning, but without display this is meaningless! Comes up with a display showing a blank field - something happened. I would have like to see a dirty map first. Cancel-> Abort (generated a screenload of red errors - I would hope an abort by the user would exit more gracefully!) I can't get glish to respond - will have to CNTL-C out! CNTL-C will not respond either, just hangs after "exit glish (y/n)? y" had to kill -9 it! >>>BUG: Generate bug report on this ==> Defect AOCso01739 Note: after filing bug(), I tried to remake the fitstoms but it hung also. But restarting the aips++ it worked. Odd. Summary - this looks promising as a linear way through the process. Will return to trying this later. 4. Make a dirty image of fieldid=1 using makedirty function: # # Function to make dirty map (stokes I) of measurement set = prefix.ms # (eg. cband.ms) # Output files named by prefix+qual (eg. cband.run1.*) # This will create and destroy its own imager object. # Returns glish record of map stats # # Version STM 2000.09.06 # function makedirty(prefix,qual,fldid,spid,cell_siz,imag_siz) { # Use imager to make large dirty image ms_name := spaste(prefix,".ms") imgr := imager(ms_name) imgr.setimage(cellx=cell_siz, celly=cell_siz, nx=imag_siz, ny=imag_siz, stokes='I', spwid=spid, fieldid=fldid) imgr.setdata(spwid=1, mode="none") imgr.weight('robust') imgr.uvrange() pre_name := spaste(prefix,qual) psf_name := spaste(pre_name,".psf") bmaj:=F; bmin:=F; bpa:=F; imgr.makeimage(type='psf',image=psf_name) imgr.fitpsf(psf=psf_name, bmaj=bmaj, bmin=bmin, bpa=bpa) img_name := spaste(pre_name,".dirty") imgr.makeimage(type='observed',image=img_name) imgr.close() imgr.done() # Get stats of dirty image img_stats := imagestats( img_name ) peak_flx := img_stats.flux peak_pix := img_stats.maxpos peak_dir := img_stats.direction img_rms := img_stats.rms print 'Peak in dirty image ',peak_flx,' Jy at ',dm.time(peak_dir.m0),dm.angle(peak_dir.m1),' at ',peak_pix print 'Map rms ',img_rms # return glish record of map stats return img_stats } # End of function makedirty.g # # Function to get image stats # Returns glish records with max, maxpos, maxdirec, rms # function imagestats( img_name ) { # Use image constructor to access dirty image and find peak im := image(img_name) # Search inner quarter regoff := im.shape()/2; regoff[3:4] := [1,1]; reglen := im.shape()/4; reglen[3:4] := [0,0]; reg_blc := regoff - reglen reg_trc := regoff + reglen; r := drm.box(blc=reg_blc,trc=reg_trc) im.statistics(statsout=img_stat,list=T,region=r) img_max := img_stat.maxpos img_dir := im.coordmeasures(pixel=img_max).direction img_flx := img_stat.max # Get rms noise level from an outer region regoff := im.shape()/4; regoff[3:4] := [1,1]; reglen := im.shape()/6; reglen[3:4] := [0,0]; reg_blc := regoff - reglen reg_trc := regoff + reglen; r := drm.box(blc=reg_blc,trc=reg_trc) im.statistics(statsout=noise_stat,list=T,region=r) img_rms := noise_stat.rms im.close() im.done() # Return glish record, with fluxes as quanta return [ flux=dq.quantity(img_flx,'Jy'), maxpos=img_max, direction=img_dir, rms=dq.quantity(img_rms,'Jy') ] } # End of function imagestats Invoke these include 'makedirty.g' include 'imagestats.g' stat_rec := makedirty(prefix='cband',qual='.run0',fldid=1,spid=1,cell_siz='0.25arcsec',imag_siz=256) Output: > Peak in dirty image [value=0.0346042924, unit=Jy] Jy at > 09:27:03.035 +039.02.20.852 at [128 129 1 1] > Map rms [value=0.00541110057, unit=Jy] print stat_rec; > [flux=[value=0.0346042924, unit=Jy], maxpos=[128 129 1 1] , > direction=[type=direction, refer=J2000, m1=[value=0.681361278, unit=rad], > m0=[unit=rad, value=2.47422495]], rms=[value=0.00541110057, unit=Jy]] This looks like what it should be for uncalibrated data. Note: this took about half a day as the name of one input parameter to a function was changed since I first wrote these functions in May :-( 5. Set flux of 0927+390 (fieldid=1) to 10.65 Jy as determined using AIPS and posted at http://www.aoc.nrao.edu/~smyers/calibration/C_band.html Set Q and U (and V) fluxes to 0.0 initially prefix := "cband" qual := ".run0" fldid := 1 spid := 1 cell_siz := '0.25arcsec' imag_siz := 256 ms_name := spaste(prefix,".ms") cal_flux := [10.65,0.0,0.0,0.0] imgr := imager(ms_name); ok := imgr.setjy(fieldid=fldid, spwid=spid, fluxdensity=cal_flux ); imgr.close() imgr.done() Create calibrater object calr := calibrater(ms_name); ok := calr.setdata(mode="none" , nchan=1, start=1, step=1, mstart=[value=0.0, unit="km/s" ], mstep=[value=0.0, unit="km/s" ], uvrange=0, msselect='field_id == 1'); sn_name := spaste(pre_name,".sn") ok := calr.setsolve(type="G" , t=60.0, phaseonly=F, table=sn_name , append=T); ok := calr.solve(); ok := calr.setapply(type="G" , t=0, table=sn_name , select='field_id == 1'); ok := calr.correct(); Got error message: LocalExec::SetStatus: abnormal child termination for /home/sneffels3/aips++/stable/linux_egcs/bin/calibrater Last messages on the logger were: Starting calibrater::correct Loading G table from cband.run0.sn Did CNTL-C to kill, got message: await terminated (file "servers.g", line 1016): await theagent->.run_result theagent->.error theagent->.fail See if things are still working. Try browsing the .sn table... nt := tablebrowser(sn_name) Just get blank table - are the calibrater tables different? Logger claims: successful readonly open of auto-locked table cband.run0.sn: 29 columns, 0 rows No rows in table! Try an oblique attack ta := table(sn_name) Still has no rows ... regroup and try calibration session again. 6. The whole procedure was repeated from scratch (see file 2000-09-06-myers.g). It terminated in the same manner as before. >>>BUG: Generate bug report on this ==> Defect AOCso01755 Attach script 2000-09-06-myers.g in DDTS End testing for now.