Aips
Aips
Jayanti Prasad
Inter-University Centre for Astronomy & Astrophyics (IUCAA) Pune (India)
This short tutorial is meant to help beginners (including me !) to get started with the Astro-
nomical Image Processing System AI P S without knowing much of the physics or mathematics
behind (for that read my other notes). The goal of this tutorial is to introduce various AI P S tasks
which are used for flagging (editing the bad data), calibration and imaging. In order to use AI P S we
use the following sequence of tasks.
1. Set the environment:-
$export H=/data/aips/data/FITS/
$source ../aips/LOGIN.SH
This is done to specify the location from where the input files will be read and/or the output
files will be written. Note that the above is true only form the bash shell.
or
$aips tv
This will start AI P S and which we can stop (once we are done) using
>kleenx
The next task is to load a FITS file which is done using the next task
1
This task ”index” the UV data. Note that if you are facing any difficulty, run the command
”default” which will reset all the parameters for the task.
if we set optype ’LIST’, then the data will be presented in a matrix form.
This task will show all the data points which are above 50 and below 10.
2
Here ’TEMP.FLG’ is the external flag file which which follows some syntax.
10. Setting the flux of the primary calibrator i.e., fluxcal ( SETJY):-
>tget ’setjy’
>sources ’3C147’
>optype ’CALC’
> go
This task will write the flux of the flux calibrator in the SU table which can be checked by
the following command:
>inext ’SU’
>invers 1
>go prtab
12. Managing table ( INEXT):- Note that at any point of time the list of tables can be seen using
the follwing command
>imheader
Any table can be printed on the terminal using PRTAB. For example if we want to print
’SN’ table, we will use
> inext ’SN’
> inver 1
> go prtab
3
> inext ’SN’
> inver 1
> clrst
> go extdest
13. Finding the absolute values of fluxes for secondary calibrators ( GETJY):-
>tget ’getjy’
>calsour ’3C147’’
>sources ’0632+103’ ’3C172’
>inp
>go
Now check that all the calibrators got the flux values. Note that sources in the ’SETJY’
should be from the subset of calsources in ’CALIB’.
>inext ’SU’
>invers 1
> go prtab
Note that the sources given in GETJY should be from the subset of calsources given in
CALIB.
Note that here it is useful to specify all the sources because it will update the ’CL’ tables for
all. The calibration for any task like uvplt, imagr etc., can be invoked by giving DOCALIB
1 and gainuse 0 ( if it is not that). This will apply the highest version of the CL tables.
16. Gray scale plots ( GREYS)- We can label the image with coordinates and flux using the
following:
4
> tget greys
> getn 20
> go
17. Writing the image in a file ( TVCPS)- We can capture the TV screen shot and write the image
using the following:
> tget tvcps
> getn 1
> infile ’H:IMAGE.PIX’
> inp
> go
will subtract an image with cat 4 from a uv data set with cat 1 will write the resultant image
in the next cat.
This will average the uv data over 16 seconds and will make another uv file.
5
>task ’dbcon’
>getname 1
>getn2n 2
>outname ’TEST.FITS’
>go
Self calibration
After flagging and calibrating the data, it is time to do self calibration. The first step of self
calibration is to make a single source file from the mutisource file using the task ’SPLIT’.
1. Make a single source file:-
>tget ’split’
>getn 1
>source ’FIELD2’
>inp
>go
Note that niter 0, will provide an interactive window for carrying out various tasks. There
are at least three tasks which have to done. In order to chose an option, click on the button
and double hit A, B or C. The first thing which is generally done is to select ’TVFIDLE’
option and double hit A and move mouse around till there are just a few bright spots. Make
boxes around these bright spots selecting the option ’MAKEBOX’. Once you are done with
that, double hit ’D’ which will bring you back the main menu. Now select ’CLEAN’ option
from the main menu. Follow the suggestions pooping up on messenger window. Once you
are done with cleaning, you will have two new files, one a Clean component file (CC) and
another a dirty beam file. It is suggested to see the CC image file using the task ’TVLOAD’
and check its rms using tvstat which is using in the following way:
tvstat go
make a close contour on the screen using mouse and then hit ’A’ and ’C’. It will print the
image statistics on the terminal including rms. This is important to check at every cycle of
cleaning. Now you have a clean component which you can use to do self calibration.
6
3. Self-Calibrate using a Clean Component (CC):-
Self calibrating takes two input, one UV data file and another CC.
>task ’calib’
>getn 1
>get2n 4
>ncomp 81 0
>docalib -1
>doband -1
>refant 6
>solint 5
>aparm 3 0
>doflag -1
>soltype ’l1r’
>solmode ’p’
>inp
>go
Note that by setting ”docalib=-1” we are informing the CALIB that this is a self calibration.
This task will take some time and if successful then will create a new UV file. Now we can
create CC from the new UV file using imagr and run the loop: imagr-calib-imagr-calib, and
keep checking the rms of image after every cycle. If we find that rms is not changing (falling)
from one iteration to another we can stop self calibration.
Comments:-
• One of the common mistakes beginners do is that they do not clear the parameters before
running a task. In general by using ’default’ one can delete all the parameters of the last run.
To make sure that all the parameters for a task are correct use ’inp’ before running (typing
’go’) a task.
• The command ucat will print the catalogue of all the UV file in the aips.
• The command pcat will print the list of images with their catalogue numbers.
• Any data file or image file can be deleted using the following task;
• If you are running AIPS first type replace ’tget’ by ’task’ everywhere.
> getn 4
> zap
Note that if the status of the file is busy, we can use the following:
> getn 4
> clrst
> zap
If we want to delete all the file from catalogue number 1 to 9 we use the following:
7
• AI P S is case insensitive. You can use upper or lower case letters.
• You do not need to type full command. If there is no ambiguity AI P S will do the job. For
example in place of ’imheader’ only ’im’ will also work.
• To know all the commands starting from a letter enter ’TAB’ after that letter.
• If you are not sure about any task or parameter use ’help’ and ’explain’ options. For example
if you want to know more about the task ’calib’ use
> explain calib
or
> help calib
• If AI P S complains that the log file has become large clear that using
> clrmsg