~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to stdred/ccdred/proc/ccdfixpix.prg

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
! @(#)ccdfixpix.prg     19.1 (ESO-DMD) 02/25/03 14:15:59
 
2
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
!.COPYRIGHT   (C) 1993 European Southern Observatory
 
4
!.IDENT       ccdpxcor.prg
 
5
!.AUTHOR      Rein H. Warmels,  ESO-Garching
 
6
!.KEYWORDS    Direct imaging, CCD package, bad pixel correction
 
7
!.PURPOSE     Do the bad pixel correction of the input frame
 
8
!.USE         The input file is corrected for bad pixel. The bad pixel
 
9
!.            are contained in a bad fixel file, which obviously depend
 
10
!.            on telescope and instrument combination. All ESO bad pixel
 
11
!.            file are assumed to be in the working directory or in the
 
12
!.            the subdirectory stdred/ccd/incl.
 
13
!.NOTE        The procedure checks if the operation was already done
 
14
!.            by checking the descriptor CCDSTAT(6)
 
15
!.            CCDSTAT(1) for overscan correction
 
16
!.            CCDSTAT(2) for trimming the frame
 
17
!.            CCDSTAT(3) for the bad pixel correction
 
18
!.            CCDSTAT(4) for bias subtraction
 
19
!.            CCDSTAT(5) for dark current subtraction
 
20
!.            CCDSTAT(6) for flat fielding
 
21
!.            CCDSTAT(7) for bad pixel correction
 
22
!.            CCDSTAT(8) for fringing correction
 
23
!.VERSION     930326  RHW  Creation
 
24
!-------------------------------------------------------
 
25
DEFINE/PARAM P1 ?          IMA   "Enter input frame: "
 
26
DEFINE/PARAM P2 ?          IMA   "Enter output frame: "
 
27
DEFINE/PARAM P3 {FX_TABLE} TBL   "Enter the bad pixel table:"
 
28
DEFINE/PARAM P4 {FX_METH}  C     "Option for pixel correction:"
 
29
!
 
30
! *** check if processing was already done
 
31
IF M$EXISTD(P1,"CCDSTAT") .EQ. 0 THEN
 
32
   WRITE/OUT "{P1}: *** WARNING: No check on CCD reduction status possible"
 
33
   WRITE/DESCR {P1} CCDSTAT/I/1/10 0 ALL
 
34
ELSE
 
35
   IF {{P1},CCDSTAT(3)} .EQ. 1 THEN  
 
36
      WRITE/OUT "{P1}: *** INFO: Pixel correction was already applied"
 
37
      RETURN
 
38
   ENDIF
 
39
ENDIF
 
40
!
 
41
IF M$EXIST(FX_TABLE) .EQ. 0 THEN                 ! look for bad pixel file
 
42
   WRITE/OUT "{P1} *** ERROR: Bad pixel table {FX_TABLE} not accessible"
 
43
   RETURN
 
44
ENDIF
 
45
!
 
46
! *** go to pixel modifications
 
47
IF P4(1:1) .EQ. "A" THEN                       ! use modify/area command
 
48
   MODIFY/AREA   {P1},{P3} {P2} {FX_FPAR(1)} {FX_NOISE}
 
49
 
 
50
ELSEIF P4(1:1) .EQ. "C" THEN                 ! use modify/column command
 
51
   MODIFY/COLUMN {P1},{P3} {P2} V 
 
52
 
 
53
ELSEIF P4(1:1) .EQ. "R" THEN                    ! use modify/row command
 
54
   MODIFY/ROW {P1},{P3} {P2} V 
 
55
 
 
56
ELSE                                             ! use modify/pixels command
 
57
   MODIFY/PIXELS {P1},{P3} {P2} {FX_FACT} {FX_FPAR} ? {FX_NOISE}
 
58
ENDIF
 
59
!
 
60
! *** write the history and do statistics
 
61
WRITE/DESCR {P2} HISTORY/C/-1/80 "FIXPIX/CCD {P1} {P2} {P3}
 
62
WRITE/DESCR {P2} CCDSTAT/I/3/1 1                      ! image fixing done
 
63
IF VERBOSE(1:1) .EQ. "Y" THEN 
 
64
   STATISTIC/IMAGE {P2} {IM_SEC} ? ? FF                 ! full statistics
 
65
ELSE
 
66
   STATISTIC/IMAGE {P2} {IM_SEC} ? ? FX                ! short statistics
 
67
ENDIF
 
68
!
 
69
RETURN
 
70
 
 
71
 
 
72
 
 
73
 
 
74
 
 
75