### 10 Examples of running the PISA software

This section shows examples of how the PISA package may be used. Most applications have more capabilities than are shown here. Refer to the appendix with the complete descriptions if the sort of task which you want to perform is not shown here.

The examples as shown are intended to be ‘platform independent’. No items specific to running PISA from the C-shell or ICL are shown. All the application parameters are identical; the main differences are due to special character interpretation. In ICL the continuation character is ‘~’ and in the C-shell ‘\’. No continuation character is shown in the examples. When using the C-shell double quotes around "" strings will be stripped as will vector braces [], so it is necessary to protect them by using the escape character or by using single quotes around the complete parameter value i.e. use ’"a parameter string"’ or \"a parameter string\" not "a parameter string", and ’[1,2,3,4]’ or $1,2,3,4$ not [1,2,3,4]

#### 10.1 Isophotal analysis with deblending

This example performs isophotal analysis with deblending of overlapped images on a frame containing a mixture of stars and galaxies. The results are then plotted on a hardcopy device.

# pisafind
IN - NDF containing input image > frame
Analysing whole image
MINPIX - Minimum pixel size for images (typically 4-16) > 6
METHOD - Intensity analysis ( 0=Isophotal, 1=Total, 2=Profile ) > 0
Estimated background level =   492.2
Background standard deviation =     7.4
BACKGROUND - Background (global sky) value /492.17/ >
THRESH - Threshold for analysis (data units) > 11.5

Total number of positive images = 141
The results have been written to pisafind.dat
and pisasize.dat

# pisaplot
RESULTS - File of PISAFIND parameterised data /@pisafind/ >
DEVICE - Name of graphics device > postscript_p

#### 10.2 Plotting overlaid ellipses

Using PISAPLOT to overlay ellipses is achieved using the OVERLAY and CLEAR parameters. The image over which the plot is to be overlaid should have been displayed using the KAPPA DISPLAY or a routine which uses AGI to store its graphics information (such as PISAGREY).

# display in=frame mode=per percentiles=[1,99] device=xw
# pisaplot results=pisafind.dat overlay device=xw

If a device with a suitable overlay is used then the overlay plane may be erased prior to the plotting of the ellipses using the CLEAR parameter.

# pisaplot results=pisafind.dat overlay clear device=xov

The colour of the ellipses is controlled using the PALNUM parameter. So for instance if one had two lists of results which are separated into stars and galaxies for instance (or one could have PISAFIND results files separated by intensity, ellipticity etc.)

# pisaplot results=stars.dat overlay palnum=3
# pisaplot results=galaxies.dat overlay palnum=4

This sequence of commands would result in the data in file stars.dat being overlaid and coloured green. The data in file galaxies.dat would also be overlaid on the same image and coloured blue. The colours of these could then be altered using the KAPPA palette facilities for pens 3 and 4.

#### 10.3 Performing profile fitting analyses

To perform a profile fit a list of the accurate positions of good well separated stars are required. One way to get such a list is too use the KAPPA CENTROID routine to select objects from a displayed image.

# centroid coout=stars.acc mode=cursor mark

The output file stars.acc is of a format suitable for input to PISAFIT. Running PISAFIT allows the determination of the best fit to the stars.

# pisafit
IN - NDF containing input image /@frame/ >
Analysing whole image
Estimated background level =   492.2
Background standard deviation =     7.4
BACKGROUND - Background (global sky) value /492.2/ >
POSITIONS - File containing star positions / / > stars.acc
MINMODE - Minimisation bounds mode /’APM’/ >
RADIUS - Limiting Radius > 10
Number of points in curve fit = 28

May be having problems with the minimisation, check plot.
RMS of fit                 = 2.0545775E-02
Gaussian Sigma      (GSIGM)=  2.17
% Cross Over        (CROSS)= 30
Mixture Coefficient (COMIX)= 0.087
AGAIN - Do fit again /TRUE/ > f

The parameters controlling other various options are detailed in the routine description appendix. Usually the default options (as shown) are all that are necessary.

PISAFIT writes the model parameterisations into the application’s parameter file. These values are then automatically picked up by any other PISA application which requires them. So for instance running PISAFIND in its profile fitting mode is straight-forward after running PISAFIT.

# pisafind
IN - NDF containing input image /@frame/ >
Analysing whole image
MINPIX - Minimum pixel size for images (typically 4-16) / / > 4
METHOD - Intensity analysis ( 0=Isophotal, 1=Total, 2=Profile ) /0/ > 2
GSIGM - Gaussian sigma (pixels) /2.17146/ >
CROSS - Crossover point % of peak /30/ >
COMIX - Mixture coefficient /8.7035753E-02/ >
UPLIM - Upper intensity limit to use in analysis (saturation) /32767/ >
IFULL - Do you want full surface modelling /FALSE/ >
Estimated background level =   492.2
Background standard deviation =     7.4
BACKGROUND - Background (global sky) value /492.17/ >
THRESH - Threshold for analysis (data units) /20/ >

Total number of positive images = 119
The results have been written to pisafind.dat
and pisasize.dat

#### 10.4 Fancy plots

PISAPLOT allows the use of PGPLOT text escape sequences. It also has parameters controlling the size of the annotations, the presence of annotations, the number of tick mark and the thickness of the lines. So for instance the plot on the front page of this document was produced using the commands.

# pisafind frame(80:210,115:260) reset accept
# pisaplot device=pscript_p pltitl="\fr Objects located by PISAFIND"
abslab="\fr X position (pixels)"
ordlab="\fr Y position (pixels)" thick=2 annoscale=2.5

Hence the labels were written using a Roman font.

#### 10.5 Simple object classification

PISA contains routines which when used co-operatively can separate objects into lists of stars and ‘other’ objects. If the objects have been located using PISAFIND and a suitable profile fit has been made using PISAFIT, then using PISAPEAK produces a set of ‘intensity invariant’ measures. Basically what we’re looking for here are some transformations of the original PISAFIND RESULTS measurements which are not different simply because the objects are of different apparent brightnesses. The transformations chosen try to have the same values for a star of any brightness. Try the following sequence of commands.

# pisapeak in=frame finddata=pisafind.dat results=pisapeak.dat
# pisacut input=pisapeak.dat column=2 thresh=0.85 lower=stars.indices
higher=gals.indices
# pisamatch one=stars.indices two=pisafind.dat out=stars.dat
# pisamatch one=gals1.indices two=pisafind.dat out=gals.dat

This example transforms the PISAFIND RESULTS file using a model stellar profile fit, writing the results to pisapeak.dat. PISACUT is then used to separate the PISAPEAK results, thresholding the data using a cut of 0.851 in the peakedness measure (this strongly selects for stars). The indices of the objects in file stars.indices and gals.indices are then matched against those of the original PISAFIND RESULTS file, giving two files which contain the PISAFIND RESULTS for the separated objects.

#### 10.6 Comprehensive example

A more comprehensive example of PISA usage ‘pisa_demo’ can be found in the pisa directory (\$PISA_DIR). From the C-shell pisa_demo is defined as a command so just run it as any of the applications. From ICL the pisa_demo procedure needs to be loaded before running, this is achieved just by typing the procedure name pisa_demo followed by the invocation pisa_demo ‘device_name’.

1The value 0.85 is decided basically by trial and error. Ideally objects with peakedness measure less than 1 would always be stars, however, the actual value depends strongly on the quality of the profile fit.