The muse_exp_align recipe



Create a coordinate offset table to be used to align exposures during exposure combination.


Compute the coordinate offset for each input field-of-view image with respect to a reference. The created list of coordinate offsets can then be used in muse_exp_combine as the field coordinate offsets to properly align the exposures during their combination. The source positions used to compute the field offsets are obtained by detecting point sources in each of the input images, unless the source detection is overridden and an input source list is available for each input field-of-view image. In this latter case the input source positions are used to calculate the field offsets.



Create an object for the recipe muse_exp_align.

import cpl
muse_exp_align = cpl.Recipe("muse_exp_align")



Search radius (in arcsec) for each iteration of the offset computation. (str; default: ‘30.,4.,2.,0.8’) [default=”30.,4.,2.,0.8”].


Number of bins to use for 2D histogram on the first iteration of the offset computation. (int; default: 60) [default=60].


Use weighting. (bool; default: True) [default=True].


FWHM in pixels of the convolution filter. (float; default: 5.0) [default=5.0].


Initial intensity threshold for detecting point sources. If the value is negative or zero the threshold is taken as sigma above median background MAD. If it is larger than zero the threshold is taken as absolute background level. (float; default: 15.0) [default=15.0].


Fraction of the image to be ignored. (float; default: 0.05) [default=0.05].


Fraction of the image (without the ignored part) to be considered as background. (float; default: 0.1) [default=0.1].


Increment/decrement of the threshold value in subsequent iterations. (float; default: 0.5) [default=0.5].


Maximum number of iterations used for detecting sources. (int; default: 100000) [default=100000].


Minimum number of sources which must be found. (int; default: 5) [default=5].


Maximum number of sources which may be found. (int; default: 80) [default=80].


Lower limit of the allowed point-source roundness. (float; default: -1.0) [default=-1.0].


Upper limit of the allowed point-source roundness. (float; default: 1.0) [default=1.0].


Lower limit of the allowed point-source sharpness. (float; default: 0.2) [default=0.2].


Upper limit of the allowed point-source sharpness. (float; default: 1.0) [default=1.0].


Enables the creation of a simple exposure map for the combined field- of-view. (bool; default: False) [default=False].


Minimum allowed distance of a source to the closest bad pixel in pixel. Detected sources which are closer to a bad pixel are not taken into account when computing the field offsets. This option has no effect if the source positions are taken from input catalogs. (float; default: 5.0) [default=5.0].


Overrides the source detection step. If this is enabled and source catalogs are present in the input data set, the source positions used to calculate the field offsets are read from the input catalogs. If no catalogs are available as input data the source positions are detected on the input images. (bool; default: False) [default=False].

The following code snippet shows the default settings for the available parameters.

import cpl
muse_exp_align = cpl.Recipe("muse_exp_align")

muse_exp_align.param.rsearch = "30.,4.,2.,0.8"
muse_exp_align.param.nbins = 60
muse_exp_align.param.weight = True
muse_exp_align.param.fwhm = 5.0
muse_exp_align.param.threshold = 15.0
muse_exp_align.param.bkgignore = 0.05
muse_exp_align.param.bkgfraction = 0.1
muse_exp_align.param.step = 0.5
muse_exp_align.param.iterations = 100000
muse_exp_align.param.srcmin = 5
muse_exp_align.param.srcmax = 80
muse_exp_align.param.roundmin = -1.0
muse_exp_align.param.roundmax = 1.0
muse_exp_align.param.sharpmin = 0.2
muse_exp_align.param.sharpmax = 1.0
muse_exp_align.param.expmap = False
muse_exp_align.param.bpixdistance = 5.0
muse_exp_align.param.override_detection = False

You may also set or overwrite some or all parameters by the recipe parameter param, as shown in the following example:

import cpl
muse_exp_align = cpl.Recipe("muse_exp_align")
res = muse_exp_align( ..., param = {"rsearch":"30.,4.,2.,0.8", "nbins":60})

See also

cpl.Recipe for more information about the recipe object.

Bug reports

Please report any problems to Ralf Palsa. Alternatively, you may send a report to the ESO User Support Department.