1
! @(#)qcbias.prg 11.1.1.1 (ESO-IPG) 05/06/97 13:15:15
2
! +++++++++++++++++++++++++++++++++++++
4
! Midas procedure sqc01
9
! this procedure verifies a bias frame for quality control
11
! param1 = name of result image
12
! param2 = name of the bias frame
13
! param3 = name of the corresponding master bias
15
! Assumed: quality control result table (qc.tbl)
16
! +++++++++++++++++++++++++++++++++++++++++++++++++++++
18
define/param p1 ? ima ! result image
19
define/param p2 ? char ! input bias image
20
define/param p3 ? char ! corresponding master bias
23
log/recipe sqc01 in !log time of procedure start
25
define/local QCTAB/C/1/60 "qc.tbl"
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
32
@ set_of_frames IN {p2} sqc01a !convert FITS input frames
33
if outputi(1) .ne. 1 return/exit
35
@ set_of_frames IN {p3} sqc01b !convert FITS input frames
36
if outputi(1) .ne. 1 return/exit
38
define/local work2/c/1/80 " "
39
define/local work3/c/1/80 " "
41
store/frame work2 sqc01a.cat 1 finito
43
store/frame work3 sqc01b.cat 2 finita
46
compute/image &r = "{work2}"/"{work3}"
48
define/local imsize/I/1/2 0,0
49
copy/dk {work2} NPIX/I/1/2 imsize/I/1/2
51
if imsize(1) .gt. 200 .and. imsize(2) .gt. 200 then
52
imsize(1) = imsize(1) - 100
53
imsize(2) = imsize(2) - 100
55
filter/median {work2} &f {medfilt(1)},{medfilt(2)}
56
statist/image &f [@100,@100:@{imsize(1)},@{imsize(2)}]
60
filter/median &r &f {medfilt(1)},{medfilt(2)}
61
statist/image &f [@100,@100:@{imsize(1)},@{imsize(2)}]
65
status/qc {mean(2)} {ron(2)}
69
ADD/QCTAB BIAS {work2} {status} {mean(1)} {ron(1)} {mean(2)} {ron(2)}
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...
75
!write/descr ssr04 ESO.PRO.CATG/c/1/12 "MEAN_FF "
76
!write/descr ssr04 ESO.PRO.QC.STATUS/c/1/12 "CHECKED "
78
!@ set_of_frames OUT ssr04 {resframe}
80
log/recipe sqc01 out !log time of procedure end + set return status