Getting Started Documentation Glish Learn More Programming Contact Us
News FAQ
Search Home


next up previous contents home.gif
Next: Using the sortandselect module Up: A Guide to Synthesis processing in AIPS++ Previous: Using the imager module

Using the visset module

The visset module contains a number of functions for reading and writing MSes to and from Glish. A good way to check the data quality is to fill the MeasurementSet and plot the data:

An example glish session would be as follows:

glish -l visset.g
Glish version 2.5.0.11. 
defaultlogger available for use
defaultplotter ready for use 
table system ready for use 
- vs:=visset("MS")
successful read/write open of table  MS :  22 columns, 7669 rows
opened table MS
- vs        
[table=<function>, vis=<function>, uvw=<function>, time=<function>, 
flag=<function>, weight=<function>, open=<function>, close=<function>,
update=<function>, observedvis=<function>, residualvis=<function>, 
modelvis=<function>, correctedvis=<function>, summary=<function>, 
uvplot=<function>, plot=<function>] 
- vs.table().colnames()
UVW ANTENNA1 ANTENNA2 ARRAY_ID CORRELATOR_ID EXPOSURE FEED1 FEED2 
FIELD_ID FLAG_ROW INTERVAL OBSERVATION_ID PULSAR_BIN PULSAR_ID 
SCAN_NUMBER SPECTRAL_WINDOW_ID TIME WEIGHT DATA SIGMA WEIGHT_SPECTRUM FLAG 
- vs.uvw()::shape 
[3 7669]  
- vs.vis()::shape 
[4 1 7669]  
- vs.weight()::shape
7669 
- vs.table().getkeywords() 
[ANTENNA=./MS/ANTENNA, ARRAY=./MS/ARRAY, FEED=./MS/FEED,
FIELD=./MS/FIELD, OBSERVATION=./MS/OBSERVATION, OBS_LOG=./MS/OBS_LOG, 
SOURCE=./MS/SOURCE, SPECTRAL_WINDOW=./MS/SPECTRAL_WINDOW, 
SYSCAL=./MS/SYSCAL, WEATHER=./MS/WEATHER] 
- vs.statistics()
vs statistics:
Correlator 1 min, max : 26.3112 33.784 Jy
Correlator 2 min, max : 0.0874599 3.02536 Jy 
Correlator 3 min, max : 0.0260339 3.15053 Jy 
Correlator 4 min, max : 26.2426 33.8518 Jy 
min, max uv distance: 46.2691 3727.97 meters 
min, max time: 4.12163e+09 4.12164e+09 seconds 
- vs.plot()
T
- exit

Since the method visset.table allows access to the underlying table, one can use all the capabilities of the table system. For example, any of the columns in the table may also be retrieved using the getcol command:

sigma:=vs.table().getcol('SIGMA');

To set values, one may use the putcol command. For example, the following Glish commands load the SIGMA column, divide it by the square root of two, put the column back to the table, and then update the table on disk.

sigma:=vs.table().getcol('SIGMA');
sigma:/=sqrt(2.0);
vs.table().putcol('SIGMA', sigma);
vs.update();
vs.delete();

The table keywords are themselves tables that can be retrieved and examined:

antennatable:=table(vs.table().getkeyword("ANTENNA"));
antennatable.summary();
successful read/write open of table  ./MS/ANTENNA :  10 columns, 28 rows 
opened table ./MS/ANTENNA 
+ antennatable.summary()
Table summary: ./MS/ANTENNA 
Shape: 10 columns by 28 rows 
Info: [type=, subType=, readme=] 
Table keywords: [RDATE=4.12163e+09, GSTIA0=4.80108, DEGPDY=360.986, TIMSYS=IAT] 
Columns: 
OFFSET keywords: [UNIT=m, MEASURE_TYPE=POSITION, MEASURE_REFERENCE=] 
POSITION keywords: [UNIT=m, MEASURE_TYPE=MPOSITION, MEASURE_REFERENCE=ITRF] 
ANTENNA_ID keywords: [UNIT=, MEASURE_TYPE=] 
ARRAY_ID keywords: [UNIT=, MEASURE_TYPE=] 
DISH_DIAMETER keywords: [UNIT=m, MEASURE_TYPE=] 
MOUNT keywords: [UNIT=, MEASURE_TYPE=] 
NAME keywords: [UNIT=, MEASURE_TYPE=] 
ORBIT_ID keywords: [UNIT=, MEASURE_TYPE=] 
PHASED_ARRAY_ID keywords: [UNIT=, MEASURE_TYPE=] 
STATION keywords: [UNIT=, MEASURE_TYPE=] 
T 
- antennatable.getcol("NAME")      
VLA:W12  VLA:N18  VLA:N6   VLA:W6   VLA:N8   VLA:N12  VLA:E18  VLA:N10
VLA:W8   VLA:W18  VLA:OUT  VLA:W20  VLA:N16  VLA:E10  VLA:N2   VLA:E12
VLA:N4   VLA:E4   VLA:W14  VLA:W10  VLA:W16  VLA:E16  VLA:E8   VLA:E6
VLA:E14  VLA:E2   VLA:N14  VLA:W2   
- spwtable:=table(vs.table().getkeyword("SPECTRAL_WINDOW"));
- spwtable.getcol("CHAN_FREQ")
[1:1,]
    8.085e+09] 
-exit

One can also browse the table using a graphical browser:

include "table.g"
t:=table("MS");
t.browse();

Finally, visset allows interactive editing of visibility data using plot. This allows selection of points to be flagged from a plot that is updated interactively.

Thus to edit based upon the residuals:

vs:=visset('3C84.MS');
vs.getresidual();
ed:=vs.plot(corr=T,edit=T);
# Interactively make selection before this next command
ed.edit();
vs.update();
vs.delete();

Note that this assumes that the two columns MODEL_DATA and CORRECTED DATA are present. If not, these can be generated by using imager.


next up previous contents home.gif
Next: Using the sortandselect module Up: A Guide to Synthesis processing in AIPS++ Previous: Using the imager module   Contents
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2000-09-23