~ubuntu-branches/ubuntu/wily/eso-midas/wily-proposed

« back to all changes in this revision

Viewing changes to contrib/imres/help/coadd_imag.hlq

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
% @(#)coadd_imag.hlq    19.1 (ESO-ECF) 02/25/03 13:25:03
 
2
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
%.COPYRIGHT  (c)  1992 European Southern Observatory
 
4
%.IDENT      coadd_imag.hlq
 
5
%.AUTHOR     RNH, ECF/ESO
 
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
%----------------------------------------------------------------
 
10
\se
 
11
SECTION./IMAG
 
12
\es\co
 
13
COADD/IMAGE                                     14-SEP-1992, RNH
 
14
\oc\su
 
15
COADD/IMAGE in_spec PSFs niter decon coaddr [flags] [xsub,ysub] [Firstim]
 
16
        Co-add or restore images using Lucy algorithm
 
17
\us\pu
 
18
Purpose: 
 
19
          Co-add or restore images using Lucy algorithm
 
20
\up\sy
 
21
Syntax:   
 
22
          COADD/IMAGE in_spec PSFs niter decon coaddr [flags] [xsub,ysub]
 
23
                      [Firstim]
 
24
\ys\pa
 
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.
 
28
\ap\pa
 
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.
 
33
\\
 
34
             The peak of the PSFs should be positioned centrally in the frame
 
35
             and the PSFs should be well aligned with each other.
 
36
\ap\pa
 
37
          niter = number of iterations to be applied
 
38
\ap\pa
 
39
          decon = name of output deconvolved image;
 
40
\\
 
41
             this frame will be the result of applying the Lucy-Richardson
 
42
             restoration algorithm to the input images.
 
43
\\
 
44
             If there are multiple images the information from all of them is
 
45
             combined.
 
46
\\
 
47
             If there is only one image and one PSF this result is the standard
 
48
             Lucy-Richardson restored image.
 
49
\ap\pa
 
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 
 
54
             here
 
55
\ap\pa
 
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.
 
60
\\
 
61
             (2) accel - whether or not the accelerated version of the
 
62
                 algorithm is used.
 
63
\\
 
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.
 
69
\\
 
70
                 This normally leads to quicker restoration and is recommended
 
71
                 whether or not you have understood the last sentence.
 
72
\\
 
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.
 
78
\\
 
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.
 
83
\ap\pa
 
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.
 
86
\ap\pa
 
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
 
90
              it is ignored. 
 
91
\ap\see
 
92
See also:
 
93
          DECONVOLVE/IMAGE, DECONVOLVE/FLUCY
 
94
\ees\no
 
95
Note: 
 
96
          This program has a dual purpose:
 
97
\\
 
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 
 
101
          conditions.
 
102
\\
 
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.
 
106
\\
 
107
          This command always produces both a deconvolved image and the
 
108
          result of convolving this with the PSFs of the input frames.
 
109
\\
 
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
 
114
          its uses).
 
115
\\
 
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.
 
120
\\
 
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.
 
123
\\
 
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
 
126
          0.3arsec PSF.
 
127
\\
 
128
          The deconvolved image may have smaller star images but
 
129
          it will also suffer from the unavoidable artefacts present in
 
130
          restorations.
 
131
\\
 
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.
 
134
\\
 
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.
 
139
\\
 
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.
 
143
\on\exs
 
144
Examples:
 
145
\ex
 
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'.
 
149
\\
 
150
            10 iterations are applied (accelerated as that is the default)
 
151
            and the result written to `gal_10.bdf'.
 
152
\\
 
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.
 
155
\xe\ex
 
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'.
 
159
\\
 
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'.
 
163
\xe\ex
 
164
          COADD/IMAGE galaxy psf 10 gal_20 qqq2 YYYN ? gal_10
 
165
            Continue the restoration in the first example to another 10
 
166
            iterations.
 
167
\\
 
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
 
170
            command line.
 
171
\\
 
172
            The result will be written to `gal_20.bdf'.
 
173
            The normal "verbose" and "accel" flags are retained.
 
174
\xe\ex
 
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.
 
179
\\
 
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.
 
185
\xe\sxe