Debian Codegraph @

stdred/ccdred/proc/prep_trim.prg

raw
1 ! @(#)prep_trim.prg 19.1 (ES0-DMD) 02/25/03 14:16:06
2 ! @(#)prep_trim.prg 19.1 (ESO) 02/25/03 14:16:06
3 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 !.COPYRIGHT (C) 1992 European Southern Observatory
5 !.IDENT prep_trim.prg
6 !.AUTHOR Rein H. Warmels, ESO-Garching
7 !.KEYWORDS Direct imaging, CCD package
8 !.PURPOSE Trimmed image from overscan area.
9 !.USE @s prep_trim p1
10 !. p1 = input frame
11 !.METHOD A subimage of the desired size is extracted by EXTRACT/IMAGE
12 !. command. All coordinates are in (integer pixels)
13 !.PARAMETERS P1: input frame
14 ! P2: correction label string which will be checked by
15 ! ccdcorrect.prg to do the desired actions.
16 !.NOTE The procedure checks if the operation was already done
17 !. CCDSTAT(1) for overscan correction
18 !. CCDSTAT(2) for trimming the frame
19 !. CCDSTAT(3) for bad pixel correction
20 !. CCDSTAT(4) for bias subtraction
21 !. CCDSTAT(5) for dark current subtraction
22 !. CCDSTAT(6) for flat fielding
23 !. CCDSTAT(7) for illumination correction
24 !. CCDSTAT(8) for fringing correction
25 !.VERSION 921005 RHW Creation
26 !.VERSION 971117 SW correction labels have to be local -> new param.
27 !-------------------------------------------------------
28 DEFINE/PARAM P1 ? I "Input frame for trimming [no default]:"
29 DEFINE/PARAM P2 {CCDCORS(1:20)}
30 !The correction label string CCDCORS which will be checked by CCDCORRECT.PRG
31 !has to be local, in order to always get the right link to the actual frame.
32 !In a global definition the correction labels may overwritten by other pre-
33 !pared frames which leads to unwished actions to previous frames (SW,97.11.17).
34 !
35 ! *** Check if trimming has already been applied
36 IF SC_TRIM .NE. "yes" .OR. {{P1},CCDSTAT(2)} .EQ. 1 THEN
37 WRITE/OUT "{P1}: Trimming not requested or was applied"
38 RETURN {P2}
39 ENDIF
40 !
41 ! *** return if only listing is wanted
42 IF SC_PROC .EQ. "yes" THEN
43 WRITE/OUT "{P1}: *** TO BE DONE: Trim section is {IM_SEC}"
44 RETURN {P2}
45 ENDIF
46 !
47 WRITE/OUT "{P1}: Trim section is {IM_SEC}"
48 P2(2:2) = "T"
49 P2(11:11) = "Y"
50 !
51 RETURN {P2}