Testing - NGC 7538 regression script DSS - 22feb07 ----------------------------------------------------------------------- Summary of issues: - In listobs summary, does ArrayID = 0 = D array? This should be explained somewhere in the cookbook and/or in-line help. Note, what will E array ArrayID be if we ever get it? -1? - In datasets where spwid 1 = RR and spwid 2 = LL, if I set one of the axes to be pol or spwid, I see only one, not both. But I want to see all polarizations and sp windows, not just one. So, for this dataset, the spwid or pol slider should be disabled to see both pols and spwids at the same time. - When plotting channel vs. baseline, I would like the ability to average over time. Thus, if I have a strong line, I might be able to see it in a plot of channel vs baseline in which time is averaged. Further, if I only see the line on short baselines, this tells me something about how extended the structure is. - table lock occurs in the viewer (sent info to David) tb.clearlocks() # smashes all locks and allows tools to proceed. - plotcal(tablein='ap314.gcal',multiplot=true,plotsymbol='-.ro') # plotsymbol failed even though this was an example in the help. SEVERE plotcal::setplotsymplols (file /home/ballista/casa/daily/code/calibration/implement/CalTables/PlotCal.cc, line 1336): Couldnot understand color: 45. it has to be one of k r g b c y - plotcal(tablein='ap314.gcal',multiplot=false,plotsymbol='r,') There is a different color for each ant? So what does plotsymbol do? # plotsymbol appears to be broken. # also, there are no axis labels or title on the plot, just little dashes. - plotcal(tablein='ap314.gcal',multiplot=false, caldescid=0) what is the Calibrater data description ID (combination of SPW and polarization)? Examples of -1 (all) and 0 don't help. I can't find additional information in the cookbook, user ref man doesn't have this parameter. No description on the plot or in the logger, or in the python command window what the different caldescid's are either. - plotcal(tablein='ap314.gcal',multiplot=false) # I need a locate function here too so I can identify what data is associated with a bad solution. - in plotcal, why are solutions found and displayed for flagged data? Or, at least, this appears to be what is happening. Flagged data should not have a gain solution (or at least, don't display it). - in plotcal, on the right side of the plot, give the color coding for the different antennas. - I'd like an overplot keyword with plotcal so, if I make 2 different solutions, I can compare them. This assumes that I can make one solution red, and the other black so I can tell the difference between the solutions. - plotxy: # good, nice to have the plots remain on the screen after I hit 's' - plotxy: Note: plotxy only shows antenna name on the plotter window but then you can only select to plot a specific antenna via its ID. So you have to use the summary to figure out the mapping. Dach. Make this consistent. - seg faults when I try to plot the 2nd field in the dataset. both plot/flagxy work OK when plotting the first field. example segfault for plotxy (daily, afternoon, 22feb after new build) plotxy(vis='ngc7538.ms', xaxis='uvdist', yaxis='amp', datacolumn='data', field='222', correlations='RR LL', nchan=1, start=5,width=55, spwid=[0,1], plotsymbol = ',', multicolor=true) # Failed on selection: combination of spw and/or field and/or time # chosen may be invalid --- Segmentation fault (core dumped) # this should have been valid, there are 63 channels - I want to average 55 channels example segfault for flagxy (daily, afternoon, 22feb after new build) flagxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='22', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=22) # SEVERE SubMS::makeSubMS() (file # /home/ballista/casa/daily/code/msvis/implement/MSVis/SubMS.cc, line # 270): # Failed on selection: combination of spw and/or field and/or time # chosen may be invalid # Segmentation fault (core dumped) There is an antennaid 22, This is repeatable when I try to plot the 2nd source in this dataset (2229+695). - I'm not sure why antenna id13 cal solutions have dropouts - maybe the phases are off even though the amps look mostly OK. The source is so weak that the phases do not track well so you can't really tell if there is a problem until after the cal solutions are applied. The bad data are not obvious when doing the regression script because solutions are not examined closely. Also, the flux cal (where the largest fraction of bad data are located) is not corrected and split out so it is not as easy to find. In any event, it appears that this regression script should delete antenna 13 or do some careful editing of source and cal data to make sure that these bad solutions are not propagated through to the final image. Its probably OK to just delete antenna 13 all together. - In the viewer: I need an unzoom button, I don't like to have to create a little box and then click outside of that box several times to get the image to unzoom. - I need to get statistics of a specific region within an image or image cube (e.g. on source or off source). How do I do this if I don't have an interactive stats interface? I can get total image plane stats with: ia.open('2229.image') statistics=ia.statistics() print 'image max = ',statistics['max'][0] # image max = 0.375307559967 print 'image rms = ',statistics['rms'][0] # image rms = 0.0075194593519 This is a pain but it works. But I can't figure out how to get the image rms in a region with no source. This is a problem. - update button in the viewer doesn't work. Nothing happens... - the ngc7538 regression script says that it is imaging continuum emission in the source but no continuum subtraction is done in the script... - viewer: I can't find any way to plot the beam shape on the image - is this hidden somewhere? It is important to be able to see the resolution of the image in the corner. - I tried to use the image profile tool in the viewer - the graph comes up, the pointer allows me to click on a point, but nothing is plotted. - the ngc7538 regression script does not have good imaging. You avoid the problem that you can't make decent deconvolution regions by convolving the image with a 12" gaussian and creating a monster image with 13" resolution instead of a decent science image with 3" resolution. This is cheating. Do you really think this is a valid approach? I don't. ----------------------------------------------------------------------- ----------------------------------------------------------------------- ----------------------------------------------------------------------- Actual detailed test notes: alias casadaily 'source /home/ballista/casa/daily/casainit.csh; casapy' casadaily # take main pieces of the regression script, run them, then modify them, do manual flagging and visualization, etc... import os datapath=os.environ.get('AIPSPATH')+'/data/regression/ATST1/NGC7538/' importvla(archivefiles=[datapath+'AP314_A950519.xp1', datapath+'AP314_A950519.xp2',datapath+'AP314_A950519.xp3'], vis='ngc7538.ms',bandname='K',freqtol=10000000.0) flagautocorr('ngc7538.ms') listobs('ngc7538.ms', verbose=true) full summary in 0.summary.txt Fields: 6 ID Name Right Ascension Declination Epoch 0 1328+307 13:31:08.29 +30.30.33.04 J2000 1 2229+695 22:30:36.48 +69.46.28.00 J2000 2 NGC7538C 23:14:02.48 +61.27.14.86 J2000 3 NGC7538D 23:13:43.82 +61.27.00.18 J2000 4 NGC7538E 23:13:34.64 +61.27.26.44 J2000 5 NGC7538F 23:13:35.76 +61.28.33.66 J2000 Thu Feb 22 17:15:13 2007 NORMAL ms::summary: Spectral Windows: (2 unique spectral windows and 2 unique polarization setups) SpwID #Chans Frame Ch1(MHz) Resoln(kHz) TotBW(kHz) Ref(MHz) Corrs 0 63 TOPO 23691.4682 118.164062 6152.34375 23694.4955 RR 1 63 TOPO 23719.6063 118.164062 6152.34375 23722.6336 LL - does ArrayID = 0 = D array? This should be explained somewhere in the cookbook and/or in-line help. Note, what will E array ArrayID be if we ever get it? -1? viewer # bring in ngc7538.ms, this has already been edited... The first source is 1328+307 (J2000 = 1331+305 = 3c286) This has been completely flagged. There is nothing left... So how can this be flux calibrated? (user misunderstanding with how the Viewer worked - see below). plotting y=channel, x=time looked at phase, then changed back to amp. zoomed in on just the 1328+307 area, changed the spwid from 0,1 to 0 Sorting... Thu Feb 22 17:31:44 2007 NORMAL : Process 19176: waiting for write-lock on file /home/sola/dss/casa.testing/casa/regression/ngc7538/ngc7538.ms/table.lock why on earth is there a table lock now? dell ngc7538.ms/table.lock now the viewer is hung, I guess it is not able to handle deleting the table lock while it is waiting for it... Exit and restart What does setjy do when all data in this setjy('ngc7538.ms',fieldid=0) #set flux density for 1331+305 (3C286) # 1328+307 spwid= 0 [I=2.413, Q=0, U=0, V=0] Jy, (Perley-Taylor 99) # 1328+307 spwid= 1 [I=2.411, Q=0, U=0, V=0] Jy, (Perley-Taylor 99) # there is absolutely no indication that all data for this source is flagged. There should be. Retrieve the original VLA archive files and put in ../Data: AP314_A950519.xp1, AP314_A950519.xp2, AP314_A950519.xp3 importvla(archivefiles=['../Data/AP314_A950519.xp1', '../Data/AP314_A950519.xp2','../Data/AP314_A950519.xp3'], vis='ngc7538.2.ms',bandname='K',freqtol=10000000.0) flagautocorr('ngc7538.2.ms') listobs('ngc7538.2.ms', verbose=true) viewer OK, data was apparently flagged on-line. Time vs. baseline shows only ant 0 is completely flagged. The problem is that time vs channel shows only the first integration for the first ant = 0! - so it looks like everything is flagged. Setting the amimation axis to 'Baseline' allows viewing of all baselines. Changed to x=baseline, y=channel, animate=time x=pol, y=time shows I only have pol = 0 (RR), viewer says there is no data in LL pol 1. x=spwid, y=time shows I only have spwid 1 when I change the polarization slider in the adjust panel, then spwid 0 shows up. Apparently, the slider in the adjust sub-panel "Display Axes" overrules the desire to see both polarizations or spwids. The problem is, I guess, that spwid 1 = RR and spwid 2 = LL. But, if I set one of the axes to be pol or spwid, I want to see all polarizations and sp windows, not just one. So, for this dataset, the spwid or pol slider should be disabled to see both pols and spwids at the same time. ------------------------------- now that i know all is ok with the data, delete ngc7538.2.ms and just go with the original one. gaincal('ngc7538.ms','ap314.gcal',mode='channel',nchan=55,start=2, msselect='FIELD_ID <= 1',tau=0.08,solint=0.,refant='19') plotcal(tablein='ap314.gcal',multiplot=true,plotsymbol='-.ro') # plotsymbol failed even though this was an example in the help. SEVERE plotcal::setplotsymplols (file /home/ballista/casa/daily/code/calibration/implement/CalTables/PlotCal.cc, line 1336): Couldnot understand color: 45. it has to be one of k r g b c y mp.clearplot restore() plotcal(tablein='ap314.gcal',multiplot=false,plotsymbol='r,') There is a different color for each ant? So what does plotsymbol do? # plotsymbol appears to be broken. # also, there are no axis labels or title on the plot, just little dashes. plotcal(tablein='ap314.gcal',multiplot=false) # I need a locate function here too so I can identify what data is associated with a bad solution. plotcal(tablein='ap314.gcal',multiplot=false, caldescid=0) # what is the Calibrater data description ID (combination of SPW and polarization)? Examples of -1 (all) and 0 don't help. I can't find additional information in the cookbook, app user ref man doesn't have this parameter. No description on the plot or in the logger, or in the python command window about what the different caldescid's are either. # also, something is zero - looks like it might be a bad/flagged antenna but I can't tell. # on the right side of the plot, give the color coding for the different antennas, this would help. # good msselect in-line help. # exited and restarted with new daily build. mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='uvdist', yaxis='amp', datacolumn='data', field='1328', correlations='RR LL', spwid=[0,1], plotsymbol = ',', multicolor=true) # no problem with the source being resolved. Let's pretend there is. Use no refant. Alter other inputs slightly mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='uvdist', yaxis='amp', datacolumn='data', field='222', correlations='RR LL', spwid=[0,1], plotsymbol = ',', multicolor=true) plotxy(vis='ngc7538.ms', xaxis='uvdist', yaxis='amp', datacolumn='data', field='222', correlations='RR LL', nchan=1, start=5,width=55, spwid=[0,1], plotsymbol = ',', multicolor=true) # Failed on selection: combination of spw and/or field and/or time # chosen may be invalid --- Segmentation fault (core dumped) # this should have been valid - I want to average 55 channels so I can see the data easier and it plots faster... restore() gaincal('ngc7538.ms','ap314.gcal2',mode='channel',nchan=50,start=5, msselect='FIELD_ID==0',tau=0.0001,opacity=false,solint=0., uvrange=[0,600],append=false) restore() gaincal('ngc7538.ms','ap314.gcal2',mode='channel',nchan=50,start=5, msselect='FIELD_ID==1',tau=0.0001,opacity=false,solint=0., uvrange=[0,1100],append=true) mp.clearplot restore() plotcal(tablein='ap314.gcal',multiplot=false,subplot=211) plotcal(tablein='ap314.gcal2',multiplot=false,subplot=212) # darn, I want to compare these 2 solutions, no overplot is available and the subplot erases the previous plot. I guess that the only way I can compare these 2 solutions is to print them out, line up the paper and look at the solutions against the light. Dach. mp.clearplot restore() plotcal(tablein='ap314.gcal',multiplot=false) plotcal(tablein='ap314.gcal2',multiplot=false) # The solutions are slightly different amplitude in the flux cal. rest looks the same. # script: bandpass('ngc7538.ms','1328.bcal',msselect='FIELD_ID==0',tau=0.08, gaintable='ap314.gcal',nchan=0,start=0,mode='none',refant='19') # my variation: restore() bandpass('ngc7538.ms','1328.bcal2',msselect='FIELD_ID==0',tau=0.0001, opacity=false,gaintable='ap314.gcal2',nchan=63,start=0, mode='none',solint=50000.) mp.clearplot restore() plotcal(tablein='1328.bcal',multiplot=false) plotcal(tablein='1328.bcal2',multiplot=false) # different scaling and slightly different solutions but same general shape. # script: fluxscale('ngc7538.ms',caltable='ap314.gcal',fluxtable='ap314.fluxcal', reference=['1328+307'],transfer=['2229+695']) # my variation: fluxscale('ngc7538.ms',caltable='ap314.gcal2',fluxtable='ap314.fluxcal2', reference=['1328+307'],transfer=['2229+695']) mp.clearplot restore() plotcal(tablein='ap314.fluxcal',multiplot=false) plotcal(tablein='ap314.fluxcal2',multiplot=false) # scaling looks for both (as I would expect, only slight differences). # script: correct('ngc7538.ms',msselect='FIELD_ID IN [1,2,3,4,5]',tau=0.08, gaintable='ap314.fluxcal',gainselect='FIELD_ID==1', bptable='1328.bcal') # I want to see the corrected data for the flux cal also: correct('ngc7538.ms',msselect='FIELD_ID IN [0]',tau=0.08, gaintable='ap314.fluxcal',gainselect='FIELD_ID==0', bptable='1328.bcal') mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13', correlations='RR LL', spwid=[0,1], plotsymbol = ',', multicolor=true) # humm, corrected amps are supposed to be around 2.4 Jy corrected amps are between 0 and 400. end channels are messing things up. plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13', correlations='RR LL', nchan=1,start=2,width=50, spwid=[0,1], plotsymbol = ',', multicolor=true) # only plotting green now... mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13', correlations='RR', nchan=1,start=5,width=55, spwid=[0], plotsymbol = 'r,') plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13', correlations='RR', nchan=1,start=5,width=55, spwid=[1], plotsymbol = 'k,', overplot=true) mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13', correlations='LL', nchan=1,start=5,width=55, spwid=[0], plotsymbol = 'r,') plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13', correlations='LL', nchan=1,start=5,width=55, spwid=[1], plotsymbol = 'k,', overplot=true) # There is some data in the first 2min that is high by a factor of 2. Darn. Not sure what went wrong in the calibration. Maybe an antenna was bad at the start of the run? mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', iteration='antenna1') # antenna name 22 gain solutions are bad at the beginning... How can I tell? name a22 = id a13 according to the summary. # good, nice to have the plots remain on the screen after I hit 's' plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='data', field='13', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', iteration='antenna1') mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='data', field='13', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=13) # amps look OK, 2nd integration is low but otherwise OK. plotxy(vis='ngc7538.ms', xaxis='time', yaxis='phase', datacolumn='data', field='13', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=13) # can't tell if there is anything wrong with the phase. mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=13) # amps now high except for 2nd integration which now looks like it is scaled correctly. Its as if the low value made the scaling of the surrounding values skewed. This makes me suspect the calibrator. # import the 2 plots and the cal solutions and talk to George import 1.1328.corrected.ps import 1.1328.data.ps mp.clearplot restore() plotcal(tablein='ap314.fluxcal',antennaid=13) # gain solutions are low for the flux calibrator on ant 13 they also drop out occasionally on the gain cal suggesting there is bad data in there (I can't see it separately when I use solint=0 since I only get one gain solution). import 1.1328.cal.solns.ps restore() gaincal('ngc7538.ms','ap314.gcal3',mode='channel',nchan=55,start=2, msselect='FIELD_ID <= 1',tau=0.08,solint=30.,refant='19') mp.clearplot restore() plotcal(tablein='ap314.gcal3',antennaid=13) # indeed, the 2nd and 3rd integrations dropped out. There is also a drop out in one of the gcals and some missing data. plotcal(tablein='ap314.gcal3',antennaid=5) # flux cal solutions are split in amp. # going through antennaid, I find several regions with missing solutions. I'm going to have to delete source data if cal is not corrected... . mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13 22', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=22) # use locate to make sure high points are ant13: mp.clearplot restore() flagxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13 22', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=13) # yes, it is ant 13 that is bad at first. # field name 2229 is not being displayed even though it says it will be. mp.clearplot restore() flagxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='22', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=22) # SEVERE SubMS::makeSubMS() (file # /home/ballista/casa/daily/code/msvis/implement/MSVis/SubMS.cc, line # 270): # Failed on selection: combination of spw and/or field and/or time # chosen may be invalid # Segmentation fault (core dumped) There is an antennaid 22, not sure why the seg fault. even if there is no data for ant id22 for field 2229, it should not seg fault. mp.clearplot restore() flagxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='22', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=13) # still only field 13 is being displayed. What goes? inp flagxy shows fields 13 and 22... restore() # worked. flagxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='22', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=13) # Failed on selection: combination of spw and/or field and/or time # chosen may be invalid # Segmentation fault (core dumped) # plotxy/flagxy appears to still be too unstable to use effectively. I can't get the 2nd source to plot but I need to see the corrected data because there are some dropouts in the cal solutions on ant id13 and I need to find them. mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='22', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=13) plotcal(tablein='ap314.gcal',antennaid=5) Note: plotxy only shows antenna name on the plotter window but then you can only select to plot a specific antenna via its ID. So you have to use the summary to figure out the mapping. Dach. Make this consistent. - I'm not sure why antenna id13 cal solutions have dropouts - maybe the phases are off even though the amps look mostly OK. The source is so weak that the phases do not track well so you can't really tell if there is a problem until after the cal solutions are applied. The bad data are not obvious when doing the regression script because solutions are not examined closely. Also, the flux cal (where the largest fraction of bad data are located) is not corrected and split out so it is not as easy to find. In any event, it appears that this regression script should delete antenna 13 or do some careful editing of source and cal data to make sure that these bad solutions are not propagated through to the final image. Its probably OK to just delete antenna 13 all together. restore() flagdata(vis='ngc7538.ms', antennaid=13) # 0%....10....20....30....40....50....60....70....80....90....100% mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13 22', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,', antennaid=13) # good, nothing plotted, no seg faults. mp.clearplot restore() plotxy(vis='ngc7538.ms', xaxis='time', yaxis='amp', datacolumn='corrected', field='13 22', correlations='RR LL', nchan=1,start=5,width=55, spwid=[0,1], plotsymbol = 'r,') # still only field 1328 is plotting but ant 13 bad data is gone. # use viewer to make sure all of ant 13 is gone: viewer Darn, looks like a table lock problem... tb.clearlocks() Darn, antenna 13 for the gcal is not flagged - all other fields are. What goes? Not sure if this was a user error or a real problem. # used viewer to remove all of ant 13... ------------------ # odd, the script splits out the model data column, not the corrected data for the flux cal (well, it wasn't corrected...): split('ngc7538.ms','ngc7538_cal.split.ms',fieldid=0,spwid=0, nchan=62,start=0,step=1,datacolumn='MODEL_DATA') # don't do this, split out the corrected data column for the flux cal, both spwids: restore() split('ngc7538.ms','split.1328.ms',fieldid=0,spwid=[0,1], nchan=62,start=0,step=1,datacolumn='CORRECTED_DATA') restore() split('ngc7538.ms','split.2229.ms',fieldid=1,spwid=[0,1], nchan=62,start=0,step=1,datacolumn='CORRECTED_DATA') restore() split('ngc7538.ms','split.n7538.ms',fieldid=[2,3,4,5],spwid=[0,1], nchan=62,start=0,step=1,datacolumn='CORRECTED_DATA') restore() split('ngc7538.ms','split.ngc7538d.line.ms',fieldid=3,spwid=[0,1], nchan=55,start=2,step=1,datacolumn='CORRECTED_DATA') ------------------ # make single clean image of the gcal, no mask...: clean(vis='split.2229.ms',imagename='2229',mode='mfs',alg='hogbom', niter=6000,gain=0.1,threshold=8.,mask='', nchan=1,start=3,step=55, fieldid=0,spwid=[0,1], imsize=[256,256],cell=[0.5,0.5], weighting='briggs',rmode='norm',robust=0.5) viewer # looks pretty, very round and bright... # viewer doesn't have a stats tool yet. ia.open('2229.image') statistics=ia.statistics() # This is what is in the script but it doesn't work here: 2229_immax=statistics['max'][0] 2229_immax=statistics['max'][0] ^ : invalid syntax # this works: print 'image max = ',statistics['max'][0] image max = 0.375307559967 print 'image rms = ',statistics['rms'][0] image rms = 0.0075194593519 But I can't figure out how to get the image rms in a region with no source. This is a problem. ia.close() - I need an unzoom button, I don't like to have to create a little box and then click outside of that box several times to get the image to unzoom. --------------- clean(vis='split.1328.ms',imagename='1328',mode='channel',alg='hogbom', niter=6000,gain=0.1,threshold=8.,mask='', nchan=1,start=3,step=55, fieldid=1,spwid=[0,1], imsize=[256,256],cell=[0.5,0.5], weighting='briggs',rmode='norm',robust=0.5) - update button in the viewer doesn't work. Nothing happens... viewer # again, looks pretty. ia.open('1328.image') statistics=ia.statistics() print 'image max = ',statistics['max'][0] # image max = 2.42999839783 print 'image rms = ',statistics['rms'][0] # image rms = 0.0518140010536 ia.close() # the script says that it is imaging continuum emission in the source but no continuum subtraction is done in the script... --------------- fieldid 3 in the ms was the only one with the line emission. spwid = 0 should be the NH3 line at 23.6914682 GHz This would be field 1 in the split data cube: primary beam at K band is 2' = 120" synthesized beam is about 2.8" # no way to plot the beam in the viewer. Dach. Major missing piece of functionality. restore() clean(vis='split.n7538.ms',imagename='n7538',mode='channel',alg='hogbom', niter=6000,gain=0.1,threshold=30.,mask='', nchan=55,start=3,step=1, fieldid=1,spwid=[0], imsize=[256,256],cell=[1.,1.], weighting='briggs',rmode='norm',robust=0.5) viewer # Not being able to set a decent mask is slowing this down a bit. # beam: 2.81309 by 2.69509 (arcsec) at pa 72.5017 (deg) # I see a continuum source and some line emission. OK, like I expect. restore() clean(vis='split.n7538.ms',imagename='n7538-2',mode='channel',alg='hogbom', niter=6000,gain=0.1,threshold=30.,mask='', nchan=55,start=3,step=1, fieldid=1,spwid=[0], imsize=[256,256],cell=[1.,1.], weighting='briggs',rmode='norm',robust=2.) viewer # better but not great. the lack of a deconvolution mask is really limiting what this image should be. I bet this is why the regression script convolves this with a 12" gaussian: restore() clean(vis='split.n7538.ms',imagename='n7538-3',mode='channel',alg='hogbom', niter=6000,gain=0.1,threshold=30.,mask='', nchan=55,start=3,step=1, fieldid=1,spwid=[0], imsize=[128,128],cell=[4.,4.], weighting='briggs',rmode='norm',robust=2., uvfilter=True,uvfilterbmaj=12.,uvfilterbmin=12.) # beam: 13.2055 by 12.5928 (arcsec) at pa -2.37647 (deg) viewer # what a crappy image. ia.open('n7538-3.image') statistics=ia.statistics() print 'image max = ',statistics['max'][0] # image max = 0.260399073362 print 'image rms = ',statistics['rms'][0] # image rms = 0.0134627046064 ia.close() Compare with regression script: #image max = 0.25892 #image rms = 0.01266 There are differences in the image & data, my image compares reasonably well with the script result. I tried to use the image profile tool - the graph comes up, the pointer allows me to click on a point, but nothing is plotted. ----------------------- ---------------------------------------------- --------------------------------------------------------------------- Run the regression script in a separate directory to see what it gets: execfile 'ngc7538_regression.py' viewer tb.clearlocks() * Passed src max amplitude test * * Src max amp 18.3927268982 * Passed image max test * * Image max 0.258950263262 * Passed image rms test * * Image rms 0.0127316452563 try exactly what the script did, looks odd, cell is way too big. : clean('split.ngc7538d.line.ms','ngc7538d.cube','channel','hogbom', niter=5000,gain=0.1,threshold=30.,mask='', nchan=48,start=2,step=1,fieldid=0,spwid=0, imsize=[128,128],cell=[4.,4.], weighting='briggs',rmode='norm',robust=2., uvfilter=True,uvfilterbmaj=12.,uvfilterbmin=12.) # beam: 13.2054 by 12.5928 (arcsec) at pa -2.37727 (deg) # OK, continuum and source is there. not a good science image for expected beam size and primary beam... # OK, continuum and source is there. not a good science image for expected beam size and primary beam... The uvfilter application is not reasonable. Why convolve this with a 12" gaussian? Ah, because you can't get even a semi-decent image without it... Dach. ------------------------------------------------------------------------- End testing for the day and for this source.