Reading Visibility FITS Files

For visibility data, the current version of fits can cope with both single- and multi-source files, with single or multiple antenna configurations (earlier versions of fits were more limited). Flagging (FG) tables are copied (if present), but the flagging specified by these tables is not performed. An additional Miriad task, fgflag (see Section 10.2), must be invoked to apply the flagging tables. Task fits does not read or use AIPS calibration tables (SN, CL, BP, and BL). Consequently if you want to preserve your AIPS calibration, you will need to apply the relevant tables with AIPS SPLIT before writing the FITS file.

fits can handle linearly and circularly polarized correlations, as well as correlations that have been converted to Stokes parameters. In addition, it knows that the ATCA produces linearly polarized data. Because AIPS does not handle linear polarizations well, it is common practice to label the linear polarizations of ATCA data as if they were circular. If fits finds data from the ATCA which is nominally circularly polarized, it issues a warning, and relabels the correlations as linearly polarized.

Alternately, you could correct the polarization labelling explicitly within AIPS by changing the reference value of the Stokes axis to -5. Do this with PUTHEAD. It is necessary to do this after SPLIT because it puts them back to circulars !

AIPS/PUTHEAD
keyword = 'crval2' Select the Stokes axis
keyvalue=-5 Change to -5 (XX)

By default the AIPS task to write FITS files, FITTP, writes to the directory /DATA/FITS. This directory has a time-destroy limit of 1 day. Alternately you can set up an environment variable to direct FITTP to write the FITS file to any directory. For example, after setting the environment variable MYAREA with the UNIX command

       % setenv MYAREA /DATA/ATLAS_1/miriad/rsault
you can direct FITTP to write into this directory, by setting the OUTFILE adverb appropriately. For example:
       > OUTFILE = 'MYAREA:MYUV.FITS'
will direct FITTP to write a FITS file MYUV.FITS in /DATA/ATLAS_1/miriad/rsault.

A quick way to set an environment variable to the current working directory is with the pwd command:

       % setenv MYAREA `pwd`

Note that the environment variable name must be in upper case, though the directory name itself need not be.

Miriad handles only the new binary table format (donewtab=1 in FITTP). Typical inputs to AIPS FITTP are:

AIPS/FITTP
doall=-1 One file at a time
outfile='myarea:0823.fits' Specify area and file name or
outfile='0823.fits' default to /DATA/FITS directory
dostokes=-1 No conversions
dotable=1 Miriad understands FITS tables
dotwo=-1 Single precision adequate
donewtab=1 Only the new tables can be handled
format=3 Floating point FITS. Values of 1 or 2 also OK

Using format=1 (16-bit integers) for visibility datasets with many channels will result in an output Miriad dataset in compressed format. It also produces a much smaller FITS file - which may be important if disk space is low. Note that FITS data compression is different from Miriad and AIPS data compression. FITS compression uses one scale factor for the entire dataset, whereas Miriad and AIPS compression uses one scale factor per visibility record.

In most cases converting the FITS file to Miriad format is straightforward. Apart from the op parameter, which indicates the operation to be performed by fits (op=uvin is used to read in a visibility FITS file), you need only supply the names of an input FITS and output Miriad dataset. Note that Miriad follows the case conventions of the host operating system. Thus, under Unix, Miriad is case sensitive, and so you must give the FITS file name in the correct case. As it has most likely come from AIPS, the file name will usually be in upper case.

For spectral line observations, the velocity reference frame used in Miriad (and some other velocity information) must be set when the visibility dataset is created. The default is to extract the appropriate information from the FITS file. Alternatively, the velocity parameter can be used to override or alter the velocity information given in the FITS file. See Chapter 16 for more information.

FITS
in=$MYAREA/0823.FITS Re-use your environment variable
in=/DATA/FITS/0823.FITS or give AIPS default directory; get case right
op=uvin Read in visibility data
out=0823.uv Miriad dataset name
velocity=lsr Compute info for LSR velocities, for
  spectral line observations.

Leave everything else unset. Once fits has run to completion, you should see the new directory containing the `items' describing your visibility data.



Subsections
Miriad manager
2016-06-21