source: trunk/www/dch/lightcurves.php@ 15313

Last change on this file since 15313 was 15313, checked in by Daniela Dorner, 12 years ago
added (page to show plots from quicklook analysis)
File size: 2.2 KB
Line 
1<?php
2
3echo (file_get_contents("header.html"));
4
5if (!empty($_GET["bin"]))
6 $bin=$_GET["bin"];
7else
8 $bin="1nights";
9$path="../lightcurves/".$_GET["source"]."/lightcurve".$bin;
10
11$sources=array(
12 "1" => "Mrk421",
13 "2" => "Mrk501",
14 "5" => "Crab",
15 "7" => "1ES 1959+650",
16 "11" => "IC 310",
17 );
18
19$ranges=array(
20 "005min" => " 5 min",
21 "010min" => "10 min",
22 "020min" => "20 min",
23 "040min" => "40 min",
24 "080min" => "80 min",
25 "160min" => "160 min",
26 "320min" => "320 min",
27 "0001nights" => "1 night",
28 "0002nights" => "2 nights",
29 "0004nights" => "4 nights",
30 "0008nights" => "8 nights",
31 "0016nights" => "16 nights",
32 );
33
34echo "<body>";
35echo "<form action='lightcurves.php' METHOD='GET'>\n";
36echo "<input type='submit' value='Show'> excess rates for ";
37echo "source <select name='source' size='1'>";
38foreach ($sources as $key => $name)
39{
40 if ($_GET["source"] == $key)
41 printf("<option value='%s' selected>%s</option>", $key, $name);
42 else
43 printf("<option value='%s'>%s</option>", $key, $name);
44}
45echo "</select>";
46echo " for <select name='bin' size='1'>";
47foreach ($ranges as $range => $name)
48{
49 if ($_GET["bin"] == $range)
50 printf("<option value='%s' selected>%s</option>", $range, $name);
51 else
52 printf("<option value='%s'>%s</option>", $range, $name);
53}
54echo "</select>";
55echo "</form>";
56
57$numplots=7;
58
59if (file_exists($path."/lc.root"))
60{
61 printf("<a href='%s'>more files</a>", $path);
62 echo "<table>";
63 for ($i=1; $i<$numplots+1; $i++)
64 {
65 if (strpos($_GET["bin"], "night"))
66 printf("<tr><td><img src='%s/lc.root-%d.png' alt='%d'></td></tr>", $path, $i, $i);
67 else
68 printf("<tr><td><img src='%s/lc.root-%d.png' alt='%d'></td><td><img src='%s/lc.root-%d.png' alt='%d'></td></tr>", $path, $i, $i, $path, $i+$numplots, $i+$numplots);
69 }
70 echo "</table>";
71}
72else
73 echo "<br> No files yet for " . $sources[$_GET["source"]] . " with " . $ranges[$_GET["bin"]]. ". <br>";
74
75echo "</body>";
76echo "</html>";
77?>
Note: See TracBrowser for help on using the repository browser.