1
C @(#)gridima.for 19.1 (ESO-DMD) 02/25/03 13:31:22
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 Massachusetts Ave, Cambridge,
20
C Correspondence 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===========================================================================
29
C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
30
C.COPYRIGHT: Copyright (c) 1987 European Southern Observatory,
32
C.IDENTIFICATION: GRIDIMA
33
C.LANGUAGE: F77+ESOext
35
C.KEYWORDS: Ingeneering frames
36
C.PURPOSE: Produce 2-D frame with rectangular grid subjected to
39
C.PECULARITIES: The size of the frame is fixed to 510 by 510 pixels as is the
40
C separation of the lines of the undistorted grid to 60 pixels
41
C.INPUT/OUTPUT: The following key words are used:
42
C ALPHA/R/1/1 angle ALPHA_0 of the distortion in the following
44
C ALPHA = ALPHA0 * R**2
45
C with R being the distance from the point about which
46
C the rotation takes place. ALPHA_0 to be given in degrees/pixel.
47
C.VERSION: 850322 DB Creation
48
C.VERSION: 871123 RHW ESO-FORTRAN Conversion
52
C ---------------------------------------------------------------------
64
CHARACTER IDENT*72,CUNIT*48,IMAG*64
68
DOUBLE PRECISION START(2),STEP(2)
70
INCLUDE 'MID_INCLUDE:ST_DEF.INC/NOLIST'
72
INCLUDE 'MID_INCLUDE:ST_DAT.INC/NOLIST'
78
DATA LHCUTS/0.,100.,0.,100./
84
CALL STSPRO('GRIDIMA') ! get into midas environment
85
CALL STKRDR('ALPHA',1,1,IAV,ALPHA0,KUN,KNUL,ISTAT) ! get distortion angle
86
ALPHA0 = ALPHA0*3.14159/180. ! convert to radians
87
CALL STIPUT(IMAG,D_R4_FORMAT,F_O_MODE,F_IMA_TYPE,NAXIS,
88
2 NPIX,START,STEP,IDENT,CUNIT,IPNTR,IMF,ISTAT)
90
C *** we already know (by definition) the cuts. let's set them now:
91
CALL FLLGRD(MADRID(IPNTR),ALPHA0) ! call fillgrid to do the job
92
CALL STDWRR(IMF,'LHCUTS',LHCUTS,1,4,KUN,ISTAT)
94
CALL STSEPI ! release files and update keywords