source: trunk/source/processes/electromagnetic/lowenergy/test/fluoTest/XrayFluo.py @ 1350

Last change on this file since 1350 was 1350, checked in by garnier, 13 years ago

update to last version 4.9.4

File size: 3.8 KB
Line 
1
2# tell HistoManger where to find the histograms:
3hm.selectStore("xrayfluo.his")
4
5# ... and load them into memory:
6histoGamDet     = hm.load1D(1)
7histoGamDetPre  = hm.load1D(6)
8histoGamLeavSam = hm.load1D(4)
9histoEleLeavSam = hm.load1D(5)
10histoProtRD     = hm.load1D(8)
11histoProtLS     = hm.load1D(9)
12histoGamBornSam = hm.load1D(2) 
13histoEleBornSam = hm.load1D(3)
14histoSpectrum   = hm.load1D(7)
15
16# set plotter to 4*2 zones
17pl.zone(5,2)
18# ... and plot the histograms
19hplot(histoGamDet)
20hplot(histoGamDetPre)
21hplot(histoGamLeavSam)
22hplot(histoEleLeavSam)
23hplot(histoProtRD)
24hplot(histoProtLS)
25hplot(histoGamBornSam)
26hplot(histoEleBornSam)
27hplot(histoSpectrum)
28
29pl.psPrint("histos.ps")
30
31# prompt user for <return>
32wait()
33
34# set plotter to 1*1 zones
35pl.zone(1,1)
36
37#titols:
38pl.xAxisOption ("title","energy of the electrons generated in the sample")
39pl.xAxisOption ("label","E (keV)")
40pl.yAxisOption("title","counts")
41
42pl.textStyle("fontsize","10.")
43#color of the histogram
44pl.dataStyle("linecolor", "red")
45
46#draw a grid even on the top and on the right of the plot
47#pl.zoneOption("mirrorAxis","yes")
48
49#legend
50pl.dataOption("legend","EleBorn")
51
52
53hplot(histoEleBornSam)
54
55wait()
56pl.psPrint("hEleBornSam.ps")
57
58
59
60#titols:
61pl.xAxisOption ("title","energy of the gammas generated in the sample")
62pl.xAxisOption ("label","E (keV)")
63pl.yAxisOption("title","counts")
64
65pl.textStyle("fontsize","10.")
66#colore dell'istogramma
67pl.dataStyle("linecolor", "blue")
68
69#draw a grid even on the top and on the right of the plot
70#pl.zoneOption("mirrorAxis","yes")
71
72#legend
73pl.dataOption("legend","GamBorn")
74
75
76hplot(histoGamBornSam)
77wait()
78pl.psPrint("hGamBornSam.ps")
79
80#titols:
81pl.xAxisOption ("title","energy deposit in the detector")
82pl.xAxisOption ("label","E (keV)")
83pl.yAxisOption("title","counts")
84
85pl.textStyle("fontsize","10.")
86#colore dell'istogramma
87pl.dataStyle("linecolor", "green")
88
89
90
91pl.dataOption("legend","EnergyDep")
92
93
94hplot(histoGamDet)
95wait()
96pl.psPrint("histoGamDet.ps")
97
98
99pl.xAxisOption ("title","spectrum of the incident photons")
100pl.xAxisOption ("label","E (keV)")
101pl.yAxisOption("title","counts")
102
103pl.textStyle("fontsize","10.")
104
105pl.dataStyle("linecolor", "yellow")
106
107#pl.zoneOption("mirrorAxis","yes")
108
109pl.dataOption("legend","B-Flare")
110
111
112hplot(histoSpectrum)
113wait()
114pl.psPrint("hSpectrum.ps")
115
116
117pl.xAxisOption ("title","spectrum of the photons at the detector")
118pl.xAxisOption ("label","E (keV)")
119pl.yAxisOption("title","counts")
120
121pl.textStyle("fontsize","10.")
122
123pl.dataStyle("linecolor", "blue")
124
125#pl.zoneOption("mirrorAxis","yes")
126
127pl.dataOption("legend","photonsDet")
128
129
130hplot(histoGamDetPre)
131wait()
132pl.psPrint("hGamDetPre.ps")
133
134pl.xAxisOption ("title","spectrum of the electrons leaving the sample")
135pl.xAxisOption ("label","E (keV)")
136pl.yAxisOption("title","counts")
137
138pl.textStyle("fontsize","10.")
139
140pl.dataStyle("linecolor", "red")
141
142#pl.zoneOption("mirrorAxis","yes")
143
144pl.dataOption("legend","electronsLeav")
145
146hplot(histoEleLeavSam)
147wait()
148pl.psPrint("hEleLeav.ps")
149
150pl.xAxisOption ("title","spectrum of the photons leaving the sample")
151pl.xAxisOption ("label","E (keV)")
152pl.yAxisOption("title","counts")
153
154pl.textStyle("fontsize","10.")
155#colore dell'istogramma
156pl.dataStyle("linecolor", "red")
157
158#disegna il reticolo anche sopra e a destra
159#pl.zoneOption("mirrorAxis","yes")
160
161pl.dataOption("legend","photonsLeav")
162
163hplot(histoGamLeavSam)
164wait()
165pl.psPrint("hGamLeav.ps")
166
167pl.xAxisOption ("title","history of photons")
168pl.xAxisOption ("label","E (keV)")
169pl.yAxisOption("title","counts")
170
171pl.dataStyle("linecolor", "yellow")
172
173pl.dataOption("legend","photonsBorn")
174
175hplot(histoGamBornSam)
176
177pl.dataStyle("linecolor", "red")
178
179pl.dataOption("legend","photonsLeav")
180
181v1=vm.from1D(histoGamLeavSam)
182
183pl.overlay(v1)
184
185pl.dataStyle("linecolor", "blue")
186
187pl.dataOption("legend","photonsDet")
188
189v2=vm.from1D(histoGamDetPre)
190
191pl.overlay(v2)
192
193wait()
194pl.psPrint("history.ps")
195
196
197
198
199
Note: See TracBrowser for help on using the repository browser.