aboutsummaryrefslogtreecommitdiff
path: root/Plotremember.f
blob: 5f1619fd96f89f85fd8fb09553a21bba01815e22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

      subroutine plotremember (option)
c******************************************************************************
c     This subroutine declares or stores or recovers the plotting parameters 
c     that were default, or set in the parameter file or were the ones used 
c     in the most recent call to a plotting routine.
c****************************************************************************** 

      include 'Linex.com'
      include 'Pstuff.com'
      integer option


c*****initialize the plot parameters; iscale=0 is simple default;
c     iscale=1 is when these parameters have been read from the
c     parameter file
      if     (option .eq. 0) then
         if (iscale .eq. 0) then
            xlo       = oldstart
            xhi       = oldstop
            ylo       = 0.
            yhi       = 1.1
            veladd    = 0.
            xadd      = 0.
            yadd      = 0.
            ymult     = 1.
            smtype    = 'g'
            fwhmgauss = 0.1
            vsini     = 0.
            limbdark  = 0.
            vmac      = 0.
            fwhmloren = 0.
            whichwin  = '1of1'
         endif


c*****store the original plot parameters
      elseif (option .eq. 1) then
         origxlo       = xlo
         origxhi       = xhi
         origylo       = ylo
         origyhi       = yhi
         origveladd    = veladd
         origxadd      = xadd
         origyadd      = yadd
         origymult     = ymult
         origsmtype    = smtype
         origfwhmgauss = fwhmgauss
         origvsini     = vsini
         origlimbdark  = limbdark
         origvmac      = vmac
         origfwhmloren = fwhmloren
         origwhichwin  = whichwin


c*****re-set the plot parameters to their original values
      elseif (option .eq. 2) then
         xlo       = origxlo
         xhi       = origxhi
         ylo       = origylo
         yhi       = origyhi
         veladd    = origveladd
         xadd      = origxadd
         yadd      = origyadd
         ymult     = origymult
         smtype    = origsmtype
         fwhmgauss = origfwhmgauss
         vsini     = origvsini
         limbdark  = origlimbdark
         vmac      = origvmac
         fwhmloren = origfwhmloren
         whichwin  = origwhichwin


c*****store the plot parameters from the last entry into pltspec
      elseif (option .eq. 3) then
         oldxlo       = xlo
         oldxhi       = xhi
         oldylo       = ylo
         oldyhi       = yhi
         oldveladd    = veladd
         oldxadd      = xadd
         oldyadd      = yadd
         oldymult     = ymult
         oldsmtype    = smtype
         oldfwhmgauss = fwhmgauss
         oldvsini     = vsini
         oldlimbdark  = limbdark
         oldvmac      = vmac
         oldfwhmloren = fwhmloren
         oldwhichwin  = whichwin


c*****re-set plot parameters to values from the last entry into pltspec
      elseif (option .eq. 4) then
         xlo       = oldxlo
         xhi       = oldxhi
         ylo       = oldylo
         yhi       = oldyhi
         veladd    = oldveladd
         xadd      = oldxadd
         yadd      = oldyadd
         ymult     = oldymult
         smtype    = oldsmtype
         fwhmgauss = oldfwhmgauss
         vsini     = oldvsini
         limbdark  = oldlimbdark
         vmac      = oldvmac
         fwhmloren = oldfwhmloren
         whichwin  = oldwhichwin
      else
         stop 'bad option in plotremember; I quit!'
      endif


      return
      end