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

« back to all changes in this revision

Viewing changes to stdred/echelle/proc/necplspec.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
! @(#)necplspec.prg     19.1 (ES0-DMD) 02/25/03 14:19:40
 
2
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
!.COPYRIGHT   (C) 1994 European Southern Observatory
 
4
!.IDENT       echplspec.prg
 
5
!.AUTHOR      Pascal Ballester,  ESO - Garching
 
6
!.KEYWORDS    Spectroscopy, Echelle, Sky definition
 
7
!
 
8
!.PURPOSE     Plots an echelle spectrum in wavelength
 
9
!             range
 
10
!
 
11
!.VERSION     1.0    Creation    26.08.94 PB-ESO/DMD
 
12
!-------------------------------------------------------
 
13
!
 
14
define/param P1 ? IMA "Rebinned image:"
 
15
!define/param P2 ? NUMB "Start,End wavelength"
 
16
 
 
17
verify/echelle {P1} REBIN
 
18
 
 
19
define/local over/I/1/1 0
 
20
define/local PL/I/1/1   0
 
21
define/local WST/D/1/4  0.,0.,0.,0.
 
22
define/local NP/I/1/3   0,0,0
 
23
define/local STEP/D/1/1 0.
 
24
 
 
25
set/graph pmode=1 font=1
 
26
 
 
27
copy/dk {P1} npix/I/1/2 NP/I/2/2
 
28
copy/dk {P1} step/D/1/1 step
 
29
copy/dk {P1} WSTART  STARTW
 
30
 
 
31
if P2(1:1) .NE. "?" then
 
32
    write/key WST/D/1/2 {P2}
 
33
    set/graph xaxis={wst(1)},{wst(2)}
 
34
else
 
35
    wst(1) = plrstat(1)
 
36
    wst(2) = plrstat(2)
 
37
endif
 
38
 
 
39
 
 
40
DO NP = 1 {NP(3)}
 
41
   OVER = 0
 
42
   WST(3) = STARTW({NP})
 
43
   WST(4) = WST(3) + (NP(2)-1.)*STEP
 
44
 
 
45
 
 
46
   IF WST(1) .LE. WST(4) .AND. WST(2) .GE. WST(3) over = 1
 
47
 
 
48
   if over .eq. 1 then
 
49
      average/row &a = {P1} @{NP},@{NP}
 
50
      copy/kd     wst/D/3/1 &a start
 
51
      if pl .eq. 0 then
 
52
          pl  = 1
 
53
          set/graph color={pl}
 
54
          plot &a
 
55
      else
 
56
          if pl .eq. 1 then 
 
57
             pl = 4
 
58
          else
 
59
             pl = 1
 
60
          endif
 
61
          set/graph color={pl}
 
62
          over/row &a
 
63
      endif
 
64
    endif
 
65
    if wst(3) .gt. wst(2) return
 
66
    enddo
 
67
    return
 
68
 
 
69
 
 
70
 
 
71
 
 
72
 
 
73
 
 
74