1
C @(#)dto.for 19.1 (ES0-DMD) 02/25/03 13:59:58
2
C===========================================================================
3
C Copyright (C) 1995 European Southern Observatory (ESO)
5
C This program is free software; you can redistribute it and/or
6
C modify it under the terms of the GNU General Public License as
7
C published by the Free Software Foundation; either version 2 of
8
C the License, or (at your option) any later version.
10
C This program is distributed in the hope that it will be useful,
11
C but WITHOUT ANY WARRANTY; without even the implied warranty of
12
C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
C GNU General Public License for more details.
15
C You should have received a copy of the GNU General Public
16
C License along with this program; if not, write to the Free
17
C Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
20
C Corresponding concerning ESO-MIDAS should be addressed as follows:
21
C Internet e-mail: midas@eso.org
22
C Postal address: European Southern Observatory
23
C Data Management Division
24
C Karl-Schwarzschild-Strasse 2
25
C D 85748 Garching bei Muenchen
27
C===========================================================================
30
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
34
C subroutine DTO version 1.00 840614
35
C R.M. van Hees ESO - Garching
38
C High level image display interfaces
41
C Takes care of opening and closing of display devices
44
C updates display keywords and display common blocks
45
C calls high level C display interfaces
48
C holds DTOPEN, DTCLOS, DTGICH and DTPICH
51
C 1.00 Taken from DAZSUBS.FOR, author K.Banse
52
C--------------------------------------------------------------------------
55
C ++++++++++++++++++++++++++++++
58
C connect to IDI device + save info display common blocks IDIDEV & IDIMEM
61
C call as DTOPEN(FLAG,STAT)
64
C FLAG: integer 1 for display window
65
C 2 for graphics window
66
C 3 for zoom window (display)
68
C STAT: integer return status:
69
C 0 if o.k. - no change in window size
70
C 1 if o.k. - yes, a change in window size
72
C ------------------------------
74
SUBROUTINE DTOPEN(FLAG,STAT)
82
INCLUDE 'MID_INCLUDE:IDIDEV.INC'
83
INCLUDE 'MID_INCLUDE:IDIMEM.INC'
87
CALL STKRDI('IDIDEV',1,26,IAV,DZDEV,UNIT,NULLO,STAT)
88
CALL STKRDI('IDIMEMI',1,17,IAV,DZMEMI,UNIT,NULLO,STAT)
94
C ++++++++++++++++++++++++++++++
97
C close display & save display common blocks
100
C call as DTCLOS(DISPNO)
103
C DISPNO: integer display number
105
C ------------------------------
107
SUBROUTINE DTCLOS(DISPNO)
114
INCLUDE 'MID_INCLUDE:IDIDEV.INC'
118
CALL STKWRI('IDIDEV',DZDEV,1,26,UNIT,STAT)
124
C ++++++++++++++++++++++++++++++
127
C return info about given channel in the image display
130
C call as DTGICH(DSPLAY,CHANL,NAME,RBUF,STAT)
133
C DSPLAY: integer image display device no.
134
C CHANL: integer image display channel no. (0,1,...)
137
C NAME: char. string name of frame currently loaded into channel
138
C RBUF: real array real info related to channel,
140
C STAT: integer return status:
142
C 1 = nothing loaded into channel
144
C ------------------------------
146
SUBROUTINE DTGICH(DSPLAY,CHANL,NAME,RBUF,STAT)
150
INTEGER IAV,DSPLAY,CHANL,STAT
151
INTEGER RLEN,ILEN,CLEN
152
INTEGER UNIT(1),NULLO
159
INCLUDE 'MID_INCLUDE:IDIDEV.INC'
160
INCLUDE 'MID_INCLUDE:IDIMEM.INC'
162
DATA RLEN /8/ !float length per channel
163
DATA CLEN /60/ !char. length per channel
164
DATA ILEN /17/ !integer length per channel
168
C move from keywords to COMMON + Parameter arrays
170
CALL STKRDC('IDIMEMC',1,1,CLEN,IAV,WORK,UNIT,NULLO,STAT)
171
CALL STKRDI('IDIMEMI',1,ILEN,IAV,DZMEMI,UNIT,NULLO,STAT)
172
CALL STKRDR('IDIMEMR',1,RLEN,IAV,RBUF,UNIT,NULLO,STAT)
174
NAME(1:) = WORK(1:CLEN)//' '
175
IF (NAME(1:1).EQ.' ') THEN
176
STAT = 1 !indicate, that there is no image
185
C ++++++++++++++++++++++++++++++
188
C store info about given channel in the relevant keywords
191
C call as DTPICH(DSPLAY,CHANL,NAME,RBUF,STAT)
194
C DSPLAY: integer image display device no.
195
C CHANL: integer image display channel no. (0,1,...)
196
C NAME: char. string name of frame currently loaded into channel
197
C RBUF: real array real info related to channel,
201
C STAT: integer return status: 0 = o.k.,
202
C else something wrong...
204
C ------------------------------
206
SUBROUTINE DTPICH(DSPLAY,CHANL,NAME,RBUF,STAT)
210
INTEGER DSPLAY,CHANL,STAT
211
INTEGER RLEN,ILEN,CLEN
219
INCLUDE 'MID_INCLUDE:IDIDEV.INC'
220
INCLUDE 'MID_INCLUDE:IDIMEM.INC'
222
DATA RLEN /8/ !float length per channel
223
DATA CLEN /60/ !char. length per channel
224
DATA ILEN /17/ !integer length per channel
226
C store name of loaded frame
227
WORK(1:) = NAME(1:)//' '
228
CALL STKWRC('IDIMEMC',1,WORK,1,CLEN,UNIT,STAT)
229
CALL STKWRI('IDIMEMI',DZMEMI,1,ILEN,UNIT,STAT)
230
CALL STKWRR('IDIMEMR',RBUF,1,RLEN,UNIT,STAT)