Debian Codegraph @

stdred/ccdred/proc/ccdload.prg

raw
1 ! @(#)ccdload.prg 19.1 (ES0-DMD) 02/25/03 14:16:01
2 ! @(#)ccdload.prg 19.1 (ESO) 02/25/03 14:16:01
3 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 !.COPYRIGHT (C) 1992 European Southern Observatory
5 !.IDENT ccdload.prg
6 !.AUTHOR Rein H. Warmels, ESO-Garching
7 !.KEYWORDS Direct imaging, CCD package
8 !.PURPOSE Write telescope/detector/instrument specification into keywords
9 !.USE LOAD/CCD instr
10 !. where instr is the instrument/detector combination for which
11 ! descriptor names and default values will be load into the system
12 !.VERSION 921216 RHW Creation
13 !.VERSION 930416 RHW Inclusion of bad pixel file
14 !-------------------------------------------------------
15 DEFINE/PARAMETER P1 ? C "Enter intrumental setup procedure: "
16 !
17 DEFINE/LOCAL CONFIG/C/1/20 "eso_specs"
18 DEFINE/LOCAL IR/I/1/1 0
19 DEFINE/LOCAL NR/I/1/1 0
20 DEFINE/LOCAL NAME/C/1/20 " " ALL
21 !
22 ! *** check if ccd configuration file exists
23 IF M$EXIST("{config}.tbl") .EQ. 0 THEN ! no
24 IF AUX_MODE(1) .LE. 1 THEN ! VMS
25 define/local ccddir/c/1/60 -
26 "MID_DISK:[&MIDASHOME.&MIDVERS.STDRED.CCDRED.INCL]"
27 define/local protec/c/1/60 "SET PROT=(O:RWED)"
28 ELSE ! UNIX
29 define/local ccddir/c/1/60 -
30 "$MIDASHOME/$MIDVERS/stdred/ccdred/incl/"
31 define/local protec/c/1/60 "chmod 644"
32 ENDIF
33 -COPY {ccddir}{CONFIG}.fmt {CONFIG}.fmt ! format file
34 -COPY {ccddir}{CONFIG}.dat {CONFIG}.dat ! data file
35 $ {protec} {CONFIG}.dat
36 $ {protec} {CONFIG}.fmt
37 CREATE/TABLE {CONFIG} * * {CONFIG} {CONFIG} ! create table
38 ENDIF
39 !
40 ! *** loop through science frame column
41 NR = {{CONFIG}.tbl,TBLCONTR(4)}
42 DO IR = 1 {NR} ! loop thu rows
43 NAME = "{{CONFIG},:IDENT,@{IR}}" ! science frame
44 IF P1 .EQ. "{NAME}" THEN ! ident found
45 TELES = "{{CONFIG},:TELES,@{IR}}" ! telescope ID
46 INSTR = "{{CONFIG},:INSTR,@{IR}}" ! instrument ID
47 DETEC = "{{CONFIG},:DETEC,@{IR}}" ! detector ID
48 NPIXX = {{CONFIG},:X_NUMB,@{IR}} ! number of pixels in x
49 NPIXY = {{CONFIG},:Y_NUMB,@{IR}} ! number of pixels in y
50 SPIXX = {{CONFIG},:X_SIZE,@{IR}} ! pixel size in x in micron
51 SPIXY = {{CONFIG},:Y_SIZE,@{IR}} ! pixel size in y in micron
52 IF READMOD(1:1) .EQ. "F" THEN
53 READON = {{CONFIG},:RON_F,@{IR}} ! readout noise per AD unit
54 AD_VAL = {{CONFIG},:CON_F,@{IR}} ! analog to digital factor
55
56 ELSEIF READMOD(1:1) .EQ. "S" THEN
57 READON = {{CONFIG},:RON_S,@{IR}} ! readout noise per AD unit
58 AD_VAL = {{CONFIG},:CON_S,@{IR}} ! analog to digital factor
59
60 ELSE
61 WRITE/OUT "*** INFO: Readout mode undefined; <SLOW> assumed"
62 READMOD = "SLOW"
63 READON = {{CONFIG},:RON_S,@{IR}} ! readout noise per AD unit
64 AD_VAL = {{CONFIG},:CON_S,@{IR}} ! analog to digital factor
65 ENDIF
66 WRITE/OUT "*** INFO: Instrumental setup for <{P1}> loaded"
67 RETURN
68 ENDIF
69 ENDDO
70 !
71 WRITE/OUT "*** WARNING: Instrumental setup for <{P1}> not found"
72
73
74
75
76
77