MAKEMOS registers the set of images supplied by matching their pixel indices and then forms a mosaic by combining the separate input pixel values at each location using a nominated data-combination method (by default, it takes the median). The resulting mosaic is of sufficient extent to accommodate all the input data, with any output data pixels which do not receive values from the input being set to the "bad" pixel value. Account is taken of variance information associated with the input images, and all calculations are optimally weighted to minimise the output noise. Output variance estimates for the final mosaic may also be produced.
Forming a mosaic in this way will normally be successful only so long as the input data are mutually consistent. Unfortunately, this is often not the case, since data frequently have differing effective exposure times and background levels which give discontinuities in the final mosaic. Thus, MAKEMOS also addresses the problem of normalising the input images to make them mutually consistent. It does this by optionally applying optimised multiplicative and/or additive corrections (termed scale-factor and zero-point corrections) to each image before forming the mosaic. These optimised corrections are determined by inter-comparing the input images in pairs, using the regions where they overlap to determine the relative scale-factor and/or zero-point difference between each pair. A self-consistent set of corrections is then found which, when applied to each input image, will best eliminate these observed differences and give a smooth mosaic.
The default behaviour is to use variance information during inter-comparisons. This may be suppressed by setting CMPVAR to FALSE, which sometimes gives faster execution without greatly affecting the result (also see the "Algorithms Used" section). However, if input data with similar values have widely differing variance values within the same input image, then use of input variance information is recommended (this could happen, for instance, if an input image is the result of a previous mosaic-ing process). [TRUE]
Otherwise if GENVAR is TRUE and either USEVAR is FALSE or some of the input images do not contain error information, then output variances will be generated using the natural variations in the input data. Obviously this method should only be used if there are many input datasets, which also provide good coverage of the output area. If this option is chosen any regions of the output image that have only one input value will have their associated variances set bad.
The default for this parameter depends on the presence of error information in the input images. If all have error information then the default is TRUE, otherwise it is FALSE.
[DYNAMIC]
The input images are normally accessed only for reading. However, if the MODIFY parameter is set to TRUE (and scale-factor or zero-point corrections are being calculated) then each of the "input" images will be modified by applying the calculated corrections.
If the logging system has been initialised using CCDSETUP, then the value specified there will be used. Otherwise, the default is "CCDPACK.LOG". [CCDPACK.LOG]
If the specified number of iterations is exceeded without achieving the accuracy required by the settings of the TOLS and TOLZ parameters, then a warning message will be issued, but the results will still be used. The value given for MAXIT must be at least one. [20]
[MEDIAN]
This facility provides a means of applying corrections to individual images (e.g. to mutually normalise them) without necessarily also combining them into a mosaic. It may also be useful if several invocations of MAKEMOS are to be made with different parameter settings; by specifying MODIFY=TRUE for the first invocation, scale-factor or zero-point corrections may be applied to normalise the input data so that this need not be repeated on each invocation.
WARNING: Caution should be exercised if setting MODIFY to TRUE, as information about the uncorrected data values of the "input" images will not be retained. [FALSE]
The need for this parameter arises because when multiple input images are supplied there may be a large number of potential pair-wise overlaps between them. To prevent them all being used, which may take far longer than is justified, this set of potential overlaps is reduced by elimination, starting with the smallest ones (as measured by the number of overlapping pixels) and continuing until no more overlaps can be removed without reducing the number of overlaps of any image below the value given for OPTOV. In practice, this means that each image will end up with about (although not exactly) OPTOV overlaps with its neighbours, with the largest overlaps being preferred.
Note that although this algorithm is effective in reducing the number of overlaps, it is not guaranteed always to result in a set of overlaps which allow the optimum set of corrections to be calculated. In practice, problems from this cause are unlikely unless unusual patterns of image overlap are involved, but they may be solved by increasing the value of OVOPT and/or constructing the required mosaic in pieces by running MAKEMOS several times on different sets of input images.
In some cases, reducing the value of OVOPT may reduce the number of inter-comparisons made, and hence reduce the execution time, but if too few inter-comparisons are made, there is a risk that the corrections obtained may not be the best possible.
This parameter is only used if SCALE or ZERO is set to TRUE. [3]
When using integer input data, the former option is useful for minimising the storage space required for large mosaics, while the latter typically permits a wider output dynamic range when necessary. A wide dynamic range is particularly important if a large range of scale factor corrections are being applied (as when combining images with a wide range of exposure times).
If a global value has been set up for this parameter using CCDSETUP, then that value will be used. [TRUE]
This provides a means of retaining the calibration of a set of data, even when corrections are being applied, by nominating a reference image which is to remain unchanged. It also allows the output mosaic to be normalised to any externally-calibrated image with which it overlaps, and hence allows a calibration to be transferred from one set of data to another.
If the image supplied via the REF parameter is one of those supplied as input via the IN parameter, then this serves to identify which of the input images should be used as a reference, to which the others will be adjusted. In this case, the scale-factor and/or zero-point corrections applied to the nominated input image will be set to one and zero, and the corrections for the others will be adjusted accordingly.
Alternatively, if the reference image does not appear as one of the input images, then it will be included as an additional set of data in the inter-comparisons made between overlapping images and will be used to normalise the corrections obtained (so that the output mosaic is normalised to it). However, it will not itself contribute to the output mosaic in this case. [!]
If SCALE is set to TRUE, then MAKEMOS will inter-compare the images supplied as input and will estimate the relative scale-factor between selected pairs of input data arrays where they overlap. From this information, a global set of multiplicative corrections will be derived which make the input data as mutually consistent as possible. These corrections will be applied to the input data before combining them into a mosaic.
Calculation of scale-factor corrections may also be combined with the use of zero-point corrections (see the ZERO parameter). By default, no scale-factor corrections are applied. [FALSE]
A SKYSUP value of unity can often be effective, but a value set by the approximate ratio of sky pixels to useful object pixels (i.e. those containing non-sky signal) in a "typical" image overlap region will usually be better. The precise value is not critical. A value of zero disables the sky noise suppression algorithm completely. The default value for SKYSUP is 10**(n/2.0), where n is the number of significant dimensions in the output mosaic. Hence, for a 2-dimensional image, it will default to 10 which is normally reasonable for CCD frames of extended objects such as galaxies (a larger value, say 100, may give slightly better results for star fields). [10**(n/2.0)]
The value given for TOLS specifies the tolerable fractional error in the estimation of the relative scale-factor between any pair of input images. This value must be positive. [0.001]
The value given for TOLZ specifies the tolerable absolute error in the estimation of the relative zero-point between any pair of input images whose relative scale-factor is unity. If the relative scale-factor is also being estimated, then the value used is multiplied by this relative scale-factor estimate (which reflects the fact that an image with a larger data range can tolerate a larger error in estimating its zero-point). The TOLS value supplied must be positive. [0.05]
If insufficient input variance information is available, or if USEVAR is set to FALSE, then weights are instead derived from the scale-factor corrections applied to each image (see the WEIGHTS parameter for details); unit weight is used if no scale-factor corrections are being applied. Alternatively, explicit weights may be given for each input image via the WEIGHTS parameter.
If you want to add estimated variances to the output image (based on the natural variations of the input images) and all your input images contain variances then you will need to set this parameter FALSE (see GENVAR).
[TRUE]
This parameter is only used if the USEVAR parameter is set to FALSE or if one or more of the input images does not contain variance information. Otherwise, the input variance values are used to weight the input data when they are combined. [!]
If ZERO is set to TRUE, then MAKEMOS will inter-compare the images supplied as input and will estimate the relative zero-point difference between selected pairs of input data arrays where they overlap. From this information, a global set of additive corrections will be derived which make the input data as mutually consistent as possible. These corrections will be applied to the input data before they are combined into a mosaic.
Calculation of zero-point corrections may also be combined with the use of scale-factor corrections (see the SCALE parameter). By default, no zero-point corrections are applied. [FALSE]
Rather than use a conventional least-squares fit for this purpose, which would be sensitive to spurious data, a fit based on minimisation of the sum of the absolute values of the residuals is used instead. This is considerably more robust. It also allows the residuals to be defined by the perpendicular distance of each point from the fitted line, rather than the vertical distance used in conventional least squares. In turn, this removes the distinction between dependent and independent variables and allows the statistical uncertainty on both axes (described by an error ellipse) to be properly taken into account along with other weighting factors used to implement sky noise suppression.
In general, this fitting algorithm is iterative and is controlled via the MAXIT, TOLS and TOLZ parameters which specify the convergence criteria. However, in some important cases the fit can be obtained in a single pass, with consequent savings in execution time. This occurs if:
The algorithm used for combining the separate input images into a mosaic requires no special explanation, except to note that it is designed to operate on large mosaics without making excessive demands on system resources such as memory. It does this by partitioning the mosaic into small regions for processing.
Certain parameters (LOGTO, LOGFILE and PRESERVE) have global values. These global values will always take precedence, except when an assignment is made on the command line. Global values may be set and reset using the CCDSETUP and CCDCLEAR commands.
CCDPACK