-
Notifications
You must be signed in to change notification settings - Fork 0
/
20020921_Polarimetry_1.gp,v
193 lines (156 loc) · 15.1 KB
/
20020921_Polarimetry_1.gp,v
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
head 17.3;
access;
symbols;
locks
dan:17.3; strict;
comment @# @;
17.3
date 2020.09.24.14.56.54; author dan; state Exp;
branches;
next 17.2;
17.2
date 2020.09.23.15.25.32; author dan; state Exp;
branches;
next 17.1;
17.1
date 2003.03.14.23.03.53; author dan; state Exp;
branches;
next 11.2;
11.2
date 2003.01.11.02.12.07; author dan; state Exp;
branches;
next 11.1;
11.1
date 2002.11.16.11.55.20; author dan; state Exp;
branches;
next ;
desc
@Plotting script for first data set from 21st September 2002
@
17.3
log
@Further work to adapt to new Gnuplot syntax.
@
text
@# Copyright 2002-2003 D. C. Hatton
#
# D. C. Hatton can be contacted on dan.hatton@@btinternet.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program (in the file copying.programs;) if not,
# write to the Free Software Foundation, Inc., 59 Temple Place, Suite
# 330, Boston, MA 02111-1307 USA
# This plots the first data set from 21st September 2002
FIT_LIMIT = 1e-20
c1=1.0
c2=1.0
A=2e-5
f(E, M) = M < 0.5 ? 264199216.0723*c1*(1.0-A)/E**2.0 : M < 1.5 ? 264199216.0723*c2*(1.0+A)/E**2.0 : M < 2.5 ? 264199216.0723*c1*(1.0+A)/E**2.0 : 264199216.0723*c2*(1.0-A)/E**2.0
fit f(x,y) '20020921_Polarimetry_1.dat' using 3:($1+$2):($8/$5):(sqrt(($9/$5)**2.0+($8*$6/$5**2.0)**2.0)) via c1, c2, A
set pointsize 0.01
set style data xyerrorbars
set key below
set size 1, 2
set terminal pslatex
set color
set xlabel "$E_b/\\ut{eV}$"
set ylabel "$f_d/\\ut{Hz}$"
set output '20020921_Polarimetry_1_2.tex'
plot '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2", 2000.0*f(x, 2.0) title "Magnetization up, detector 1", 2000.0*f(x, 3.0) title "Magnetization up, detector 2", 2000.0*f(x, 0.0) title "Magnetization down, detector 1", 2000.0*f(x, 1.0) title "Magnetization down, detector 2"
set output '20020921_Polarimetry_1_4.tex'
plot '20020921_Polarimetry_1.dat' using 3:(1 >= 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2", 4000.0*f(x, 2.0) title "Magnetization up, detector 1", 4000.0*f(x, 3.0) title "Magnetization up, detector 2", 4000.0*f(x, 0.0) title "Magnetization down, detector 1", 4000.0*f(x, 1.0) title "Magnetization down, detector 2"
set output '20020921_Polarimetry_1_6.tex'
plot '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2", 6000.0*f(x, 2.0) title "Magnetization up, detector 1", 6000.0*f(x, 3.0) title "Magnetization up, detector 2", 6000.0*f(x, 0.0) title "Magnetization down, detector 1", 6000.0*f(x, 1.0) title "Magnetization down, detector 2"
set terminal png
set color
set xlabel "Eb/eV"
set ylabel "fd/Hz"
set output '20020921_Polarimetry_1_2.png'
plot '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2", 2000.0*f(x, 2.0) title "Magnetization up, detector 1", 2000.0*f(x, 3.0) title "Magnetization up, detector 2", 2000.0*f(x, 0.0) title "Magnetization down, detector 1", 2000.0*f(x, 1.0) title "Magnetization down, detector 2"
set output '20020921_Polarimetry_1_4.png'
plot '20020921_Polarimetry_1.dat' using 3:(1 >= 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2", 4000.0*f(x, 2.0) title "Magnetization up, detector 1", 4000.0*f(x, 3.0) title "Magnetization up, detector 2", 4000.0*f(x, 0.0) title "Magnetization down, detector 1", 4000.0*f(x, 1.0) title "Magnetization down, detector 2"
set output '20020921_Polarimetry_1_6.png'
plot '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2", 6000.0*f(x, 2.0) title "Magnetization up, detector 1", 6000.0*f(x, 3.0) title "Magnetization up, detector 2", 6000.0*f(x, 0.0) title "Magnetization down, detector 1", 6000.0*f(x, 1.0) title "Magnetization down, detector 2"
@
17.2
log
@Syntax updated for newer Gnuplot versions.
@
text
@d36 2
a37 1
set terminal pslatex color
d50 2
a51 1
set terminal png color
@
17.1
log
@JACB's suggested amendments made.
Typographical errors corrected.
@
text
@d32 1
a32 1
set data style xyerrorbars
@
11.2
log
@Typographical errors corrected.
@
text
@d1 1
a1 1
# Copyright 2002 D. C. Hatton
d21 10
d41 1
a41 1
plot '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2"
d44 1
a44 1
plot '20020921_Polarimetry_1.dat' using 3:(1 >= 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2"
d47 1
a47 1
plot '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2"
d54 1
a54 1
plot '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 < 3000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2"
d57 1
a57 1
plot '20020921_Polarimetry_1.dat' using 3:(1 >= 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2"
d60 1
a60 1
plot '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization up, detector 2", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 1", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 5000 ? $8 : 1/0):4:9 title "Magnetization down, detector 2"
@
11.1
log
@Graphs of results from last-minute experiments added.
Typographical errors corrected.
@
text
@a20 2
#load 'postsummer.gp'
d28 1
a28 1
set ylabel "$f_d/\\ut{fA}$"
a50 14
set terminal pslatex color
set xlabel "$E_b/\\ut{eV}$"
set ylabel "$I_a/\\ut{fA}$"
set output '20020921_perfect.tex'
#plot '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 < 3000 ? $8/(P_2_0_0*eta_0) : 1/0):4:($9/(P_2_0_0*eta_0)) title "Magnetization up, detector 1, $I_b = (2\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8/(P_2_0_0*eta_0) : 1/0):4:($9/(P_2_0_0*eta_0)) title "Magnetization up, detector 1, $I_b = (4\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 >= 5000 ? $8/(P_2_0_0*eta_0) : 1/0):4:($9/(P_2_0_0*eta_0)) title "Magnetization up, detector 1, $I_b = (6\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 < 3000 ? $8/(P_2_0_1*eta_1) : 1/0):4:($9/(P_2_0_1*eta_1)) title "Magnetization up, detector 2, $I_b = (2\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8/(P_2_0_1*eta_1) : 1/0):4:($9/(P_2_0_1*eta_1)) title "Magnetization up, detector 2, $I_b = (4\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 5000 ? $8/(P_2_0_1*eta_1) : 1/0):4:($9/(P_2_0_1*eta_1)) title "Magnetization up, detector 2, $I_b = (6\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 < 3000 ? $8/(P_2_1_0*eta_0) : 1/0):4:($9/(P_2_1_0*eta_0)) title "Magnetization down, detector 1, $I_b = (2\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8/(P_2_1_0*eta_0) : 1/0):4:($9/(P_2_1_0*eta_0)) title "Magnetization down, detector 1, $I_b = (4\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 5000 ? $8/(P_2_1_0*eta_0) : 1/0):4:($9/(P_2_1_0*eta_0)) title "Magnetization down, detector 1, $I_b = (6\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 < 3000 ? $8/(P_2_1_1*eta_1) : 1/0):4:($9/(P_2_1_1*eta_1)) title "Magnetization down, detector 2, $I_b = (2\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8/(P_2_1_1*eta_1) : 1/0):4:($9/(P_2_1_1*eta_1)) title "Magnetization down, detector 2, $I_b = (4\\pm{}0.029)\\ut{\\mu{}A}$", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 5000 ? $8/(P_2_1_1*eta_1) : 1/0):4:($9/(P_2_1_1*eta_1)) title "Magnetization down, detector 2, $I_b = (6\\pm{}0.029)\\ut{\\mu{}A}$"
set terminal png color
set xlabel "Eb/eV"
set ylabel "Ia/fA"
set output '20020921_perfect.png'
#plot '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 < 3000 ? $8/(P_2_0_0*eta_0) : 1/0):4:($9/(P_2_0_0*eta_0)) title "Magnetization up, detector 1, Ib = (2+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8/(P_2_0_0*eta_0) : 1/0):4:($9/(P_2_0_0*eta_0)) title "Magnetization up, detector 1, Ib = (4+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 < 1.5 && $5 >= 5000 ? $8/(P_2_0_0*eta_0) : 1/0):4:($9/(P_2_0_0*eta_0)) title "Magnetization up, detector 1, Ib = (6+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 < 3000 ? $8/(P_2_0_1*eta_1) : 1/0):4:($9/(P_2_0_1*eta_1)) title "Magnetization up, detector 2, Ib = (2+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8/(P_2_0_1*eta_1) : 1/0):4:($9/(P_2_0_1*eta_1)) title "Magnetization up, detector 2, Ib = (4+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 >= 0 && $2 >= 1.5 && $5 >= 5000 ? $8/(P_2_0_1*eta_1) : 1/0):4:($9/(P_2_0_1*eta_1)) title "Magnetization up, detector 2, Ib = (6+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 < 3000 ? $8/(P_2_1_0*eta_0) : 1/0):4:($9/(P_2_1_0*eta_0)) title "Magnetization down, detector 1, Ib = (2+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 3000 && $5 < 5000 ? $8/(P_2_1_0*eta_0) : 1/0):4:($9/(P_2_1_0*eta_0)) title "Magnetization down, detector 1, Ib = (4+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 < 1.5 && $5 >= 5000 ? $8/(P_2_1_0*eta_0) : 1/0):4:($9/(P_2_1_0*eta_0)) title "Magnetization down, detector 1, Ib = (6+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 < 3000 ? $8/(P_2_1_1*eta_1) : 1/0):4:($9/(P_2_1_1*eta_1)) title "Magnetization down, detector 2, Ib = (2+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 3000 && $5 < 5000 ? $8/(P_2_1_1*eta_1) : 1/0):4:($9/(P_2_1_1*eta_1)) title "Magnetization down, detector 2, Ib = (4+/-0.029)muA", '20020921_Polarimetry_1.dat' using 3:($1 < 0 && $2 >= 1.5 && $5 >= 5000 ? $8/(P_2_1_1*eta_1) : 1/0):4:($9/(P_2_1_1*eta_1)) title "Magnetization down, detector 2, Ib = (6+/-0.029)muA"
@