-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathenergyCalibrator.html
More file actions
executable file
·187 lines (158 loc) · 8.02 KB
/
energyCalibrator.html
File metadata and controls
executable file
·187 lines (158 loc) · 8.02 KB
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
<html>
<head>
<title>GRIFFIN Energy Calibrator</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>
<script src="scripts/bootstrap3-3-5.min.js"></script>
<script src='scripts/helpers.js' type="text/javascript"></script>
<script src='scripts/energyCalibrator.js' type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap3-3-5.min.css">
<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='energyCalibratorDetectorReport' rel="import" href="templates/energyCalibratorReport/energyCalibratorReport.html">
<link id='energyCalibratorCoefficienctsReport' rel="import" href="templates/energyCalibratorReport/energyCalibratorReport.html">
<link id='energyCalibratorDetectorReportTable' rel="import" href="templates/energyCalibratorReport/energyCalibratorReportTable.html">
<link id='energyCalibratorCoefficientsReportTable' rel="import" href="templates/energyCalibratorReport/energyCalibratorReportTable.html">
<link id='paginationMenu' rel="import" href="templates/paginationMenu/paginationMenu.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 class="container" width=100%>
<div id='messageDiv' class='col-md-12'>
<div id='messageDivText'></div><div id='messageDivButton'></div>
</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>
</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 source data for determining the energy calibration.
</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='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='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 id='histoChoice66Ga' 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='histoChoice244Cm+13C' class='col-md-4'></div>
</div>
<div id='histoChoiceSubmit' class='col-md-12'></div>
</div>
<div id='menu' class='col-md-12 hidden'></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'>
<select id="refitSelect"></select>
<button type="button" class="btn btn-default btn-lg" id='refitButton' engaged='0'>
<span id='refitButtonBadge' class="glyphicon glyphicon-equalizer" aria-hidden="true"></span>
<span id='refitButtonText'>Refit this 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='detectorReportRegion' class='col-md-12'>
<div id='tableMenuDiv' class='col-md-12'></div>
<div id='reportCardDiv' class='col-md-6'></div>
<div id='energyCalibratorDetector' class='col-md-7'></div>
<div id='detectorReportPlot' class='col-md-5'></div>
</div>
<div id='resultsTableRegion' class='col-md-12'>
<div id='energyCalibratorResults' class='col-md-12'></div>
</div>
<div id='foot'></div>
<script>
window.addEventListener('HTMLImportsLoaded', function(e) {
dataStore._plotGrid = new plotGrid('plottingGrid');
dataStore._plotControl = new plotControl('plotCtrl', 'horizontal');
dataStore.templates = prepareTemplates(['header', 'paginationMenu', 'energyCalibratorDetectorReport', 'energyCalibratorCoefficienctsReport', 'energyCalibratorDetectorReportTable', 'energyCalibratorCoefficientsReportTable', 'plotGrid', 'plotControl', 'plotListLite', 'dataplot', 'footer']);
setupHeader('head', 'Energy Calibrator');
setupPaginationMenu('menu');
dataStore._plotGrid.setup();
dataStore._plotControl.setup();
//set up spectrum cell
dataStore._plotGrid.manageCellCreation(null, dataStore.plots[0]);
setupFooter('foot');
//don't want additional plots in this app
deleteNode('plottingGridnewPlotButton');
// Inject the dismiss button to the messageDiv
newButton = document.createElement('button');
newButton.setAttribute('id', 'messageDivDismissButton');
newButton.setAttribute('class', 'btn btn-default btn-lg');
newButton.innerHTML = "Dismiss";
newButton.onclick = function(){
ClearErrorConnectingToAnalyzerServer();
}.bind(newButton);
document.getElementById('messageDivButton').appendChild(newButton);
// Set up the refit button
document.getElementById('refitButton').onclick = function(){ toggleRefitMode(); }
document.getElementById('refitButton').disabled = true; // Disabled until there are peaks to refit
// 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();
getMidasFileListFromServer(); // The request for details follows this
$(function () {
$('[data-toggle="tooltip"]').tooltip()
});
});
// Set up event listener
listener('histoChoiceBar', 'midasFileDetailsAvailable', addTitlesToHistoListSelect);
</script>
</body>
</html>