-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
188 lines (156 loc) · 8.6 KB
/
index.html
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
<html>
<head>
<script type="text/javascript" src="js/dygraphs.1.1.1.min.js"></script>
<script src="js/jquery1-11-3.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="js/bootstrap3-3-5.min.js"></script>
<script src="js/plotly-1.5.0.min.js"></script>
<script type="text/javascript" src = "js/angular_corr.js"></script>
<link rel="stylesheet" type="text/css" href="css/custom.css"/>
</head>
<body>
<!--header-->
<div class='branding header'>
<h1>Angular Correlation Calculator</h1>
</div>
<div class='sectionWrapper'>
<div id='plotCol' class='col-md-9'>
<!-- plot -->
<div id="graph_div" class='plotWrap'></div>
</div>
<div class='col-md-3'>
<form class='content' autocomplete='off'>
<!-- even / odd -->
<div>
<h3>Angular Momentum Options</h3>
<input type="radio" id="even" name="r-group" data-toggle="button" onchange="evenA();recalculate_L(1);recalculate_L(2);recalculate();" checked>
<label class="button" for="even">Even mass</label>
<input type="radio" id="odd" name="r-group" data-toggle="button" onchange="oddA();recalculate_L(1);recalculate_L(2);recalculate();">
<label class="button" for="odd">Odd mass</label>
</div>
<hr></hr>
<!-- j1 -->
<label for="j1" class="right inline"><b>J<sub>1</sub>:</b></label>
<select id="j1" onchange="check_jvalues(); recalculate_L(1); recalculate();"></select>
<div id="l1a_value"></div>
<div id="l1b_value"></div>
<label>L<sub>1b</sub>/L<sub>1a</sub> Mixing:</label>
<input id='delta1-slider' type='range' min='-1' max='1' step='0.01' value='0' oninput='syncElements("delta1-slider", "mix1")' onchange='recalculate()' class='mixer'></input>
<input id='mix1' type='number' min='-1' max='1' step='0.01' value='0' onchange='syncElements("mix1", "delta1-slider"); recalculate();' class='mixer'></input>
<hr></hr>
<!-- j2 -->
<label for="j2" class="right inline"><b>J<sub>2</sub>:</b></label>
<select id="j2" onchange="check_jvalues(); recalculate_L(1); recalculate_L(2); recalculate();"></select>
<div id="l2a_value"></div>
<div id="l2b_value"></div>
<label>L<sub>2b</sub>/L<sub>2a</sub> Mixing:</label>
<input id='delta2-slider' type='range' min='-1' max='1' step='0.01' value='0' oninput='syncElements("delta2-slider", "mix2")' onchange='recalculate()' class='mixer'></input>
<input id='mix2' type='number' min='-1' max='1' step='0.01' value='0' onchange='syncElements("mix2", "delta2-slider"); recalculate();' class='mixer'></input>
<hr></hr>
<!-- j3 -->
<label for="j3" class="right inline"><b>J<sub>3</sub>:</b></label>
<select id="j3" onchange="check_jvalues();recalculate_L(2);recalculate();"></select>
<hr></hr>
<!-- a2, a4 -->
<div>
<label for="a2" class="right inline"><b>a<sub>2</sub>:</b></label>
<input class='a2a4' type="number" id="a2" step="0.001" title='' onchange="plot(); document.getElementById('customAwarning').classList.remove('hidden');">
</div>
<div>
<label for="a4" class="right inline"><b>a<sub>4</sub>:</b></label>
<input class='a2a4' type="number" id="a4" step="0.001" title='' onchange="plot(); document.getElementById('customAwarning').classList.remove('hidden');">
</div>
<div id='customAwarning' class='warning hidden'>
Warning: Custom values of a2 and a4 set, does not correspond to selected mixing ratios or momenta.
</div>
<hr></hr>
<div>
<h3>a2/a4 Plot Options</h3>
<label for='minMix' class='right inline'>Min. mixing: </label>
<input type='number' id='minMix', step='0.1' value='-10' onchange='updateMixLimits()'></input>
</div>
<div>
<label for='maxMix' class='right inline'>Max. mixing: </label>
<input type='number' id='maxMix', step='0.1' value='10' onchange='updateMixLimits()'></input>
</div>
<div>
<label for='mixSamples' class='right inline'>Mixing Samples: </label>
<input type='number' id='mixingSamples', step='1' value='200' onchange='updateMixingSamples()'></input>
</div>
</form>
<p id="error1"></p>
</div>
</div>
<div class='sectionWrapper'>
<div id='a2Wrap' class='col-md-6'>
<div id='a2Plot'></div>
</div>
<div id='a4Wrap' class='col-md-6'>
<div id='a4Plot'></div>
</div>
</div>
<div class='sectionWrapper'>
<div id='a_parametric_Wrap' class='col-md-6'>
<div id='aParametricPlot'></div>
</div>
</div>
<div class='sectionWrapper content references'>
<div class='col-md-3'>
<img src='images/levelScheme.png'></img>
</div>
<div class='col-md-9'>
<h2>References</h2>
<h3>Physics</h3>
<ol>
<li>Clebsch-Gordon Coefficients: <i>An Effective Algorithm for Calculation of the C.G. Coefficients</i>, Liang Zuo, et. al. J. Appl. Cryst. (1993). 26, 302-304</li>
<li><i>Tables of coefficients for angular distribution of gamma rays from aligned nuclei</i>, T. Yamazaki. Nuclear Data A, 3(1):1-23, 1967.</li>
</ol>
<h3>Software</h3>
<ul>
<li>W(θ) vs cos(θ) plot: <a href='https://github.com/danvk/dygraphs/releases/tag/v1.1.1'>Dygraphs v1.1.1</a>, Dan Vanderkam</li>
<li>a2 and a4 plots: <a href='https://plot.ly/'>Plotly.js 1.1.1</a></li>
<li>Unit testing: <a href='http://qunitjs.com/'>QUnit 1.19.0</a>, The jQuery Foundation</li>
<li>CSS: <a href='http://getbootstrap.com/'>Twitter Bootstrap v3.3.5</a>, Twitter</li>
</ul>
</div>
</div>
<div id='footer' class='branding footer'>
<h3>Built at TRIUMF</h3>
<div class='col-md-4'>
<div>© 2015 GRIFFIN Collaboration</div>
<div>Citation DOI: <a href="http://dx.doi.org/10.5281/zenodo.45587"><img src="https://zenodo.org/badge/doi/10.5281/zenodo.45587.svg" alt="10.5281/zenodo.45587"></a></div>
<a href='https://github.com/GRIFFINCollaboration/AngularCorrelationUtility'>Source Code on GitHub</a>
</div>
</div>
<script>
var i;
//global datastore
dataStore = {
cache: {
factorial: [],
},
steps: parseInt(document.getElementById('mixingSamples').value,10), //number of bins in mixing ratio for a2 and a4 plots
minMix: parseInt(document.getElementById('minMix').value,10),
maxMix: parseInt(document.getElementById('maxMix').value,10)
};
//set up x and y values for a2 and a4 plots
dataStore.x = [];
dataStore.y = [];
for(i=0; i<dataStore.steps; i++){
dataStore.x.push(-1 + 2*i/dataStore.steps);
dataStore.y.push(-1 + 2*i/dataStore.steps);
}
//set up spin option dropdowns
evenA();
//set up plot
plot(true);
//generate initial calculation state
check_jvalues();
recalculate_L(1);
recalculate_L(2);
recalculate();
//repaint with window resize
window.onresize = plot
</script>
</body>
</html>