Debian Codegraph @

stdred/ccdred/proc/tutomosaic.prg

raw
1 ! @(#)tutomosaic.prg 19.1 (ES0-DMD) 02/25/03 14:16:06
2 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 !.IDENTIFICATION: tutomosaic.prg
4 !.PURPOSE: Demonstration procedure for the ccd mosaic package.
5 !.AUTHOR: Rein Warmels ESO - Garching May, 1999
6 !.USE: Execute as TUTORIAL/MOSAIC
7 !.NOTE: The following files should exist in MID_TEST:
8 ! dor[0-5].fits, dor.cat, falign.tfits, calign.tfits
9 !.VERSION: 990504 RHW creation
10 ! -----------------------------------------------------------------------
11 ! Procedure for demostrating the mosaicing capabilities
12 !
13 -copy MID_TEST:dor.cat dor.cat
14 indisk/fits MID_TEST:dor0.fits dor0.bdf >Null
15 indisk/fits MID_TEST:dor1.fits dor1.bdf >Null
16 indisk/fits MID_TEST:dor2.fits dor2.bdf >Null
17 indisk/fits MID_TEST:dor3.fits dor3.bdf >Null
18 indisk/fits MID_TEST:dor4.fits dor4.bdf >Null
19 indisk/fits MID_TEST:dor5.fits dor5.bdf >Null
20 indisk/fits MID_TEST:falign.tfits falign.tbl >Null
21 indisk/fits MID_TEST:calign.tfits calign.tbl >Null
22
23 ! *** first we create the mosaic
24 write/out "This demonstration shows the mosaicing package in ESO-MIDAS"
25 write/out "consisting of mosaic creation, subraster alignment and matching"
26 crea/display
27 load/lut rainbow
28 wait 5
29 write/out "First we create a 3x3 mosaic with three input frames. Mosaic"
30 write/out "subraster numbers 3, 5, and 7 will be empty. The MIDAS table"
31 write/out "dormdb contains a database of the input data frames"
32 crea/mosaic dor.cat dormos dormdb 3,3 3,5,7
33 read/tab dormdb
34 load dormos
35 wait 5
36 !
37 write/out " "
38 write/out "Next we create a 3x2 mosaic will all elements filled. The data"
39 write/out "base again contains the detailed input for this mosaic."
40 crea/mosaic dor.cat dormos dormdb 3,2
41 read/tab dormdb
42 load dormos
43 wait 5
44 !
45 ! here the part for the alignment
46 write/out " "
47 write/out "Now we start the alignment using three different methods"
48 write/out "Method 1: Alignment based on constant shift"
49 write/out " The method assumes a constant shift in x and/or y. The input"
50 write/out " frame are shifted with respect to each other and combined."
51 write/out " In this example the shifts are 30 pixels in x and y. The"
52 write/out " reference subraster is subraster #2"
53 align/mosaic dormos dormdb doraligns s,30,30 ! shift align
54 load doraligns
55 wait 5
56 !
57 write/out " "
58 write/out "Method 2: Alignment based on a reference table"
59 write/out " The method uses a MIDAS table containing the relative shifts"
60 write/out " of the subrasters with respect to a reference subraster (here"
61 write/out " frame #2. First the reference table will be shown"
62 write/out " "
63 read/tab falign ! read table
64 cop/tt falign :X_offset dormdb :X_offpix
65 cop/tt falign :Y_offset dormdb :Y_offpix
66 align/mosaic dormos dormdb doralignf r,dormdb ! table, align
67 load doralignf
68 wait 5
69 !
70 write/out " "
71 write/out "Method 3: Alignment based on MIDAS table containing common objects"
72 write/out " The method uses a MIDAS table with common objects. This table"
73 write/out " can be create by the command SHIFT/MOSAIC". First we show the "
74 write/out " input coordinate table; hereafter we do the alignment."
75 read/tab calign ! read table
76 align/mosaic dormos dormdb doralignc c,calign ! coord. align
77 load doralignf
78 wait 5
79 !
80 ! *** here the part for the mosaicing
81 write/out " "
82 write/out " "
83 write/out "After the pixel alignment we now show both pixel alignment and"
84 write/out "intensity matching. Again we have three methods: constant shift,"
85 write/out "a MIDAS shift table, and a MIDAS table with common objects."
86 write/out " "
87 match/mosaic dormos dormdb dormatchc c,calign
88 write/out "Here comes the mosaiced image using the constant shift method"
89 load dormatchc
90 match/mosaic dormos dormdb dormatchs s,30,30
91 write/out "Here comes the mosaiced image using the shift table"
92 load dormatchs
93 match/mosaic dormos dormdb dormatchf r,dormdb
94 write/out "Here comes the mosaiced image using the table with common objects"
95 load dormatchf
96 wait 5
97 !
98 ! *** determine the offset in the overlap regions
99 write/out " "
100 write/out "Finally, we show the command FIT/MOSAIC that aligns and matches the"
101 write/out "subrasters in the mosaic by taking into account all information"
102 write/out "to determine the best possible estimate of the offsets between the"
103 write/out "individual subrasters. Rather then having a boostrap approach like"
104 write/out "in the command MATCH/MOSAIC, FIT/MOSAIC uses all offsets between"
105 write/out "all frames."
106 write/out "For further information read the on-line help of FIT/MOSAIC"
107 fit/mosa dormos ? dormdb doroff
108 write/out " "
109 write/out "Here comes the mosaiced image using the overlap regions"
110 load doroff
111 write/out Tutorial finished...
112
113
114
115
116
117
118
119