1 | <!DOCTYPE HTML>
|
---|
2 | <html>
|
---|
3 | <head>
|
---|
4 | <meta name="Author" content="The FACT Group" />
|
---|
5 | <meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
---|
6 | <title>FACT Project</title>
|
---|
7 |
|
---|
8 | <link rel="StyleSheet" type="text/css" href="../../style.css" />
|
---|
9 | <link href="flotsetup.css" rel="stylesheet" type="text/css">
|
---|
10 | <link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
|
---|
11 | <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../../flot/excanvas.js"></script><![endif]-->
|
---|
12 | <script language="javascript" type="text/javascript" src="../../flot/jquery.js"></script>
|
---|
13 | <script language="javascript" type="text/javascript" src="../../flot/jquery.flot.js"></script>
|
---|
14 | <script language="javascript" type="text/javascript" src="../../flot/jquery.flot.errorbars.js"></script>
|
---|
15 | <script language="javascript" type="text/javascript" src="../../flot/jquery.flot.navigate.js"></script>
|
---|
16 | <script language="javascript" type="text/javascript" src="../../flot/jquery.flot.selection.js"></script>
|
---|
17 | <script language="javascript" type="text/javascript" src="../../flot/jquery.flot.time.js"></script>
|
---|
18 | <script language="javascript" type="text/javascript" src="include.js"></script>
|
---|
19 | <script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
|
---|
20 | </head>
|
---|
21 | <body>
|
---|
22 |
|
---|
23 | <input type="button" size="8" id="login" style="float:right;" value='login' onclick='login("yes")'>
|
---|
24 | <input type="hidden" id="logged" value="no">
|
---|
25 |
|
---|
26 | <?php
|
---|
27 |
|
---|
28 | $tables=array(
|
---|
29 | "AnalysisResultsRunLP" => "LP",
|
---|
30 | "AnalysisResultsRunISDC" => "ISDC",
|
---|
31 | );
|
---|
32 |
|
---|
33 | $datachecks=array(
|
---|
34 | "1" => "off",
|
---|
35 | "2" => "on",
|
---|
36 | );
|
---|
37 |
|
---|
38 | $times=array(
|
---|
39 | "time" => "time",
|
---|
40 | "unix" => "unix",
|
---|
41 | "mjd" => "mjd",
|
---|
42 | );
|
---|
43 |
|
---|
44 | if (!empty($_GET["expert"]))
|
---|
45 | {
|
---|
46 | $timebins=array(
|
---|
47 | "5" => "5min",
|
---|
48 | "10" => "10min",
|
---|
49 | "20" => "20min",
|
---|
50 | "30" => "30min",
|
---|
51 | "40" => "40min",
|
---|
52 | "60" => "60min",
|
---|
53 | "90" => "90min",
|
---|
54 | "120" => "120min",
|
---|
55 | "180" => "180min",
|
---|
56 | "240" => "240min",
|
---|
57 | "300" => "300min",
|
---|
58 | "360" => "360min",
|
---|
59 | "-1" => "1night",
|
---|
60 | );
|
---|
61 | }
|
---|
62 | else
|
---|
63 | {
|
---|
64 | $timebins=array(
|
---|
65 | "20" => "20min",
|
---|
66 | "-1" => "1night",
|
---|
67 | );
|
---|
68 | }
|
---|
69 |
|
---|
70 | if (!empty($_GET["time"]))
|
---|
71 | $time=$_GET["time"];
|
---|
72 |
|
---|
73 | if (!empty($_GET["start"]))
|
---|
74 | $start=$_GET["start"];
|
---|
75 | //else
|
---|
76 | // $start="20111115";
|
---|
77 |
|
---|
78 | if (!empty($_GET["stop"]))
|
---|
79 | $stop=$_GET["stop"];
|
---|
80 | //else
|
---|
81 | // $stop="20201231";
|
---|
82 |
|
---|
83 | if (!empty($_GET["timebin"]))
|
---|
84 | $bin=$_GET["timebin"];
|
---|
85 | else
|
---|
86 | $bin="1night";
|
---|
87 |
|
---|
88 | if (!empty($_GET["email"]))
|
---|
89 | $email=$_GET["email"];
|
---|
90 | else
|
---|
91 | $email="";
|
---|
92 |
|
---|
93 | if (!empty($_GET["source"]))
|
---|
94 | $source=$_GET["source"];
|
---|
95 | else
|
---|
96 | $source="-1";
|
---|
97 |
|
---|
98 | //if (empty($_GET["timebin"]))
|
---|
99 | // $_GET["timebin"]="12";
|
---|
100 |
|
---|
101 | if (empty($_GET["table"]))
|
---|
102 | $_GET["table"]="AnalysisResultsRunLP";
|
---|
103 |
|
---|
104 | //still to be implemented in Step3.sh
|
---|
105 | if (empty($_GET["datacheck"]))
|
---|
106 | $_GET["datacheck"]="1";
|
---|
107 |
|
---|
108 | //variable for non-combinable date/source
|
---|
109 | $warn="";
|
---|
110 |
|
---|
111 |
|
---|
112 | include ("db.php");
|
---|
113 | $db_id = mysql_connect($host, $user, $pw);
|
---|
114 | mysql_select_db($db);
|
---|
115 |
|
---|
116 | ini_set("display_errors", "On");
|
---|
117 | ini_set("mysql.trace_mode", "On");
|
---|
118 |
|
---|
119 | echo "<big><big><big><u>FACT Quick Look Analysis</u></big></big></big><br><br>\n";
|
---|
120 | //echo "The official release of this webpage will take place on 1.9.2013.</big></big></big><br><br>";
|
---|
121 |
|
---|
122 | echo "<form name='formular' action='download.php' METHOD='GET'>\n";
|
---|
123 |
|
---|
124 | $query="SELECT fSourceKey, fSourceName, (SELECT COUNT(*) FROM ".$_GET["table"]." LEFT JOIN RunInfo USING(fNight, fRunID) WHERE fRunTypeKey=1 AND RunInfo.fSourceKey=Source.fSourceKey) AS num FROM Source WHERE fSourceTypeKey=1";
|
---|
125 | //echo $query."<br>";
|
---|
126 |
|
---|
127 | $sources=array();
|
---|
128 | $result=mysql_query($query);
|
---|
129 | while ($row = mysql_fetch_row($result))
|
---|
130 | $sources[$row[0]]=$row[1];
|
---|
131 | mysql_free_result($result);
|
---|
132 |
|
---|
133 | $query="SELECT Min(fNight), Max(fNight) FROM ".$_GET["table"];
|
---|
134 | //echo $query."<br>";
|
---|
135 |
|
---|
136 | $result=mysql_query($query);
|
---|
137 | while ($row = mysql_fetch_row($result))
|
---|
138 | {
|
---|
139 | if (empty($start))
|
---|
140 | $start=$row[0];
|
---|
141 | if (empty($stop))
|
---|
142 | $stop=$row[1];
|
---|
143 | }
|
---|
144 | mysql_free_result($result);
|
---|
145 |
|
---|
146 | if (strpos($email, "@")!= false && $source>0)
|
---|
147 | {
|
---|
148 | printf("Sending email to %s containing the data of %s from %d till %d for %s binning...<br>\n", $email, $sources[$source], $start, $stop, $timebins[$bin]);
|
---|
149 | echo "<input class='Width' type='button' value='Reset' onClick='self.location.href=\"download.php\"'><br>\n";
|
---|
150 | $sent=shell_exec("export AUTOMATIONSETUP='fact.lp.gate'; /users/fact/SW.automatic.processing/DataCheck/QuickLook/SendData.sh ".$start." ".$stop." ".$source." ".$bin." ".$email." ".$_GET["table"]." ".$time);
|
---|
151 | echo $sent;
|
---|
152 | return;
|
---|
153 | }
|
---|
154 |
|
---|
155 | printf("From <input name='start' type='text' size='8' maxlength='8' value='%s'> (YYYYMMDD)\n", $start);
|
---|
156 | printf("to <input name='stop' type='text' size='8' maxlength='8' value='%s'> (YYYYMMDD)\n <br>\n", $stop);
|
---|
157 |
|
---|
158 | echo "source <select name='source' size='1'>\n";
|
---|
159 | if ($source == 0)
|
---|
160 | printf("<option value='-1' selected>Select Source</option>\n");
|
---|
161 | else
|
---|
162 | printf("<option value='-1'>Select Source</option>\n");
|
---|
163 | foreach ($sources as $key => $sourcename)
|
---|
164 | {
|
---|
165 | if ($source==$key)
|
---|
166 | printf("<option value='%s' selected>%s</option>\n", $key, $sourcename);
|
---|
167 | else
|
---|
168 | printf("<option value='%s'>%s</option>\n", $key, $sourcename);
|
---|
169 | }
|
---|
170 | echo "</select>\n";
|
---|
171 |
|
---|
172 | echo "binning <select name='timebin' size='1'>\n";
|
---|
173 | foreach ($timebins as $key => $name)
|
---|
174 | {
|
---|
175 | if ($_GET["timebin"] == $key)
|
---|
176 | printf("<option value='%s' selected>%s</option>\n", $key, $name);
|
---|
177 | else
|
---|
178 | printf("<option value='%s'>%s</option>\n", $key, $name);
|
---|
179 | }
|
---|
180 | echo "</select>\n <br>\n";
|
---|
181 |
|
---|
182 | echo "format of time <select name='time' size='1'>\n";
|
---|
183 | foreach ($times as $key => $name)
|
---|
184 | {
|
---|
185 | if ($_GET["time"] == $key)
|
---|
186 | printf("<option value='%s' selected>%s</option>\n", $key, $name);
|
---|
187 | else
|
---|
188 | printf("<option value='%s'>%s</option>\n", $key, $name);
|
---|
189 | }
|
---|
190 | echo "</select>\n <br>\n";
|
---|
191 |
|
---|
192 | echo "Please provide your email address here to receive the data: <br>\n";
|
---|
193 | printf("<input name='email' type='text' size='20' maxlength='50' value='%s'>\n<br>\n", $email);
|
---|
194 |
|
---|
195 | echo "By clicking on the button, you agree to the data usage policy: <br>\n";
|
---|
196 | echo "<input class='Width' type='button' value='Send data by Email' onClick='submit()'><br>\n";
|
---|
197 | echo "<input class='Width' type='button' value='Reset' onClick='self.location.href=\"download.php\"'><br>\n";
|
---|
198 |
|
---|
199 |
|
---|
200 | if (!empty($_GET["expert"]))
|
---|
201 | {
|
---|
202 | echo "Expert mode: <br>\n";
|
---|
203 | echo "<input type='hidden' name='expert' value='yes'>\n";
|
---|
204 |
|
---|
205 | echo " Select Analysis: <select name='table' size='1'>\n";
|
---|
206 | foreach ($tables as $key => $name)
|
---|
207 | {
|
---|
208 | if ($_GET["table"] == $key)
|
---|
209 | printf("<option value='%s' selected>%s</option>\n", $key, $name);
|
---|
210 | else
|
---|
211 | printf("<option value='%s'>%s</option>\n", $key, $name);
|
---|
212 | }
|
---|
213 | echo "</select> <br>\n";
|
---|
214 |
|
---|
215 | echo " Select Datacheck: <select name='datacheck' size='1'>\n";
|
---|
216 | foreach ($datachecks as $key => $name)
|
---|
217 | {
|
---|
218 | if ($_GET["datacheck"] == $key)
|
---|
219 | printf("<option value='%s' selected>%s</option>\n", $key, $name);
|
---|
220 | else
|
---|
221 | printf("<option value='%s'>%s</option>\n", $key, $name);
|
---|
222 | }
|
---|
223 | echo "</select> (not yet implemented)<br>\n";
|
---|
224 |
|
---|
225 | }
|
---|
226 |
|
---|
227 | echo "</form>\n";
|
---|
228 |
|
---|
229 | echo "<br>\n";
|
---|
230 | echo "<b>REMARKS:</b> ";
|
---|
231 | echo "<ul>";
|
---|
232 | //echo "<li>The results shown on this page are <b><i>PRELIMINARY</i></b>.</li>";
|
---|
233 | echo "<li>These are the results of a <b>fast quick look analysis</b> on site, i.e. they are <b>preliminary</b>.</li>\n";
|
---|
234 | echo "<li>The quick look analysis includes all data, i.e. no data selection done.</li>\n";
|
---|
235 | //echo "<li><b>NO data check</b> is included in the analysis.</li>";
|
---|
236 | echo "<li>The shown curves are not fluxes but <b>excess rates</b> (number of excess events per effective ontime), \n";
|
---|
237 | echo "i.e. there is a dependence on trigger threshold and zenith distance of the observation (with the current \n";
|
---|
238 | echo "analysis for zenith distance > 40 degree and trigger threshold > 500 DAC counts).</li>\n";
|
---|
239 | //echo "i.e. a dependence on trigger threshold and zenith distance of the observation is expected ";
|
---|
240 | //echo "for zenith distance larger than 40 degree and very strong moon light.</li>";
|
---|
241 | //echo "<li><b>NO corrections</b> for the dependence on zenith distance and trigger threshold of the observation are applied so far.</li>";
|
---|
242 | //echo "<li>This webpage shows the <b>excess rates</b> (black), i.e. number of excess events ";
|
---|
243 | //echo "(signal minus background in the signal region) devided by the ontime of the observation, ";
|
---|
244 | //echo "and the <b>background rates</b> (blue), i.e. number of background events devided by ontime. </li>";
|
---|
245 | echo "<li>The curves are provided with 20 min binning and nightly binning.</li>\n";
|
---|
246 | echo "<li>In case, you need further details about the data or a different binning, please do not hesitate to contact us.</li>\n";
|
---|
247 | echo "<li>QLA results are available for the data since 12.12.2012. For older data, please contact us.</li>\n";
|
---|
248 | echo "<li>New software versions were introduced at the following dates: 24.5.2014</li>\n";
|
---|
249 | echo "</ul>";
|
---|
250 | echo "If you intend to use the data or information from this website, please let us know for reference.<br>\n";
|
---|
251 | echo "<big><b>Please cite this webpage and the ";
|
---|
252 | echo "<a target='_blank' href='http://iopscience.iop.org/1748-0221/8/06/P06008'>FACT design paper</a>\n ";
|
---|
253 | echo "when using information from this webpage or any FACT data.</b></big>\n";
|
---|
254 | echo "<br><br>\n \n ";
|
---|
255 | echo "Reference FACT Design Paper: H. Anderhub et al. JINST 8 P6008 <a target='_blank' href='http://adsabs.harvard.edu/abs/2013JInst...8P6008A'>ADS</a>\n ";
|
---|
256 | echo "<a target='_blank' href='http://iopscience.iop.org/1748-0221/8/06/P06008'>open access</a>\n<br>\n";
|
---|
257 | echo "Reference FACT Performance Paper: A. Biland et al. JINST 9 P10012 <a target='_blank' href='http://adsabs.harvard.edu/abs/2014JInst...9P0012B'>ADS</a>\n ";
|
---|
258 | echo "<a target='_blank' href='http://iopscience.iop.org/1748-0221/9/10/P10012/'>open access</a>\n<br>\n";
|
---|
259 | echo "Information on the Quick Look Analysis: D. Dorner et al. Proceedings Fermi Symposium 2014 <a target='_blank' href='http://adsabs.harvard.edu/abs/2015arXiv150202582D'>ADS</a>\n ";
|
---|
260 | echo "<a target='_blank' href='https://arxiv.org/pdf/1502.02582v1.pdf'>open access</a>\n<br><br>\n";
|
---|
261 | echo "Contact: Daniela Dorner <i>dorner<at>astro.uni-wuerzburg.de</i>.<br>";
|
---|
262 | //echo "You acknowledge these regulations by clicking on the 'Show' button.</b></big> <br><br><br>";
|
---|
263 |
|
---|
264 | /*
|
---|
265 | $ranges=array(
|
---|
266 | // "5min" => " 5 min",
|
---|
267 | // "10min" => "10 min",
|
---|
268 | "20min" => "20 min",
|
---|
269 | "30min" => "30 min",
|
---|
270 | "40min" => "40 min",
|
---|
271 | "60min" => "60 min",
|
---|
272 | "90min" => "90 min",
|
---|
273 | "120min" => "120 min",
|
---|
274 | "180min" => "180 min",
|
---|
275 | "240min" => "240 min",
|
---|
276 | "300min" => "300 min",
|
---|
277 | "360min" => "360 min",
|
---|
278 | // "0001nights" => "1 night",
|
---|
279 | // "0002nights" => "2 nights",
|
---|
280 | // "0004nights" => "4 nights",
|
---|
281 | // "0008nights" => "8 nights",
|
---|
282 | // "0016nights" => "16 nights",
|
---|
283 | );
|
---|
284 |
|
---|
285 | echo "</body>";
|
---|
286 | echo "</html>";
|
---|
287 | */
|
---|
288 | //$dom = new DOMDocument();
|
---|
289 | //$dom->loadHTML("download.php");
|
---|
290 | //echo $dom->getElementById("logged");
|
---|
291 |
|
---|
292 | ?>
|
---|
293 | </body>
|
---|
294 | </html>
|
---|