Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
D.M. Mehringer and The LAUGH Group7.1
David Mehringer, Ray Plante, and Anuj Sarma
This version of the BIMA AIPS++ Cookbook is a much abridged version of the full version which can be found at http://monet.ncsa.uiuc.edu/aips++/forBIMA/cook/cook.html. The abridged version essentially describes only BIMA-specific issues in AIPS++ while the full version has useful chapters on using AIPS++ in general. If you discover errors or have suggestions, please email them to dmehring@astro.uiuc.edu.
To start AIPS++, issue the following commands if you are using c shell:
> source /appl/aips++/stable/aipsinit.sh > aips++
or, if you are using bash shell:
> . /appl/aips++/stable/aipsinit.sh > aips++
There are two ways to exit from AIPS++:
exit
|
Hélène. R. Dickel
The Tool Manager window is used to create tools. Tools and global functions are organized first by Packages and then by Modules, as illustrated by the graphical lists that make up the Tool Manager. The mirfiller tool can be used to import Miriad visibility data into AIPS++.
In the BIMA Data Reduction section of the AIPS++ cookbook, we use a short hand for selecting tools and functions in the Tool Manager. It looks like this:
Package | Module | Tool | Constructor | |
bima | mirfiller | mirfiller | mirfiller | |
Don't understand this table? See § 7.2.1 |
Here's what it means:
Now that you have the constructor interface up, you need to enter values for its parameters. Here are two most important parameters you need to provide and what they mean:
Constructor: mirfiller | ||
Parameter | Sample Value | What it means |
toolname | mymirfiller | The name by which you want to refer to this tool; this is helpful when you want to refer to the tool from the Glish command line or if you have more than one tool of the same type. |
mirfile | 3c273 | The name of the Miriad dataset. |
In the BIMA Data Reduction section of the AIPS++ cookbook, a table like the one above is used to summarize the inputs you need to give to a function. Usually, only the most important parameters are listed; all others can be left to their default.
Most likely, the ``toolname'' parameter will already be set to ``mymirfiller;'' however, if you want to change it, move your cursor over the ``toolname'' input, erase its contents and type in the new value.
When all the parameters have been set, you can execute the constructor and create the mirfiller tool by clicking the green button labeled ``Create.''
When the constructor finishes its work, the GUI will morph again to show the interface to the tool's functions.
You can shut down a tool from its function view (where the functions appear in a list on the right; if you do not see this, press the ``mirfiller:mymirfiller" button along the top of the Tool Manager.
Now press the ``Done" button at the bottom, right hand corner of the window. The Tool Manager will morph back into its tool selection view. The ``mirfiller:mymirfiller" button is now gone.
Note that the ``Dismiss" button does not shut down the tool. It simply returns to the tool selection view. The ``mirfiller:mymirfiller" button would remain.
Ray Plante
Here's a summary of how to import your data it using the GUI:
Package | Module | Tool | Constructor | |
bima | mirfiller | mirfiller | mirfiller | |
Don't understand this table? See § 7.2.1 |
Constructor: mirfiller | ||
Parameter | Sample Value | What it means |
toolname | mymirfiller | The name by which you want to refer to this tool; this is helpful when you want to refer to the tool from the Glish command line or if you have more than one tool of the same type. |
mirfile | 3c273 | The name of the Miriad dataset. |
When you have filled in the above-mentioned values,
press Create.
Function: fill | ||
Parameter | Sample Value | What it means |
msfile | 3c273.ms | The name of the output measurement set to fill. |
verbose | True | Setting this to true will send messages on mirfiller's progress to the logger window. |
After filling in the above values,
press Go.
If you have the scripter running, you can just look the scripter window. You'll see exactly what was run by the GUI.
Note that AIPS++ will usually write Glish commands to the scripter in their most verbose form. Here's a more compact form:
include 'mirfiller.g' mymirfiller := mirfiller("3c273"); mymirfiller.fill("3c273.ms", verbose=T); mymirfiller.done();
Parameters left to their default values do not have to be included. Plus, if you give the parameter values in the order that they appear in the GUI (or the documentation), you don't have to give the parameter names.
Loading of FITS uv-data into AIPS++ can be done using the ms tool via its fitstoms constructor. Here a summary of how to import FITS data using the GUI:
Package | Module | Tool | Constructor | |
general | ms | ms | fitstoms | |
Don't understand this table? See § 7.2.1 |
Constructor: fitstoms | ||
Parameter | Sample Value | What it means |
toolname | myms | The name by which you want to refer to this tool. |
msfile | 3c273 | Name of the output AIPS++ measurement set to be created. |
fitsfile | 3C273.FITS | Name of your input UVFITS file. |
When you are done filling in the above inputs,
press Create.
The glish equivalent of the above procedure is the following:
include 'ms.g'; myms := fitstoms(msfile="3c273.ms", fitsfile="3C273.FITS"); myms.done();
David Fong
This section describes how one can inspect UV data by means of the following questions:
The imager tool contains the functions for imaging. If you wish to have a quick look at the uv-data before imaging, then follow these steps. If you wish examine the uv-data in greater detail, then use msplot (see § 7.4.3).
Package | Module | Tool | Constructor | |
synthesis | imager | imager | imager | |
Don't understand this table? See § 7.2.1 |
Constructor: Imager | ||
Parameter | Sample Value | What it means |
toolname | myimager | The name by which you want to refer to this tool; this is helpful when you want to refer to the tool from the Glish command line or if you have more than one tool of the same type. |
filename | cloud.ms | Name of the AIPS++ measurement set. |
When you are done filling in the above inputs,
press Create.
When the constructor is finished, the GUI will morph into the imager tool window.
msplotprovides more selection options for plotting uv-data. The GUI-based tool can make plots, displays or listings of various parts of an MS (see Reference manual: general.ms.msplot for a full description).
Package | Module | Tool | Constructor | |
general | ms | msplot | msplot | |
Don't understand this table? See § 7.2.1 |
Constructor: msplot | ||
Parameter | Sample Value | What it means |
toolname | mymsplot | The name by which you want to refer to this tool. |
msfile | cloud.ms | Name of the measurement set. |
edit | False | False option only allows inspection of the uv-data. |
True option allows interactive flagging of the uv-data. |
When you are done entering the above parameters,
press Create.
When the constructor is finished, a new msplot GUI window will start up.
Example 1: A common plot to make is X vs Y, where the X and Y axes can be time, UV-distance, amplitude, phase, etc.
For `Plot X vs Y', the X and Y axes to be plotted are chosen by selecting the options found under the menu bars on the second row labeled `X Axis' and `Y Axis'.
Example 2: Another common plot to create is the UV-coverage.
To individually plot the UV-coverage for each baseline:
The spectral parameters will be listed in the Logger window.
Anuj Sarma
This section will describe how to flag/edit your uv-data.
Flagging and editing of the uv-data can be done using the autoflag tool.
To use autoflag, go to the `Manager' view in the Tool Manager GUI and make the following selections:
Package | Module | Tool | Constructor | |
synthesis | autoflag | autoflag | autoflag | |
Don't understand this table? See § 7.2.1 |
Constructor: autoflag | ||
Parameter | Sample Value | What it means |
toolname | myautoflag | The name by which you want to refer to this tool; this is helpful when you want to refer to the tool from the Glish command line or if you have more than one tool of the same type. |
msname | bllac.ms | Name of the AIPS++ measurement set that you wish to flag. |
When you are done entering the above constructor parameters,
press Create.
The GUI will morph into the autoflag tool window when the constructor is
done.
When you are done filling in all the desired options in setselect,
press Go.
You will get the following view, go ahead and make the selections shown in the Sample Values:
Function: run | ||
Parameter | Sample Value | What it means |
globparm | [=] | Record of global method parameters. Leave at default. |
plotscr | F | Number of plots per window in flagging report. `F' means ``do not print this report.'' Default is to print report. |
plotdev | F | Number of plots per page in hardcopy flagging report. `F' means ``do not generate this report.'' |
devfile | Name of hardcopy report. Leave blank if you don't want hardcopy. (Default is flagreport.ps/ps.) | |
reset | False | Reset pre-existing flags. Pull-down menu. |
When you are done making the above selections for run,
press Go.
The data for `bllac.ms' are now flagged.
All the steps described in the last section can be done in glish.
Follow the steps below to flag your data using glish. The procedure followed is identical to that in the last section.
include 'autoflag.g'
af:=autoflag('bllac.ms')
af.setselect(ant=2, clip=[expr='ABS YY', min=0, max=25]);
Once you have run the above by hitting return, you should get the following list. Anything other than an `F' signifies that you chose to flag based on that criterion, and the value you used to determine how to flag (except for `dtime,' which is related to `timeslot' and has the value dtime=10 as default). For example, ant=2 because you set that in setselect above; similarly for clip.
spwid = F field = F fq = F chan = F corr = F *ant = 2 baseline = F timerng = F autocorr = F timeslot = F dtime = 10 quack = F *clip = [expr=ABS YY, min=0, max=25] flagrange = F unflag = F
af.run(plotscr=F, plotdev=F);
Two cautionary notes: Do not flag the target source data until
after the calibration has been done on the phase calibrator and the
calibration tables have been copied over to the target source (see
Chapter 7.6 on page ). Otherwise, the bimacalibrator
tool will exit with an error. This is due to a bug in the AIPS++ code
for heterogenous spectral windows, and is under investigation.
If you are flagging a calibrator, make sure you run the reavg
routine in bimams before you calibrate, so that the wideband data for
the calibrator are recalculated after the flags have been applied. This
procedure is described in § 7.5.4 below.
After flagging the calibrator data, you will have to re-generate the wideband data, in order to carry over the flags to the sideband averages. To do this, use the reavg routine in the bimams tool.
To use reavg go to the 'Manager' view in the Tool Manager GUI and make the following selections:
Package | Module | Tool | Constructor | |
bima | bimams | bimams | bimams | |
Don't understand this table? See § 7.2.1 |
Constructor: bimams | ||
Parameter | Sample Value | What it means |
toolname | mybimams | The name by which you want to refer to this tool; this is helpful when you want to refer to the tool from the Glish command line or if you have more than one tool of the same type. |
msname | bllac.ms | Name of the flagged AIPS++ phase calibrator measurement set for which you want to re-generate the wideband data. |
When you are done entering the above constructor parameters,
press Create.
The GUI will morph into the bimams tool window when the constructor
is finished.
Function: reavg | ||
Parameter | Sample Value | What it means |
out | Output dataset -- Leave blank. If left blank, it will modify the input dataset. | |
dosort | True | Sort data when doing subqueries. Pull-down menu. Default is True. Best bet is to leave at default. Set to False only if sure that data is already in order required by reavg. |
When you are done entering the above function parameters,
press Go.
The above procedure will re-generate the wideband data. You are now ready to calibrate the data.
The above procedure to re-generate the wideband data can be carried out in glish using the following:
include 'bimams.g'; mybimams:=bimams('bllac.ms'); mybimams.reavg(); mybimams.done();
Anuj Sarma
This section will answer the following questions concerning the calibration of your uv data:
[A work in progress. Future updates will include interactive editing
of gain tables, self-calibration, and bandpass correction.]
Calibration of BIMA data is done using the bimacalibrater tool. Before using this tool, make sure that the following steps have been completed.
Now, you are ready to start calibrating the data. Below, we describe the steps to calibrate BIMA data based on observations of a phase calibrator. In the example below, the phase calibrator is named ``bllac'' (hence the AIPS++ measurement set is bllac.ms) and the target source is named ``cepa.''
Go the the `Manager' view in the Tool Manager and make the following selections.
Package | Module | Tool | Constructor | |
bima | bimacalibrater | bimacalibrater | bimacalibrater | |
Don't understand this table? See § 7.2.1 |
Constructor: bimacalibrater | ||
Parameter | Sample Value | What it means |
toolname | mybimacalibrater | The name by which you want to refer to this tool; this is helpful when you want to refer to the tool from the Glish command line or if you have more than one tool of the same type. |
targets | cepa.ms | The name of the target source dataset. |
phcals | bllac.ms | The name of the phase calibrator dataset. |
pbcals | The name of the passband calibrator -- leave blank. | |
fcals | The name of the flux calibrator -- leave blank. | |
targetnames | narrow | Your nickname for the target source. |
phcalnames | wide | Your nickname for the phase calibrator. |
When you are done entering the above parameters,
press Create.
The GUI will morph into the bimacalibrater tool window when the
constructor is done.
Function: setjy | ||
Parameter | Sample Value | What it means |
sources | wide | Phase calibrator nickname. |
fluxdensity | [1,0,0,0] | Flux density for the phase calibrator in Jy. For now, you have to fill in this value by yourself, e.g., we have filled in a value of 1.0 for the I-flux. A routine to get this value automatically from a calibrator table is under development. |
When you are done filling in all the desired options in setjy,
press Go.
Function: setsolve | ||
Parameter | Sample Value | What it means |
sources | wide | Phase calibrator nickname. |
type | G | Component type = G-Jones. This is a pull-down menu. |
t | 600 | Solution interval in seconds. |
phaseonly | True | Only solve for phases. Pull-down menu. |
refant | 2 | Reference antenna. Note bimacalibrater has 1-based numbering, so antenna 2 means antenna 2, not antenna 3. |
table | gcal | Output calibration table name. |
When you are done filling in all the desired options in setsolve,
press Go.
Function: solve | ||
Parameter | Sample Value | What it means |
sources | wide | Phase calibrator nickname. |
press Go.
Function: transfer | ||
Parameter | Sample Value | What it means |
outtable | gcal.xfer | Output table in which to write calibration solutions. |
intable | gcal | Input table generated by solve step. |
spwmap | [ ] | Array describing the spectral window mapping from input window to output window. Should be able to leave at default. The function is intelligent enough to figure out how spectral windows need to be mapped from input to output. |
calibratees | narrow | Nicknames of sources to which the solutions will be applied, e.g., if you have more than one source, you can include them all here with their given nicknames (or roles, e.g., targets). If you specify more than one source here, then all must have the same spectral window configuration, otherwise run transfer multiple times. |
When you are done setting the above inputs,
press Go.
Function: setapply | ||
Parameter | Sample Value | What it means |
sources | narrow | Target source nickname. |
type | G | Component type = G-Jones; pull-down menu. |
t | 0.0 | Interpolation interval in seconds. Leave at default (0.0). |
table | gcal.xfer | Input calibration table. Should be the output table given by transfer. |
select | Leave at default, which is blank. |
When you are done setting the above inputs,
press Go.
Function: correct | ||
Parameter | Sample Value | What it means |
sources | narrow | Nicknames of target source(s) where calibration components are to be applied. |
press Go.
The calibration is now done. Remember, you must flag the target source data after calibration and before imaging (meaning now, see Chapter 7.5) -- this will continue to be the procedure until the bug in AIPS++ is removed.
All the steps described in the last section can be done in glish. First, make sure you are in the glish environment (which is started by typing ``glish'' at the command line prompt) and that you have loaded the data into AIPS++, flagged only the phase calibrator data, and regenerated the wideband data for the flagged phase calibrator, as described in the last section.
RefAnt := 2; IntTime := 600;
include 'bimacalibrater.g';
bc := bimacalibrater(targets='cepa.ms',targetnames='narrow', phcals='bllac.ms', phcalnames='wide');
bc.setjy(fluxdensity=[1.0,0,0,0]);
bc.setsolve(type='G',refant=RefAnt,table='gcal',t=IntTime,phaseonly=T);
bc.solve();
bc.transfer(outtable='gcal.xfer',intable='gcal');
bc.setapply();
bc.correct();
bc.done();