---------------------------------------------------------------------------- When observing in the infrared one frequently uses dithering patterns to be able to subtract the bright sky from a median stack of several science frames. However if one uses a grid with uniform spacing, one may get artefacts in the skyframe, and hence the reduced science data, e.g. since objects in the field will start to overlap. Hence, for deep imaging of faint sources, it is a good idea to have a non uniform grid. Ideally as few as possible of the n*(n-1)/2 offset vectors connecting the points in the grid should have the same length and position angle. A problem is however that when the gridpoints are many, it is difficult and time consuming to check this by hand. Based on a proposed grid (supplied as a file with x- and y-coordinates of the grid positions), the program 'checkpattern' calculates all the offset vectors, the distance to the nearest vector (the absolute distance between the head of two vectors when placed in the same origin) and warn about duplicated vectors. By identifying the responsible grid point, one may adjust it slightly to try to get around the duplication. One should also look at the distance to the nearest offset vector; if this is smaller than 2-3 seeing disks one may still get artefacts. The program also calculates the relative offsets from point to point in the grid, i.e. the 'teloffset' commands you should give in the bias-program macro. Note however that any offset you want to apply to the 1st position, eg to get your arbitrary defined pattern box in the centre of the image, is not accounted for. When n is large and one wants to obtain a duplication free pattern, one may try the program 'createpattern' which start from a uniform grid with approximately the spacing you want to use (e.g. based on the size of the largest object in your field) and randomises around these points, and tries to find patterns that have no duplications within a tolerance given in arcsec, e.g. 2 seing discs or typically 1.4 arcsec. However, there exist many more bad patterns than good ones and the program may have to make many attempts before (if ever) finding a solution. Especially for compact grids with many positions it may be very hard to find a good solution. It is probably overkill to fight very hard to try to get around every single duplication of offset vectors, but it is probably a good idea to check the pattern you have in mind. An expample of a 16 position grid with approximate dimension 36x36 arcsec and random offsets of up to 3.5 arcsec around these grid points that get no offset vector closer than 1.4 arcsec to any other is provided by the pattern with grid positions (units in arcsec): x y 14.65 14.36 pos1 -1.06 -0.20 pos2 8.51 -3.08 ... 23.12 0.41 35.67 -1.11 -2.36 9.95 20.69 8.72 38.14 10.82 -1.07 23.02 11.73 26.97 21.62 27.06 32.84 26.75 -1.87 35.22 12.61 36.74 27.21 34.76 33.35 33.73 pos16 Of course, one may wish to take the positions in a different order (this does not affect the offset vectors) but for the order given above the teloffset commands would be: teloffset 0.0 0.0 (pos1) -15.7 -14.6 (pos2) 9.6 -2.9 ... 14.6 3.5 12.5 -1.5 -38.0 11.1 23.1 -1.2 17.4 2.1 -39.2 12.2 12.8 3.9 9.9 0.1 11.2 -0.3 -34.7 8.5 14.5 1.5 14.6 -2.0 6.1 -1.0 (pos16) And in order to get back to the initial position: teloffset -18.7 -19.4 This grid is stored in the file: pattern16x16_random.dat The offset sequence can be found in: pattern16x16_random.off The offset vectors can be found in: pattern16x16_random.ou Goran Ostlin 2002-04-05 ----------------------------------------------------------------------------