~ubuntu-branches/ubuntu/wily/eso-midas/wily-proposed

« back to all changes in this revision

Viewing changes to stdred/qc/proc/qcbias.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
! @(#)qcbias.prg        11.1.1.1 (ESO-IPG) 05/06/97 13:15:15
 
2
! +++++++++++++++++++++++++++++++++++++
 
3
 
4
! Midas procedure sqc01
 
5
! P.Ballester  26.03.97
 
6
! KB  970520
 
7
! PB  970611
 
8
 
9
! this procedure verifies a bias frame for quality control
 
10
 
11
! param1 = name of result image
 
12
! param2 = name of the bias frame
 
13
! param3 = name of the corresponding master bias
 
14
 
15
! Assumed: quality control result table (qc.tbl)
 
16
! +++++++++++++++++++++++++++++++++++++++++++++++++++++
 
17
 
18
define/param p1 ? ima  ! result image 
 
19
define/param p2 ? char ! input bias image
 
20
define/param p3 ? char ! corresponding master bias
 
21
!
 
22
echo/full 1,2
 
23
log/recipe sqc01 in                     !log time of procedure start
 
24
!
 
25
define/local QCTAB/C/1/60  "qc.tbl" 
 
26
!
 
27
define/local mean/R/1/2  0.,0.
 
28
define/local ron/R/1/2   0.,0.
 
29
define/local status/I/1/1 -1
 
30
define/local catal/i/1/2 0,0
 
31
!
 
32
@ set_of_frames IN {p2} sqc01a          !convert FITS input frames
 
33
if outputi(1) .ne. 1 return/exit
 
34
!
 
35
@ set_of_frames IN {p3} sqc01b          !convert FITS input frames
 
36
if outputi(1) .ne. 1 return/exit
 
37
 
38
define/local work2/c/1/80 " "
 
39
define/local work3/c/1/80 " "
 
40
 
41
store/frame work2 sqc01a.cat 1 finito
 
42
finito:
 
43
store/frame work3 sqc01b.cat 2 finita
 
44
finita:
 
45
!
 
46
compute/image &r =  "{work2}"/"{work3}"
 
47
!
 
48
define/local imsize/I/1/2 0,0
 
49
copy/dk {work2} NPIX/I/1/2 imsize/I/1/2
 
50
 
 
51
if imsize(1) .gt. 200 .and. imsize(2) .gt. 200 then
 
52
  imsize(1) = imsize(1) - 100
 
53
  imsize(2) = imsize(2) - 100
 
54
!
 
55
  filter/median  {work2} &f  {medfilt(1)},{medfilt(2)}
 
56
  statist/image  &f [@100,@100:@{imsize(1)},@{imsize(2)}]
 
57
  mean(1) = outputr(3)
 
58
  ron(1)  = outputr(4)
 
59
!
 
60
  filter/median &r &f {medfilt(1)},{medfilt(2)}
 
61
  statist/image &f [@100,@100:@{imsize(1)},@{imsize(2)}]
 
62
  mean(2) = outputr(3)
 
63
  ron(2)  = outputr(4)
 
64
!
 
65
  status/qc {mean(2)} {ron(2)}
 
66
  status = inputi(1)
 
67
endif
 
68
!
 
69
ADD/QCTAB  BIAS {work2} {status}  {mean(1)}  {ron(1)} {mean(2)}  {ron(2)} 
 
70
!
 
71
! until quality control takes over we put the FITS keywords
 
72
! ESO.PRO.CATG and ESO.PRO.QC.STATUS into the result file
 
73
! this section has to be removed once quality control is implemented...
 
74
!
 
75
!write/descr ssr04 ESO.PRO.CATG/c/1/12      "MEAN_FF     "
 
76
!write/descr ssr04 ESO.PRO.QC.STATUS/c/1/12 "CHECKED     "
 
77
!
 
78
!@ set_of_frames OUT ssr04 {resframe}
 
79
 
80
log/recipe sqc01 out    !log time of procedure end + set return status
 
81
 
 
82
 
 
83
 
 
84