1
! @(#)wfocus.prg 19.1 (ES0-DMD) 02/25/03 13:28:19
2
!===========================================================================
3
! Copyright (C) 1995 European Southern Observatory (ESO)
5
! This program is free software; you can redistribute it and/or
6
! modify it under the terms of the GNU General Public License as
7
! published by the Free Software Foundation; either version 2 of
8
! the License, or (at your option) any later version.
10
! This program is distributed in the hope that it will be useful,
11
! but WITHOUT ANY WARRANTY; without even the implied warranty of
12
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
! GNU General Public License for more details.
15
! You should have received a copy of the GNU General Public
16
! License along with this program; if not, write to the Free
17
! Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
20
! Corresponding concerning ESO-MIDAS should be addressed as follows:
21
! Internet e-mail: midas@eso.org
22
! Postal address: European Southern Observatory
23
! Data Management Division
24
! Karl-Schwarzschild-Strasse 2
25
! D 85748 Garching bei Muenchen
27
!===========================================================================
29
! @(#)wfocus.prg 19.1 (ESO-ASD) 02/25/03 13:28:19
30
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
32
!.PURPOSE Wedge focus in the displayed image
34
!.AUTHOR Cristian Levin
35
!.VERSION 1.0 01/06/92 Creation
36
!.VERSION 2.0 17/05/94 Cleaned up - K.Banse
37
!.VERSION 2.1 10/01/95 implementation of parameters file (CL)
38
!.VERSION 2.2 14/09/95 remove CLEAR/CHAN OVER - KB
40
! --------------------------------------------------------------
42
define/param p8 + ? "Enter input_spec for center/gauss:"
43
if p8(1:1) .eq. "+" then
44
define/local centin/c/1/6 CURSOR
46
define/local centin/c/1/60 {p8}
50
! teloffs1, teloffs2, camoffs1, camoffs2, signwedg, distwedg
52
define/local dx/r/1/1 0.0
53
define/local dy/r/1/1 0.0
54
define/local dtelf/r/1/1 0.0
55
define/local yleft/r/1/1 0.0
56
define/local yright/r/1/1 0.0
57
define/local dcamf/r/1/1 0.0
59
center/gauss {centin} focleft
60
if outputi(1) .eq. 0 then
62
write/out Invalid number of coordinates.
68
compute/table focleft :xstart = :xstart + {dx}
69
compute/table focleft :xend = :xend + {dx}
71
define/local ioff/i/1/2 0,0
72
if mid$sess(16:20) .eq. "94NOV" then
73
ioff = ididev(6)*ididev(15)+1 !offset into keyword IDIMEMC
75
ioff = 1 !offset into keyword IDIMEMC
78
define/local cmc/c/1/20 {idimemc({ioff}:{ioff(2)})}
79
center/gauss {cmc},focleft focright
81
set/midas output=no ! we don't want output on the screen...
83
statist/table focleft :ycen
84
yleft = outputr(3) ! minimum value
85
statist/table focright :ycen
86
yright = outputr(3) ! minimum value
91
dy = signwedg * (yright-yleft)
93
! TELESCOPE focus offset
94
dtelf = teloffs1 * dy * teloffs2
96
! RILD camera focus offset
97
dcamf = camoffs1 * dy * camoffs2
102
write/out Y-shift = {dy}
103
write/out RILD camera focus offset = {dcamf}
106
write/out TELESCOPE focus offset = {dtelf}