Debian Codegraph @

stdred/ccdred/proc/make_fringe.prg

raw
1 ! @(#)make_fringe.prg 19.1 (ESO-DMD) 02/25/03 14:16:03
2 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 !.COPYRIGHT (C) 1993 European Southern Observatory
4 !.IDENT make_fringe.prg
5 !.AUTHOR Rein H. Warmels, ESO-Garching
6 !.KEYWORDS Direct imaging, CCD package
7 !.PURPOSE Make fringe frame
8 !.USE: @s make_fringe p1 p2
9 !. where p1 is the reduced input sky frame
10 !. p2 in output fringe correction frame
11 !.VERSION 930806 RHW Creation
12 !------------------------------------------------------------------------------
13 DEFINE/PARAM P1 ? IMA "Enter the input frame:"
14 DEFINE/PARAM P2 ? IMA "Enter the output fringe frame:"
15 !
16 ! *** illumination operation already done
17 IF M$EXISTD(P1,"MKFRING") .EQ. 1 THEN
18 RETURN
19 ENDIF
20 !
21 ! *** return if only listing is wanted
22 IF SC_PROC .EQ. "yes" THEN
23 WRITE/OUT "{P1}: *** TO BE DONE: Fringe correction is {P2}"
24 RETURN
25 ENDIF
26 !
27 ! *** smoothing box in x and y
28 DEFINE/PARAMETER P3 {IL_XBOX(1)},{IL_XBOX(2)} N "Size of smoothing box in x"
29 DEFINE/PARAMETER P4 {IL_YBOX(1)},{IL_YBOX(2)} N "Size of smoothing box in y"
30 DEFINE/LOCAL XBOX/R/1/2 {P3} ! x smooting box
31 DEFINE/LOCAL YBOX/R/1/2 {P4} ! y smoothing box
32 !
33 ! ** to clip or not to clip
34 DEFINE/PARAM P5 {IL_CLIP} C "Enter clip option [{IL_CLIP}]:"
35 DEFINE/LOCAL CLIP/C/1/3 {P5} ! clip flag
36 IF P5(1:1) .EQ. "y" THEN
37 DEFINE/PARAM P6 {IL_SIGMA(1)},{IL_SIGMA(2)} N "Enter low and high sigma:"
38 DEFINE/LOCAL SIGMA/R/1/2 {P6} ! clip numbers
39 ENDIF
40 !
41 ! *** here we finally do it !!!
42 WRITE/KEYW IN_A {P1} ! input frame
43 IF P1 .EQ. "{P2}" THEN ! output frame
44 OUT_A = "dummy_il"
45 RUN STD_EXE:CCDILLUM
46 COMPUTE/IMAGE {P2} = {P1}-{OUT_A}
47 DELETE/IMAGE {OUT_A}
48 ELSE
49 OUT_A = "{P2}"
50 RUN STD_EXE:CCDILLUM
51 COMPUTE/IMAGE {P2} = {P1}-{OUT_A}
52 ENDIF
53 !
54 IF M$EXIST("{P2}") .EQ. 1 THEN ! check fringe frame
55 WRITE/DESCR {P2} MKFRINGE/C/1/10 MKFRINGE
56 WRITE/DESCR {P2} {EXP_DESC}/C/1/20 {FR_TYP} ! fringe exposure
57 ENDIF
58 RETURN
59
60
61
62
63
64
65