-
Notifications
You must be signed in to change notification settings - Fork 6
/
efficiencyFitter.html
208 lines (180 loc) · 9.58 KB
/
efficiencyFitter.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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<html>
<head>
<title>GRIFFIN Efficiency Fitter</title>
<script src='scripts/HTMLImports.min.js' type="text/javascript"></script>
<script src='scripts/mustache.js' type="text/javascript"></script>
<script src='scripts/easeljs-0.7.0.min.js' type="text/javascript"></script>
<script src='scripts/dygraphs.1.1.1.min.js' type="text/javascript"></script>
<script src='scripts/regression.min.js' type="text/javascript"></script>
<script src='scripts/gammaSpectrum.js' type="text/javascript"></script>
<script src='scripts/fitit.js' type="text/javascript"></script>
<script src="scripts/jquery1-11-3.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="scripts/bootstrap3-3-5.min.js"></script>
<script src='scripts/helpers.js' type="text/javascript"></script>
<script src='scripts/calibrationTools.js' type="text/javascript"></script>
<script src='scripts/efficiencyFitter.js' type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/custom.css"/>
<!--HTML imports-->
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link id='header' rel="import" href="templates/header/header.html">
<link id='efficiencyFitterReport' rel="import" href="templates/efficiencyFitterReport/efficiencyFitterReport.html">
<link id='efficiencyFitterReportTable' rel="import" href="templates/efficiencyFitterReport/efficiencyFitterReportTable.html">
<link id='plotGrid' rel="import" href="templates/plotGrid/plotGrid.html">
<link id='plotControl' rel="import" href="templates/plotControl/plotControl.html">
<link id='plotListLite' rel="import" href="templates/plotList/plotListLite.html">
<link id='dataplot' rel="import" href="templates/dataplot/dataplot.html">
<link id='footer' rel="import" href="templates/footer/footer.html">
</head>
<body>
<div id='head'></div>
<div id='messageDiv' class='col-md-12'></div>
<div id='progressDiv' class="progress hidden" width=100%>
<div id='progress' class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
</div>
<!--helpful hints-->
<div class='col-md-6'>
<div id='histogramMessage' class="alert alert-warning" role="alert">
<span class="glyphicon glyphicon-check" aria-hidden="false"></span>
Select which histogram files contain the gain-matched source data for determining the efficiency.
</div>
<div id='downloadMessage' class="alert alert-warning hidden" role="alert">
<span class="glyphicon glyphicon-check" aria-hidden="true"></span>
Spectra downloading, please wait...
</div>
<div id='projectionsMessage' class="alert alert-warning hidden" role="alert">
<span class="glyphicon glyphicon-check" aria-hidden="true"></span>
Projecting the 180-degree coincidence matrices for summing corrections.
</div>
<div id='fittingSinglesMessage' class="alert alert-warning hidden" role="alert">
<span class="glyphicon glyphicon-check" aria-hidden="true"></span>
Fitting the peaks in the singles spectra for each source.
</div>
<div id='fittingSummingMessage' class="alert alert-warning hidden" role="alert">
<span class="glyphicon glyphicon-check" aria-hidden="true"></span>
Fitting the peaks in the projected spectra for summing corrections.
</div>
<div id='efficiencyMessage' class="alert alert-warning hidden" role="alert">
<span class="glyphicon glyphicon-check" aria-hidden="true"></span>
Performing normalizations and building efficiency curves.
</div>
<div id='reviewMessage' class="alert alert-warning hidden" role="alert">
<span class="glyphicon glyphicon-check" aria-hidden="true"></span>
Review the results in the table below, and refit any troublesome peaks one at a time.
</div>
</div>
<!--User input for initial setup-->
<div id='histoChoiceBar' class='col-md-12'>
<div id='histoChoiceDir' class='col-md-8'></div>
<div class='col-md-12'>
<div id='histoChoice133Ba' class='col-md-4'></div>
<div id='histoChoice152Eu' class='col-md-4'></div>
</div>
<div class='col-md-12'>
<div id='histoChoice56Co' class='col-md-4'></div>
<div id='histoChoice60Co' class='col-md-4'></div>
<div id='sourceChoice60Co' class='col-md-2'></div>
</div>
<div class='col-md-12'>
<div id='histoChoice11Be' class='col-md-4'></div>
</div>
<div id='histoChoiceSubmit' class='col-md-12'></div>
</div>
<!--Spectrum Plotting-->
<div id='plotRegion' class='sectionWrapper'>
<div id='plotWrap' class='col-md-9 plotRegion item'>
<div id='plottingGrid'></div>
<div class='col-md-8' id='plotCtrl'></div>
<div class='sectionWrapper refitButtons'>
<div class='col-md-12'>
<button type="button" class="btn btn-default btn-lg" id='fitLow' engaged='0'>
<span id='refitLoBadge' class="glyphicon glyphicon-equalizer" aria-hidden="true"></span>
<span id='loText'>Refit a Peak</span>
</button>
</div>
</div>
</div>
<div class='col-md-2 item'>
<div id='plotList' style='overflow-y:scroll; height:400px;'></div>
</div>
</div>
<!--Table of calculations and results-->
<div id='efficiencyFitter'></div>
<!--Efficiency curve Plotting-->
<div id='graphSection' class='sectionWrapper'>
<div id='efficiencyPlotWrap' class='col-md-12'>
<div class='col-md-12'>
<h3>Efficiency curves:</h3>
<div id='efficiencyPlotAbs' class='col-md-6'></div>
<div id='efficiencyPlotRel' class='col-md-6'></div>
</div>
<div class='col-md-12'>
<h3>Efficiency curves of the individual sources:</h3>
<div id='efficiencyPlot133Ba' class='col-md-6'></div>
<div id='efficiencyPlot152Eu' class='col-md-6'></div>
</div>
<div class='col-md-12'>
<div id='efficiencyPlot56Co' class='col-md-6'></div>
<div id='efficiencyPlot60Co' class='col-md-6'></div>
</div>
<div class='col-md-12'>
<div id='efficiencyPlot11Be' class='col-md-6'></div>
</div>
<div class='col-md-12'>
<div id='addbackSelectDiv' class='col-md-6'></div>
</div>
</div>
</div>
</div>
<div id='foot'></div>
<script>
window.addEventListener('HTMLImportsLoaded', function(e) {
dataStore._plotGrid = new plotGrid('plottingGrid');
dataStore._plotControl = new plotControl('plotCtrl', 'horizontal');
dataStore._dataplot[0] = new dataplot('efficiencyPlotAbs',0);
dataStore._dataplot[1] = new dataplot('efficiencyPlotRel',1);
dataStore._dataplot[2] = new dataplot('efficiencyPlot133Ba',2);
dataStore._dataplot[3] = new dataplot('efficiencyPlot152Eu',3);
dataStore._dataplot[4] = new dataplot('efficiencyPlot56Co',4);
dataStore._dataplot[5] = new dataplot('efficiencyPlot60Co',5);
dataStore._dataplot[6] = new dataplot('efficiencyPlot11Be',6);
dataStore.templates = prepareTemplates(['header', 'efficiencyFitterReport', 'efficiencyFitterReportTable', 'plotGrid', 'plotControl', 'plotListLite', 'dataplot', 'footer']);
setupHeader('head', 'Efficiency Fitter');
dataStore._plotGrid.setup();
dataStore._plotControl.setup();
//set up spectrum cell
dataStore._plotGrid.manageCellCreation(null, dataStore.plots[0]);
dataStore._dataplot[0].setup(0);
dataStore._dataplot[1].setup(1);
dataStore._dataplot[2].setup(2);
dataStore._dataplot[3].setup(3);
dataStore._dataplot[4].setup(4);
dataStore._dataplot[5].setup(5);
dataStore._dataplot[6].setup(6);
setupFooter('foot');
//don't want additional plots in this app
deleteNode('plottingGridnewPlotButton');
// Create the text input for the Histogram file directory and file inputs
var newLabel = document.createElement("label");
newLabel.for = 'HistoDirectoryInput';
newLabel.innerHTML = 'Directory of Histogram files: ';
document.getElementById('histoChoiceDir').appendChild(newLabel);
newInput = document.createElement('input');
newInput.id = 'HistoDirectoryInput';
newInput.type = 'text';
newInput.style.width = '400px';
newInput.value = dataStore.histoFileDirectoryPath;
newInput.onchange = function(){
dataStore.histoFileDirectoryPath = this.value;
getHistoFileListFromServer();
}.bind(newInput);
document.getElementById('histoChoiceDir').appendChild(newInput);
// Grab the histogram list for the default directory
getHistoFileListFromServer();
$(function () {
$('[data-toggle="tooltip"]').tooltip()
});
});
</script>
</body>
</html>