forked from GRIFFINCollaboration/SpectrumViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gainMatcher.html
134 lines (113 loc) · 6.44 KB
/
gainMatcher.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
<html>
<head>
<title>GRIFFIN Gain Matcher</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/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/gainMatcher.js' type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/custom.css"/>
<!--HTML imports-->
<link id='header' rel="import" href="templates/header/header.html">
<link id='gainMatchReport' rel="import" href="templates/gainMatchReport/gainMatchReport.html">
<link id='matchReportTable' rel="import" href="templates/gainMatchReport/matchReportTable.html">
<link id='gainMatchSetupBar' rel="import" href="templates/gainMatchReport/gainMatchSetupBar.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='striptool' rel="import" href="templates/striptool/striptool.html">
<link id='footer' rel="import" href="templates/footer/footer.html">
</head>
<body>
<div id='head'></div>
<!--helpful hints-->
<div class='col-md-6'>
<div id='waitMessage' class="alert alert-warning" role="alert">
<span class="glyphicon glyphicon-check" aria-hidden="true"></span>
Spectra downloading, please wait...
</div>
<div id='regionMessage' class="alert alert-warning hidden" role="alert">
<span class="glyphicon glyphicon-check" aria-hidden="true"></span>
Shift-click either end of a single line crossing both peaks you'd like to calibrate on.<br>
Tip: aim low and wide!
</div>
<div id='pickerMessage' class="alert alert-warning hidden" role="alert">
<span class="glyphicon glyphicon-check" aria-hidden="true"></span>
Enter the each peak's position along the line counting from the left, and its energy.
</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 pathological peaks one at a time.
</div>
</div>
<!--peak definition-->
<div id='setupBar' class='col-md-12'></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 Low Energy Peak</span>
</button>
<button type="button" class="btn btn-default btn-lg" id='fitHigh' engaged='0'>
<span id='refitHiBadge' class="glyphicon glyphicon-equalizer" aria-hidden="true"></span>
<span id='hiText'>Refit High Energy Peak</span>
</button>
</div>
</div>
</div>
<div class='col-md-2 item'>
<div id='plotList'></div>
</div>
</div>
<div id='gainMatcher'></div>
<!--Resolution-->
<div id='resolutionSection' class='sectionWrapper'>
<div id='resolutionWrap' class='col-md-6 item'>
<div id='resolution'></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._plotListLite = new plotListLite('plotList');
dataStore._gainMatchReport = new gainMatchReport('gainMatcher', 'setupBar');
dataStore._striptool = new striptool('resolution');
dataStore.templates = prepareTemplates(['header', 'gainMatchReport', 'matchReportTable', 'gainMatchSetupBar', 'plotGrid', 'plotControl', 'plotListLite', 'striptool', 'footer']);
setupHeader('head', 'Gain Matcher');
dataStore._plotGrid.setup();
dataStore._plotControl.setup();
//set up spectrum cell
dataStore._plotGrid.manageCellCreation(null, dataStore.plots[0]);
dataStore._plotListLite.setup();
dataStore._gainMatchReport.setup();
dataStore._striptool.setup();
setupFooter('foot');
// set up shift-click behavior:
dataStore.viewers[dataStore.plots[0]].shiftclickCallback = shiftclick;
//don't want additional plots in this app
deleteNode('plottingGridnewPlotButton');
//plug in special fit controls
document.getElementById('fitLow').onclick = dataStore._gainMatchReport.toggleFitMode;
document.getElementById('fitHigh').onclick = dataStore._gainMatchReport.toggleFitMode;
//identify, register & fetch all spectra
promiseScript(dataStore.DAQquery)
$(function () {
$('[data-toggle="tooltip"]').tooltip()
});
});
</script>
</body>
</html>