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

« back to all changes in this revision

Viewing changes to stdred/ccdtest/proc/ccdtestb1.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
! @(#)ccdtestb1.prg     19.1 (ES0-DMD) 02/25/03 14:17:10
 
2
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
!.IDENTIFICATION: ccdtestb.prg
 
4
!.PURPOSE:        Procedure to test bias characteristics: combine bias frames
 
5
!.AUTHOR:         Rein H. Warmels
 
6
!.USE:            @s ccdtestb1 p1 p2 p3 p4
 
7
!.                      p1 = input catalogue containing the ccd bias frames
 
8
!.                      p2 = output identifier [bias]
 
9
!.                      p3 = method for computing the combined bias
 
10
!.                      P4 = overwrite option for combined bias frame [N]
 
11
!.USE:            @s ccdtestb1 p1 p2 p3 p4
 
12
!.Algorithm:      Creation of the combine bias frame. The combining method is 
 
13
!                 taken from P3. The result is load onto the display and a 
 
14
!                 hardcopy is generated in file {p2}_aver.ps
 
15
!.VERSION:        940620 RHW creation
 
16
!.VERSION:        950115 RHW Inclusion of the subtest 
 
17
!.VERSION:        950808 RHW Seperate procedure for B1 test
 
18
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
19
DEFINE/PARAMETER P1  ?         C  "Enter input catalogue:"
 
20
DEFINE/PARAMETER P2  BIAS      C  "Enter combined output frame:"
 
21
DEFINE/PARAMETER P3  median    C  "Combining method:"
 
22
DEFINE/PARAMETER P4  N         C  "Enter overwrite option:"
 
23
!
 
24
DEFINE/LOCAL BSSTA/R/1/1      0.0
 
25
DEFINE/LOCAL BSEND/R/1/1      0.0
 
26
DEFINE/LOCAL BSSTE/R/1/1      0.0
 
27
DEFINE/LOCAL XSTA/R/1/1       0.0
 
28
DEFINE/LOCAL XEND/R/1/1       0.0
 
29
DEFINE/LOCAL YSTA/R/1/1       0.0
 
30
DEFINE/LOCAL YEND/R/1/1       0.0
 
31
DEFINE/LOCAL SCALE/I/1/1      0.0
 
32
!
 
33
! *** check if the catalogue exists
 
34
IF M$EXIST(P1) .EQ. 0 THEN
 
35
   WRITE/OUT "*** FATAL <CCDTESTB1>: Catalogue {P1} not existing"
 
36
   RETURN
 
37
ENDIF
 
38
!
 
39
!
 
40
WRITE/OUT "Test B1: Creating combined master bias frame"
 
41
write/out "------------------------------------------------------------------"
 
42
write/out "     All frames in the input catalogue are combined using the"
 
43
write/out "     <{P3}> method. The output frame will be {P2}.bdf.
 
44
write/out " "
 
45
!
 
46
! *** first set all the keywords for the combining
 
47
IF P4(:1) .EQ. "Y" .OR. M$EXIST("{P2}.bdf") .EQ. 0 THEN
 
48
   define/local sav_met/c/1/20   "{bs_met}"       ! save the combining method
 
49
   write/keyw   bs_met/c/1/20    "{p3}"           ! store new method
 
50
   define/local sav_del/c/1/3    "{bs_del}"       ! save the combining method
 
51
   write/keyw   bs_del/c/1/3     "NO"             ! store new method
 
52
   define/local sav_typ/c/1/60   "{bs_typ}"       ! save the exposure type
 
53
   write/keyw   bs_typ/c/1/60    "?"              ! store new method
 
54
   delete/ima {p2} no
 
55
   @s ccdcombine bs {p1} {p2}
 
56
   write/keyw   bs_met/c/1/20    "{sav_met}"      ! restore method
 
57
   write/keyw   bs_del/c/1/3     "{sav_del}"      ! restore deletion option
 
58
   write/keyw   bs_typ/c/1/60    "{sav_typ}"      ! restore exposure type
 
59
 
 
60
ELSE
 
61
   WRITE/OUT "*** INFO: Combined BIAS already present and not overwritten"
 
62
ENDIF
 
63
!
 
64
statist/imag {p2} ? ? ? FN              ! calculate statistics
 
65
bssta = OUTPUTR(3) - 1.0*OUTPUTR(4)
 
66
bsend = OUTPUTR(3) + 1.0*OUTPUTR(4)
 
67
!bssta = OUTPUTR(3) - 2.5
 
68
!bsend = OUTPUTR(3) + 2.5
 
69
!bssta = OUTPUTR(3) - 1.5*OUTPUTR(4)
 
70
!bsend = OUTPUTR(3) + 1.5*OUTPUTR(4)
 
71
cuts/image {p2} {bssta},{bsend}
 
72
scale = {{p2},NPIX(1)}/512
 
73
create/display
 
74
load/itt expo
 
75
load/image {p2} scale=-{scale}
 
76
set/midas output=no
 
77
copy/display p5=noprint
 
78
-copy screen{mid$sess(11:12)}.ps {p2}.ps
 
79
set/midas output=yes
 
80
write/out "     Image of average bias frame is in file {p2}.ps"
 
81
write/out " "
 
82
delete/image screen{mid$sess(11:12)}.ima NO
 
83
!
 
84
RETURN
 
85
 
 
86
 
 
87
 
 
88