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

« back to all changes in this revision

Viewing changes to contrib/geotest/proc/geotest.prg

  • 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
!++++++++++++++++++++++++++++++++++++++++++++++++
 
2
!
 
3
!    MIDAS procedure  geotest.prg
 
4
!    with entries for RAMP, SPEC1, SPEC2, SPEC3, WAVE
 
5
!    for commands CREATE/RAMP, /WAVE, /SPC1, /SPC2, /SPC3
 
6
!
 
7
!.PURPOSE
 
8
!    Generate test images
 
9
!
 
10
!.SYNTAX
 
11
!
 
12
!    @c geotest,ramp image slope angle dimension
 
13
!
 
14
!    where
 
15
!
 
16
!    image  -  the output image name,
 
17
!    slope  -  real slope (units/pixel along gradient),
 
18
!              default = 1.0,
 
19
!    angle  -  integer position angle (degrees),
 
20
!              default = 0,
 
21
!    dimension - integer dimensions of axes of image,
 
22
!                default = 128.
 
23
!
 
24
!
 
25
!    @c geotest,spec1 image slope amplitude period phase dimension
 
26
!
 
27
!    where
 
28
!
 
29
!    image     -  the    output image name,
 
30
!    slope     -  real wave slope,
 
31
!                 default = 0.0,
 
32
!    amplitude -  real, wave amplitude,
 
33
!                 default = 10.0,
 
34
!    period    -  real period of wave,
 
35
!                 default = 8.5,
 
36
!    phase     -  real wave phase,
 
37
!                 default = 0.0
 
38
!    dimension -  integer dimensions of axes of image,
 
39
!                 default = 128.
 
40
!
 
41
!
 
42
!    @c geotest,spec2 image period slope amplitude phase dimension
 
43
!
 
44
!    where
 
45
!
 
46
!    image     -  the    output image name,
 
47
!    period    -  integer period (1 to 20 are valid values),
 
48
!    slope     -  real wave slope,
 
49
!                 default = 0.0,
 
50
!    phase     -  integer wave phase,
 
51
!                 default = 1
 
52
!    dimension -  integer dimensions of axes of image,
 
53
!                 default = 128.
 
54
!
 
55
!
 
56
!    @c geotest,spec3 image psf-option centring table boxwidth-or-fwhm
 
57
!
 
58
!    where
 
59
!
 
60
!    image      -  the output image name.
 
61
!    psf-option -  a box of specified width (B, default); or
 
62
!                  a gaussian of specified full width half max. (G).
 
63
!    centring   -  positions of lines vis-a-vis pixel centres.
 
64
!                  Default in 0.645.
 
65
!    table      -  input table, giving positions of lines.
 
66
!                  Default is LINES.TBL.
 
67
!    boxwidth   -  width of "box" PSF; if .LE. 0.001, then a delta
 
68
!                  function is used instead.
 
69
!    (or)
 
70
!    fwhm       -  full width half maximum (greater than 0.2).
 
71
!                  Default of boxwidth or of fwhm is 1.0.
 
72
!
 
73
!
 
74
!    @c geotest,wave image amplitude period dimension
 
75
!
 
76
!    where
 
77
!
 
78
!    image     -  the output image name,
 
79
!    amplitude -  real wave amplitude,
 
80
!                 default = 10.0,
 
81
!    period    -  real period of wave,
 
82
!                 default = 8.5,
 
83
!    dimension -  integer dimensions of axes of image,
 
84
!                 default = 128.
 
85
!
 
86
!
 
87
!.AUTHOR
 
88
!
 
89
!    D. Ponz, ESO - IPG, Garching               860622
 
90
!    F. Murtagh, ST-ECF, Garching               860707
 
91
!    K. Banse, ESO - IPG, Garching              901107, 910108, 070522
 
92
!
 
93
!-----------------------------------------------------------
 
94
!
 
95
! **********************
 
96
!     ENTRY RAMP
 
97
! **********************
 
98
!
 
99
ENTRY RAMP
 
100
DEFINE/PARAM P1 ? IMA "Enter output image name:"
 
101
DEFINE/PARAM P2 1.0 NUMBER
 
102
DEFINE/PARAM P3 0 NUMBER
 
103
DEFINE/PARAM P4 128 NUMBER
 
104
!
 
105
WRITE/KEYW OUT_A {P1}
 
106
WRITE/KEYW INPUTR/R/1/1 {P2}
 
107
WRITE/KEYW INPUTI/I/1/1 {P3}
 
108
WRITE/KEYW INPUTI/I/2/1 {P4}
 
109
RUN CON_EXE:RAMP
 
110
!
 
111
! **********************
 
112
!     ENTRY SPEC1
 
113
! **********************
 
114
!
 
115
ENTRY SPEC1
 
116
DEFINE/PARAM  P1  ?    IMA  "Enter output image name:"
 
117
DEFINE/PARAM  P2  0.0  NUMBER
 
118
DEFINE/PARAM  P3  10.0 NUMBER
 
119
DEFINE/PARAM  P4  8.5  NUMBER
 
120
DEFINE/PARAM  P5  0.0  NUMBER
 
121
DEFINE/PARAM  P6  128  NUMBER
 
122
!
 
123
WRITE/KEYW OUT_A        {P1}
 
124
WRITE/KEYW INPUTR/R/1/1 {P2}
 
125
WRITE/KEYW INPUTR/R/2/1 {P3}
 
126
WRITE/KEYW INPUTR/R/3/1 {P4}
 
127
WRITE/KEYW INPUTR/R/4/1 {P5}
 
128
WRITE/KEYW INPUTI/I/1/1 {P6}
 
129
RUN CON_EXE:SPEC1
 
130
!
 
131
! **********************
 
132
!     ENTRY SPEC2
 
133
! **********************
 
134
!
 
135
ENTRY SPEC2
 
136
DEFINE/PARAM  P1  ?   IMA  "Enter output image name:"
 
137
DEFINE/PARAM  P2  10  NUMBER
 
138
DEFINE/PARAM  P3  0.0 NUMBER
 
139
DEFINE/PARAM  P4  1   NUMBER
 
140
DEFINE/PARAM  P5  128 NUMBER
 
141
!
 
142
WRITE/KEYW OUT_A           {P1}
 
143
WRITE/KEYW INPUTR/R/1/1    {P3}
 
144
WRITE/KEYW INPUTI/I/1/1    {P4}
 
145
WRITE/KEYW INPUTI/I/2/1    {P5}
 
146
WRITE/KEYW INPUTI/I/3/1    {P2}
 
147
RUN CON_EXE:SPEC2
 
148
!
 
149
! **********************
 
150
!     ENTRY SPEC3
 
151
! **********************
 
152
!
 
153
ENTRY SPEC3
 
154
DEFINE/PARAM  P1  ?     IMA  "Enter output image name:"
 
155
DEFINE/PARAM  P2  B     CHARACTER
 
156
DEFINE/PARAM  P3  0.645 NUMBER
 
157
DEFINE/PARAM  P4  LINES TABLE
 
158
DEFINE/PARAM  P5  1.0   NUMBER
 
159
!
 
160
WRITE/KEYW OUT_A        {P1}
 
161
WRITE/KEYW INPUTC/C/1/1 {P2}
 
162
WRITE/KEYW INPUTR/R/1/1 {P3}
 
163
IF INPUTR .LT. 0.0 THEN
 
164
  WRITE/OUT "Offset vis a vis pixel centre must be positive"
 
165
  RETURN
 
166
ENDIF
 
167
IF INPUTR .GT. 1.0 THEN
 
168
  WRITE/OUT "Offset vis a vis pixel centre must be less than 1.0"
 
169
  RETURN
 
170
ENDIF
 
171
!
 
172
WRITE/KEYW IN_TAB/C/1/8 {P4}
 
173
WRITE/KEYW INPUTR/R/2/1 {P5}
 
174
IF P2(1:1) .EQ. "G" THEN
 
175
   RUN CON_EXE:SPEC3G                  ! Gaussian psf used.
 
176
ELSE
 
177
   RUN CON_EXE:SPEC3B                  ! "Box" psf used.
 
178
ENDIF
 
179
!
 
180
! **********************
 
181
!     ENTRY WAVE
 
182
! **********************
 
183
!
 
184
ENTRY WAVE
 
185
DEFINE/PARAM P1 ? IMA "Enter output image name:"
 
186
DEFINE/PARAM P2 10.0 NUMBER
 
187
DEFINE/PARAM P3 8.5  NUMBER
 
188
DEFINE/PARAM P4 128  NUMBER
 
189
!
 
190
WRITE/KEYW OUT_A {P1}
 
191
WRITE/KEYW INPUTR/R/1/1 {P2}
 
192
WRITE/KEYW INPUTR/R/2/1 {P3}
 
193
WRITE/KEYW INPUTI/I/1/1 {P4}
 
194
RUN CON_EXE:WAVES