1
% @(#)coadd_imag.hlq 19.1 (ESO-ECF) 02/25/03 13:25:03
2
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
%.COPYRIGHT (c) 1992 European Southern Observatory
6
%.KEYWORDS MIDAS, help files, COADD/IMAGE
7
%.PURPOSE On-line help file for the command: COADD/IMAGE
8
%.VERSION 1.0 14-SEP-1992 : Creation, RNH
9
%----------------------------------------------------------------
13
COADD/IMAGE 14-SEP-1992, RNH
15
COADD/IMAGE in_spec PSFs niter decon coaddr [flags] [xsub,ysub] [Firstim]
16
Co-add or restore images using Lucy algorithm
19
Co-add or restore images using Lucy algorithm
22
COADD/IMAGE in_spec PSFs niter decon coaddr [flags] [xsub,ysub]
25
in_spec = single or more image frames separated by a comma;\\
26
the images must be well-aligned with each other and must have
27
same size as well as dimensions which are powers of two.
29
PSFs = point-spread-function images to match the input images;\\
30
the PSFs must be the same size and shape as the data images.\\
31
They must be non-negative everywhere and must be normalised so
32
that the total intensity for each image is 1.0.
34
The peak of the PSFs should be positioned centrally in the frame
35
and the PSFs should be well aligned with each other.
37
niter = number of iterations to be applied
39
decon = name of output deconvolved image;
41
this frame will be the result of applying the Lucy-Richardson
42
restoration algorithm to the input images.
44
If there are multiple images the information from all of them is
47
If there is only one image and one PSF this result is the standard
48
Lucy-Richardson restored image.
50
coaddr = root name for output co-added images\\
51
The co-added output images are the results of convolving the
52
deconvolved image with each of the PSFs in turn.\\
53
They are named by appending \_1, \_2 etc to the string supplied
56
Flags = control switches, four Y/N flags; defaulted to YYNN\\
57
(1) verbose - if "Y" lots of messages explaining what is happening
58
during the restoration are displayed. If "N" the program
59
keeps quiet until all is done.
61
(2) accel - whether or not the accelerated version of the
64
If this is turned on the correction factor image which is
65
applied at each iteration is multiplied by a factor which
66
maximises the increase in likelihood (and hence the
67
improvement in the restoration) within the limits imposed by
68
the non-negativity requirement.
70
This normally leads to quicker restoration and is recommended
71
whether or not you have understood the last sentence.
73
(3) Whether or not there is a first estimate image. If so the
74
restoration starts from this point, if not it starts from
75
a constant image with the same total flux as the data. This
76
option is mainly useful if you want to continue a restoration
77
to more iterations without having to start again.
79
(4) Whether or not the restoration uses sub-sampling. It is often
80
advantageous to restore onto a more finely sampled grid than
81
the original data, particularly if the latter is not well
82
sampled. For more details see the notes below.
84
xsub,ysub = optional X and Y sub-sampling factors. These values are
85
only needed if the subsampling flag above has been set to Y.
87
Firstim = the name of the starting image if there is one. If the
88
flag has been set to state that there is a starting image this
89
one will be read and used as the initial estimate image. If not
93
DECONVOLVE/IMAGE, DECONVOLVE/FLUCY
96
This program has a dual purpose:
98
Image restoration to enhance resolution and the contrast of fine
99
scale features and the co-adding of images with different
100
point-spread-functions, eg, CCD frames taken in differing seeing
103
Both operations are based on the image restoration scheme devised
104
by Richardson and Lucy and the generalisation of the method for
105
image co-addition was also suggested by Leon Lucy.
107
This command always produces both a deconvolved image and the
108
result of convolving this with the PSFs of the input frames.
110
If the program is being used simply to do a normal restoration then
111
the former will be the desired output and the latter may be
112
disregarded (however it will be found to be very similar to the input
113
with the pixel-to-pixel small-scale noise removed and hence may have
116
For simple restorations 40 iterations will typically be a good
117
compromise between enhanced sharpness and obtrusive artefacts,
118
although this number depends on the signal-to-noise of the data
119
and other factors which make experimentation essential.
121
In the case of image co-addition the optimal result is normally the
122
output co-added image which corresponds to the sharpest input PSF.
124
E.g., if you have three input images taken in 0.3,0.8 and 1.2 arcsec
125
seeing then the optimal result will be the one matching the
128
The deconvolved image may have smaller star images but
129
it will also suffer from the unavoidable artefacts present in
132
For this sort of work it is best to go to quite high numbers of
133
iterations to try to get close to the maximum likelihood result.
135
Sub-sampling may be done if the PSF can be obtained on a finer grid
136
than the data itself. In this case the data should be expanded by
137
pixel replication (not re-sampling or interpolation) so that the size
138
and number of pixels matches that of the sub-sampled PSFs.
140
Then the restoration/co-addition may be performed in the normal way
141
except that the sub-sampling flag should be set to Y and the
142
appropriate values for the X and Y sub-sampling factors also given.
146
COADD/IMAGE galaxy psf 10 gal_10 qqq
147
Do a standard Lucy-Richardson restoration of the image
148
`galaxy.bdf' using the PSF `psf.bdf'.
150
10 iterations are applied (accelerated as that is the default)
151
and the result written to `gal_10.bdf'.
153
The result of convolving `gal_10.bdf' with `psf.bdf' is written to
154
the scratch file `qqq.bdf' and will probably be disgarded.
156
COADD/IMAGE gal1,gal2 psf1,psf2 100 gal_a100 gal_ca
157
Co-add the images `gal1.bdf' and `gal2.bdf' using the corresponding
158
PSFs `psf1.bdf' and `psf2.bdf'.
160
100 iterations (accelerated) will be performed. The deconvolved
161
result will be written to `gal_a100.bdf' and the co-added images to
162
`gal_ca_1.bdf' and `gal_ca_2.bdf'.
164
COADD/IMAGE galaxy psf 10 gal_20 qqq2 YYYN ? gal_10
165
Continue the restoration in the first example to another 10
168
This shows the use of the `first estimate' flag which is set to "Y"
169
and the input first estimate image name is given as `gal_10 'on the
172
The result will be written to `gal_20.bdf'.
173
The normal "verbose" and "accel" flags are retained.
175
COADD/IMAGE biggal psfsub 10 gal_s40 qqq YYNY 2,2
176
This is an example of using the sub-sampling restoration option.
177
The input `biggal.bdf' is the same frame as above except with the
178
pixels duplicated in both X and Y.
180
The PSF `psfsub.bdf' is an image of the same size and with the same
181
pixel grid containing a sub-sampled PSF.
182
The result will be `gal_s40.bdf', also on the finer pixel grid.
183
The "subsample" flag has been set and the sub-sampling factors in
184
both X and Y are given on the command line.