## Chapter 5POL-2 Image Display

### 5.1 GAIA

The Starlink package Gaia can be used to inspect the results of the data reduction. To plot the output vector catalogue onto the final total intensity map first open up the I map in Gaia.

% gaia iext.sdf

In the main Gaia window, select the drop-down menu option Image Analysis / Polarimetry toolbox…. This should launch a new toolbox window entitled GAIA: Polarimetry. From this window, use the drop-down menu option File / Open to load the file mycat.FIT. This should then populate the lower part of the window with the contents of this polarimetry catalogue file. Each of the vectors in this file will be automatically overlaid on the main image window (see Figure 5.1).

In order to filter the number of overlaid vectors down to a more useful number and size, you can use various options in the GAIA: Polarimetry toolbox. First, select the Rendering tab on the left hand side. This will reveal a panel that will indicate which quantities are currently being used for the vector overlays. In this case, the Vector length is taken from the P column of the table, and the Vector angles are taken from the ANG column.

Currently the figure has too many vectors to be scientifically meaningful. To filter out most of the extraneous vectors, click on the Selecting tab, and set the Expression field to be the following:

$I/$DI<10

Ensure you press return after entering in the above expression.

The above expression selects the data points in the polarimetry table which have an associated total intensity (Column I) less than 10 times the associated error value for that intensity (Column DI). To remove all of these extraneous vectors, either press control-X or use the drop-down menu option Edit / Cut. This should leave just a small number of vectors clustering around the target object (see Figure 5.2).

Zooming in on the central region of the map, it can already be seen that the level of vector ordering (and hence polarisation) is quite low (see Figure 5.3). If needed it is possible to change the scaling by selecting the Rendering tab in the GAIA: Polarimetry window, and increasing the vector scale.

Finally it is useful for future use (as in the examples in the following sections) to save the final selection of vectors. To save the displayed vectors to a new catalogue, use the drop-down menu File / Save in the polarimetry toolbox.

### 5.2 KAPPA and polpack

It is possible to use Kappa and Polpack to create POL-2 plots.

% kappa
% polpack

Note that in the following examples, it will be necessary to ensure that only the vectors to be plotted are included in the file mycat.FIT.

There are two main ways to do this – either by saving the output catalogue from Gaia or using the Starlink package Cursa to manipulate the catalogue you produced. To use Cursa simply run:

% cursa

then to select the vectors of interest:

% catselect catin=mycat.FIT catout=selcat.FIT norejcat seltyp=e "expr=’i>10*di’"

it is also possible to crop images using catselect, by using the expression command. In this example we use only pixels above $-$10 on the $y$ axis.

% catselect catin=mycat.FIT catout=selcat.FIT norejcat seltyp=e "expr=’i>10*di and y>-10’"

Tip:
For a better font on PGPLOT PostScript devices, set the following environment variable.
setenv PGPLOT_PS_FONT Times

Graphics-related attributes that can be set are described in SUN95: Descriptions of Plotting Attributes, and the coordinate system attributes that can be set are described in SUN/95: Descriptions of Frame Attributes.

#### 5.2.1 Example 1 – a vector map with no background

In this section an output file: plot1.pdf is created from the input catalogue mycat.FIT.

Select a higher quality PostScript font (Times New Roman in this case).

setenv PGPLOT_PS_FONT Times

Select the PostScript graphics device, writing to file plot1.ps.

gdset plot1.ps/acps

For convenience, create a text file holding the main plotting style for polplot.

% cat sty
colour=black
drawtitle=0
format(1)=hms
format(2)=dms

Likewise, create a text file holding the style for the vector length key.

% cat ksty
colour=black
drawtitle=0

Plot the vector map (the vscale parameter controls the vector scale, and the keyvec parameter controls the length of the vector used as the key. There are many other parameters that can be used to control the behaviour of polplot – see the Polpack manual (SUN/223).

% polplot selcat.FIT  style=^sty keystyle=^ksty vscale=20 keyvec=20

Convert the map into a PDF file and remove blank margins (if required).

% ps2pdf plot1.ps temp.pdf
% pdfcrop temp.pdf plot1.pdf

#### 5.2.2 Example 2 – a vector map over a contour map

In this section we create an output file: plot2.pdf from the input catalogue mycat.FIT.

Select the PostScript graphics device, writing to file plot2.ps. Note, in this example we do not assign a value to the PLOT_PS_FONT environment variable. This means the resulting plot uses the default PGPLOT fonts rather than the higher quality PostScript fonts used in the previous example.

% gdset plot2.ps/acps

Set up the main plotting style for contour and polplot:

% cat sty
colour=black
colour(curves)=red
width(curves)=3
drawtitle=0
format(1)=hms
format(2)=dms

Produce the contour map as follows.

% contour iext$$0~50,0~50$$ mode=perc percentiles=$88,90,92,94,96,98$ style=^sty key=no

Modify the above style for the vector map to produce black vectors.

% cat vsty
^sty
colour(curves)=black

Set the style for the vector length key.

% cat ksty
colour=black
width=3
drawtitle=0

Plot the vector map over the contour map. The vectors and contours are aligned automatically in sky coordinates.

% polplot selcat.FIT axes=no clear=no style=^vsty keystyle=^ksty vscale=20 keyvec=20

Convert into a PDF file and remove blank margins (if required).

% ps2pdf plot2.ps temp.pdf
% pdfcrop temp.pdf plot2.pdf

#### 5.2.3 Example 3 – a vector map over an image

In this section we create an output file: plot3.pdf from the input catalogue mycat.FIT. First select the appropriate PostScript device (we use the default PGPLOT fonts again, as in the last example).

% gdset plot3.ps/acps

To ensure a monochrome colour table is used for the image run lutgrey.

% lutgrey

Set the main plotting style for display and polplot:

% cat sty
colour=black
drawtitle=0
format(1)=hms
format(2)=dms

The following function is used to reduce the dynamic range in the map (so that we can see structure in the faint bits without saturating the brightest regions).

maths "’((ia+0.0003)/0.14)**0.2’" ia=iext out=tmp1

Display the image, using a reduced range of colours (pens) so that the darkest regions are grey rather than black. This means the black vectors can still be seen within the dark regions.

% display tmp1$$0~50,0~50$$ mode=perc percentiles=$2,98$ style=^sty \
penrange=$0.4,1.0$

Modify the above style for the vector map to produce wider vectors.

% cat vsty
^sty
width(curves)=3

Set the style for the vector length key.

% cat ksty
colour=black
width=3
drawtitle=0

Plot the vector map over the contour map. The vectors are aligned automatically with the map.

% polplot selcat.FIT axes=no clear=no style=^vsty keystyle=^ksty vscale=20 keyvec=20

Convert into a PDF file and remove blank margins (if required).

% ps2pdf plot3.ps temp.pdf
% pdfcrop temp.pdf plot3.pdf

### 5.3 TOPCAT

Catalogues produced by pol2map can be explored using the popular Topcat catalogue browser (see http://www.starlink.ac.uk/topcat/). For instance:

% topcat -f fits mycat.FIT

Unlike the other tools described above, Topcat cannot visualise the catalogue as a set of vectors. However, it goes well beyond the facilities of the other tools in allowing you to explore correlations between different quantities in the catalogue via two- and three-dimensional scatter plots – see Figure 5.7. It can also be used to cross-correlate two different catalogues, create subsets of the catalogue, create new columns containing related quantities, etc. It also allows the modified catalogue to be saved to a new catalogue file on disk. However, beware that any new catalogue will not contain the WCS information required by other Starlink applications to perform WCS-related operations such as displaying annotated axes and aligning data-sets. However, this WCS information can be copied back into the new catalogue using the polwcscopy command. See Section 6.4.