| 1 |
! @(#)make_illum.prg 19.1 (ESO-DMD) 02/25/03 14:16:03 |
| 2 |
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 3 |
!.COPYRIGHT (C) 1993 European Southern Observatory |
| 4 |
!.IDENT make_illum.prg |
| 5 |
!.AUTHOR Rein H. Warmels, ESO-Garching |
| 6 |
!.KEYWORDS Direct imaging, CCD package |
| 7 |
!.PURPOSE Make illumination frame |
| 8 |
!.USE: @s mkillumination p1 p2 |
| 9 |
!. where p1 is the reduced input sky frame |
| 10 |
!. p2 in output illumination correction frame |
| 11 |
!.VERSION 930806 RHW Creation |
| 12 |
! 980520 SW IM_SEC will be used to get valid region for |
| 13 |
! illumination correction frame creation! |
| 14 |
!------------------------------------------------------------------------------ |
| 15 |
DEFINE/PARAM P1 ? IMA "Enter the input frame:" |
| 16 |
DEFINE/PARAM P2 ? IMA "Enter the output illumination correction frame:" |
| 17 |
! |
| 18 |
! *** illumination operation already done |
| 19 |
IF M$EXISTD(P1,"MKILLUM") .EQ. 1 THEN |
| 20 |
WRITE/OUT "{P1}: *** INFO: Illumination smoothing already done" |
| 21 |
RETURN |
| 22 |
ENDIF |
| 23 |
! |
| 24 |
! *** return if only listing is wanted |
| 25 |
IF SC_PROC .EQ. "yes" THEN |
| 26 |
WRITE/OUT "{P1}: *** TO BE DONE: Illumination correction is {P2}" |
| 27 |
RETURN |
| 28 |
ENDIF |
| 29 |
! |
| 30 |
! *** smoothing box in x and y |
| 31 |
DEFINE/PARAMETER P3 {IL_XBOX(1)},{IL_XBOX(2)} N "Size of smoothing box in x" |
| 32 |
DEFINE/PARAMETER P4 {IL_YBOX(1)},{IL_YBOX(2)} N "Size of smoothing box in y" |
| 33 |
DEFINE/LOCAL XBOX/R/1/2 {P3} ! x smooting box |
| 34 |
DEFINE/LOCAL YBOX/R/1/2 {P4} ! y smoothing box |
| 35 |
! |
| 36 |
! ** to clip or not to clip |
| 37 |
DEFINE/PARAM P5 {IL_CLIP} C "Enter clip option [{IL_CLIP}]:" |
| 38 |
DEFINE/LOCAL CLIP/C/1/3 {P5} ! clip flag |
| 39 |
IF P5(1:1) .EQ. "y" THEN |
| 40 |
DEFINE/PARAM P6 {IL_SIGMA(1)},{IL_SIGMA(2)} N "Enter low and high sigma:" |
| 41 |
DEFINE/LOCAL SIGMA/R/1/2 {P6} ! clip numbers |
| 42 |
ENDIF |
| 43 |
! |
| 44 |
! *** here we finally do it !!! |
| 45 |
!extract added by [email protected] (20.5.98): |
| 46 |
EXTRACT &e = {P1} {IM_SEC} !extract image section |
| 47 |
!overscan areas would disturb! |
| 48 |
!([email protected]) (20.5.98) |
| 49 |
|
| 50 |
IF P1 .NE. "{P2}" THEN ! name of output frame not the same as input frame |
| 51 |
COPY/II {P1} {P2} ! but shoul have same structure ([email protected]) |
| 52 |
ENDIF |
| 53 |
|
| 54 |
IN_A = "middumme.bdf" ! input frame |
| 55 |
OUT_A = "middummi.bdf" ! output frame |
| 56 |
RUN STD_EXE:CCDILLUM |
| 57 |
! |
| 58 |
IF M$EXIST("middummi.bdf") .EQ. 1 THEN ! check ill frame: output ok? |
| 59 |
INSERT/IMA &i {P2} |
| 60 |
WRITE/DESCR {P2} MKILLUM/C/1/10 MKILLUM |
| 61 |
WRITE/DESCR {P2} {EXP_DESC}/C/1/20 {IL_TYP} ! illum exposure |
| 62 |
ENDIF |
| 63 |
RETURN |