next up previous
Next: GAUFIT: least-square fits
Up: Session 7 Interactively obtaining 2-D Gaussian source profiles
Previous: Session 7 Interactively obtaining 2-D Gaussian source profiles

GAUFIT: original fitting algorithm

Once the image to be analysed has been examined using HISTPEAK and displayed using KAPPA's DISPLAY, an interactive session might proceed as follows:

% gaufit

ESP GAUFIT running.

MODE - Use the application interactively? /TRUE/ > 
COLOUR - Pen colour? /1/ > 
ANGCON - Use clockwise positive rotation convention? /FALSE/ > 
ANGOFF - Position angle offset /0/ > 
IMGDEV - Which device is displaying the image? /@xwindows/ > 

Using /local1/export/home/norman/s/src/esp/ic3374c as the input NDF.

Select the source location
Left mouse button:        Select location.
Middle mouse button:      Show cursor coordinates.
Right button or CTRL-C:  Quit selection.

  SKY frame co-ordinates:  RA = -11:23:21.4,  Dec = 62:13:07

Indicate the outer limit of the source.
Left mouse button:        Select location.
Middle mouse button:      Show cursor coordinates.
Right button or CTRL-C:  Quit selection.

  SKY frame co-ordinates:  RA = -11:23:20.8,  Dec = 62:12:45
You can choose several sources to fit. We chose to fit only one here, so quit at this point.
You have opted to quit source selection.

Read source positions:
  Source     X      Y   Radius-limit
     1      93.0   94.0   22.6
Using info from SKY frame - pixels are  0.961 arcseconds square.
This is very similar to the way in which ELLPRO, ELLFOU and SECTOR works. After first defining the colour (COLOUR) of the ink to be used to mark the image locations specified, the angle convention to be used is defined (via ANGCON and ANGOFF) and then the device displaying the source image chosen (IMGDEV).

FWHM - Work in FWHM, rather than sigmas? /TRUE/ > 
LSQFIT - Use the non-linear least-squares method? /FALSE/ > 
BACK - Background count value /6196.5/ > 760
SIGMA - Std. dev. of the background /400.4/ > 12
NSIGMA - Number of sigma above sky /5/ > 
NITER - Number of iterations /5/ > 3


MODEL - Output NDF filename /@ic3374c-out/ > 
MODTYP - Whole image model (W) or residuals (R) /'w'/ >
If you set FWHM to be true, then results will be displayed as FWHM, rather than the gaussian width parameter, sigma.

If you set the parameter LSQFIT to be false, you get the original GAUFIT algorithm.

It is then necessary to provide information on the image background value (BACK) and its standard deviation (SDEV). These are most easily found using ESP's HISTPEAK. For most purposes the interpolated standard deviation is best.

The parameter NSIGMA defines a count value (NSIGMA times the SDEV value plus BACK value supplied) above which a pixel must be for it to be included during the minimisation process. This is to reduce the number of pixels considered and avoid `noisy' pixels contributing. Using too low a value will slow the application down a lot. ITER merely tells it how many minimisation loops must occur before the processing stops. As with all minimisation processes the application can reach the `point of vanishing returns' if too many iteration loops are specified. The arbitrary residual indicator will be a useful help. See below.

The parameter MODEL is the name you wish to give to the output image while MODTYP defines what sort of image it should be. There are two options: the first is a whole image (MODTYP=W) where the model value for every pixel of the image is calculated, the second (MODTYP=R) where only the areas of the image immediately surrounding the sources are shown as non-bad. In these regions the residual value is given (ie the source image value for a given pixel minus the model value for the same pixel).

XINC - Source origin movement in X /0.001/ > 
YINC - Source origin movement in Y /0.001/ > 
SAINC - Source std dev factor in Sa /1/ > 
SBINC - Source std dev factor in Sb /1/ > 
PINC - Source peak variation /1/ > 
ANGINC - Source origin variation in angle /1/ > 

AUTOL - Search for a better origin? /TRUE/ >

These parameters define how tightly constrained the minimisation routine is when it tries to walk through variable space. That is, if any of these values is very small (say .001) the minimisation can only adjust that aspect of the source model very slightly. The other extreme, a lot of freedom to vary source parameters, is specified if the value supplied is 1. So in the case shown above, the centres of the source cannot be varied much (XINC and YINC), while the breadths of the sources, peak height and position angle (SAINC, SBINC, PINC and ANGINC respectively) are allowed a lot of freedom to vary. The ability to constrain an aspect for the source model is essential for merged sources.

Setting AUTOL true means that the application will try to improve slightly on the source positions you have suggested using a centroiding routine. This is particularly useful with very large images where the display window you are using may not be able to provide a 1:1 relationship between the pixels in the image and the pixels on the screen.

Finding a better origin.

First estimates of source data

Source      X           Y         Angle   FWHMa/as     FWHMb/as         Peak
  1       93.40       95.10      105.00     7.6          5.6        0.210E+03

Initial arbitrary residual   51.17


Iteration  1  of  3
Source      X           Y         Angle   FWHMa/as     FWHMb/as         Peak
  1       93.40       95.10      107.00     7.4          4.3        0.209E+03

Current arbitrary residual   42.5

Iteration  2  of  3
Source      X           Y         Angle   FWHMa/as     FWHMb/as         Peak
  1       93.40       95.10      106.67     7.7          4.1        0.210E+03

Current arbitrary residual   42.0

Iteration  3  of  3
Source      X           Y         Angle   FWHMa/as     FWHMb/as         Peak
  1       93.40       95.11      107.33     7.7          4.1        0.210E+03

Current arbitrary residual   41.8
OUT - Text file for parameter /'GaiaEsp-outputtext'/ > ic3374c-txt
As you can see, the source positions remained unchanged during the minimisation (as requested by the small values we assigned for XINC and YINC) while the other parameters varied considerably - note that even at the last iteration the position angle of the source is still varying and the residual is dropping. The X and Y co-ordinates reported here, and those written to the output file ic3374c-txt, are in the Base co-ordinate system of the image.

An example output file is shown in Section 15 and described in Appendix F.



next up previous
Next: GAUFIT: least-square fits
Up: Session 7 Interactively obtaining 2-D Gaussian source profiles
Previous: Session 7 Interactively obtaining 2-D Gaussian source profiles

ESP --- Extended Surface Photometry
Starlink User Note 180
Norman Gray
Mark Taylor
Grant Privett
27 January 2000
E-mail:ussc@star.rl.ac.uk

Copyright © 2002 Council for the Central Laboratory of the Research Councils