divvy -- shift images

`divvy [flags] reference_table clicked_table`

bins | p | 32 |

boxradius | b | 10, 10 |

errorpic | e | false |

fwhm | f | 4.0, 4.0 |

gain | g | 1.0 |

interpolation | i | 1 |

interzero | q | 0.95 |

moffat | m | false |

outputtab | o | "divvy.tab" |

rotation | r | false |

scale | s | 1.0 |

starnull | n | false |

usefiterror | u | true |

verbose | v | 0 |

- bins = 32
- During the redistribution of flux each pixel is divided into (
`bins`x`bins`) subpixel in order to increase the accuracy.

- boxradius = 10, 10
- This flag specifies the box radius which is taken for the determination of the centered positions during the PSF-profile fitting.

- errorpic = false
- Use error images also. If false, the error images are created based on photon noise calculations using the
`gain`specified.

- fwhm = 4.0, 4.0
- Full width half maximum initial conditions in x and y for the PSF-profile fit.

- gain = 1.0
- If
`errorpic`= false, this`gain`is used to create error images based on photon noise calculations.

- interpolation = 1
- Interpolation order. This order defines how the flux in the shifted images is redistributed. A polynomial fit is made for each pixel using the
neighbouring pixels in a box of the size: ( 2 *
`interpolation`+ 1 ) x ( 2 *`interpolation`+ 1 )

- interzero = 0.95
- During the redistribution of flux all new pixels covering a total surface less than this fraction of an old pixel are set to the value "0".

- moffat = false
- PSF profile. If true, a moffat PSF is fitted to the position of each star in order to determine it's position. If false, a gaussian PSF is fitted.

- outputtab = "divvy.tab"
- Output table filename. For each of the input images, the table contains the measured positions of each star in
`reference_table`and the global fit solution.

- rotation = false
- If false, for the first quick solution only a translation is applied using one star (specified by
`clicked_table`) for each image to be shifted. If the images are only a little rotated, this is enuogh to find the other stars (specified by`reference_table`). If not,`rotation`should be set true, and for the first quick solution also a rotation is taken into account. Note that if this is the case, the positions of at least two stars per image to be shifted have to be specified in`clicked_table`.

- scale = 1.0
- Only to be used with
`rotation`= false. For a first quick translation (done in order to find the positions of all stars in`reference_table`) the translation vector is multiplied with this scaling factor.

- starnull = false
- If false, stars having a pixel with a value of "0" or "-1" surounding them in a box with radius
`boxradius`are not used for the determination of the global fit solution.

- usefiterror = true
- If true, the normalized chi squared of the fit (gauss or moffat) is used to weight the independent position measurements in order to get a more stable global fit solution.

- verbose = 0
- Verbose level. If
`verbose`>= 1, two additional output files are written, namely an image ("count.fits") which shows what fraction of an old pixel is redistributed to to each new pixel and a table ("divvy.tab") which contains the measured positions of each star in`reference_table`and the global fit solution for each image to be shifted.

- reference_table
- Input tabel. The first columns must hold the filename of the refernece image whereas the second and third colum must hold the x and y positions of a couple of isolated reference stars (~40-50) in the reference image spread all over the field.

- clicked_table
- Input table. The first columns must hold the filename of the image to be shifted whereas the second and third colum must hold the x and y
positions of the first few stars (at least two if
`rotation`= true, else one is enough) in`reference_table`.

The task divvy aligns shifted images by measuring the centeroids of a given list of stars and applying a rotation, dilation and translation. The
exact centroids are determined using either an analytic moffat PSF-profile fit (if `moffat` = true) or using an analytic Gaussian PSF-profile
fit. Full width half maximum initial conditions in x and y for the PSF-profile fit can be specified using the `fwhm`-flag. The fitting is done
in a box whose size is specifyed by `boxradius`.

The task requires two input tables. One (namely `reference_table`) holding one line with the filename of the reference image followed by a
couple of isolated reference stars (~40-50) in the reference image and one (namely `clicked_table`) specifying for each of the images to be
shifted the positions (x and y) corresponding to the first few stars (at least two if `rotation` = true, else one is enough) in
`reference_table`.

For each image to be shifted the task divvy first calculates a quick solution using the stars in `clicked_table` in order to find the
positions of the other stars in `reference_table`. After that the final transformation consisting of a matrix multiplication and a vector
translation is calculated using the centered positions of all stars showing up in both the reference image and the image to be shifted. Using this
transformation a new grid is generated and the flux is redistributed by flux-conserving polynomial interpolation (`interpolation`). In order
to increase the accuracy each pixel is divided into (`bins` x `bins`) subpixel.

If the `errorpic`-flag is used, for each image to be shifted an error image is beeing read and the error of each pixel is taken into account
for the determination of the centered positions. If `errorpic` is false, new error images are created based on photon noise calculations
using `gain`.

- t...
- Shifted images.

- e.t...
- Shifted error images.

- If
`verbose`>= 1:

- divvy.tab
- Output table filename. For each of the input images, the table contains the measured positions of each star in
`reference_table`and the global fit solution.

- count.fits
- This images shows what fraction of an old pixel is redistributed to to each new pixel. Note, that all pixels having a value less than
`intzero`will be set to "0" in the output shifted image.

divvy -n -u -e -b 7,7 -q 0.95 -p 32 -r -i 1 -x ref.tbl clicked.tbl

Dokumentation maintained by J. Koppenhöfer

This file was last time updated on 31 Mar 2005