Index: trunk/ippMonitor/raw/pointing.php
===================================================================
--- trunk/ippMonitor/raw/pointing.php	(revision 42795)
+++ trunk/ippMonitor/raw/pointing.php	(revision 42972)
@@ -15,5 +15,5 @@
 else {$myMenu = "ipp.czar.dat";}
 
-menu($myMenu, 'Czartool on '.$lastUpdateTime, 'ipp.css', $ID['link'], $ID['proj']);
+menu($myMenu, 'Czartool on ', 'ipp.css', $ID['link'], $ID['proj']);
 
 $pass = $ID['pass'];
@@ -22,483 +22,55 @@
 
 // Fetch data based on range selection
-$range = isset($_GET['range']) ? $_GET['range'] : 'yday';
+$range = isset($_GET['range']) ? $_GET['range'] : 'week';
+
+require_once 'functions.php';
 
 echo "<table border=\"0\">";
 echo "<tr>";
 echo "  <td style=width:1240>";
-echo "    <h1 align=\"middle\">Pointing Report</h1>";
-echo "  <center>";
-echo '    <a href="?pass=' . urlencode($pass) . '&proj=' . urlencode($proj) . '&range=yday">Last night (default)</a> | ';
-echo '    <a href="?pass=' . urlencode($pass) . '&proj=' . urlencode($proj) . '&range=day">Today (MJD '.getMJD().')</a> | ';
-echo '    <a href="?pass=' . urlencode($pass) . '&proj=' . urlencode($proj) . '&range=week">Past 7 days</a> | ';
-echo '    <a href="?pass=' . urlencode($pass) . '&proj=' . urlencode($proj) . '&range=month">Past 30 days</a> | ';
-echo '    <a href="?pass=' . urlencode($pass) . '&proj=' . urlencode($proj) . '&range=year">Past 365 days</a> | ';
-echo '    <a href="?pass=' . urlencode($pass) . '&proj=' . urlencode($proj) . '&range=all">All </a>   ';
+echo "    <h1 align=\"middle\">Data Quality Report</h1>";
+
+#
+# project selector
+echo '<center>';
+# Project selector with highlight
+$projects = ["gpc1" => "GPC1", "gpc2" => "GPC2"];
+foreach ($projects as $key => $label) {
+    if ($proj == $key) {
+        echo "<strong style='color:blue;'>$label</strong> | ";
+    } else {
+        echo '<a href="?pass=' . urlencode($pass) . '&proj=' . $key . '&range=' . urlencode($range) . '">' . $label . '</a> | ';
+    }
+}
+echo "<br>";
+
+# range links with highlighting
+$ranges = [
+    "today"     => "Today",
+    "yesterday" => "Yesterday",
+    "week"      => "Week",
+    "month"     => "Month",
+    "year"      => "Year",
+    "all"       => "All"
+];
+
+foreach ($ranges as $key => $label) {
+    if ($range == $key) {
+        echo "<strong style='color:blue;'>$label</strong> | ";
+    } else {
+        echo '<a href="?pass=' . urlencode($pass) . '&proj=' . urlencode($proj) . '&range=' . $key . '">' . $label . '</a> | ';
+    }
+}
+
 echo "  </td>";
 echo "</tr>";
 echo "</table>";
-echo getPointing($projectdb, $range);
 
+echo "    <div style=\"margin-bottom:10px; font-size:14px; color:#555;\">";
+echo "      Current MJD: " . getMJD();
+echo "    </div>";
+
+echo getPointing($projectdb, $range, $proj);
 menu_end();
-
-
-/////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-//                               Functions                                 //
-//                                                                         //
-/////////////////////////////////////////////////////////////////////////////
-###########################################################################
-#
-# Get data quality
-#
-###########################################################################
-function getPointing($db, $range = 'yday') {
-    // Start timer
-    $start = microtime(true);
-
-    $mjdDay  = getMJD();
-    $mjdDay_yearback = $mjdDay - 366;
-    $mjdDay_monthback = $mjdDay - 32;
-    $min_exp_id = 0;
-
-    // Determine the reference exp_name based on the selected range
-    switch ($range) {
-        case 'year':
-            $expname = "o" . $mjdDay_yearback . "%";
-            break;
-        case 'month':
-            $expname = "o" . $mjdDay_monthback . "%";
-            break;
-        case 'week':
-            $expname = "o" . ($mjdDay - 7) . "%";
-            break;
-        case 'day':
-            $expname = "o" . $mjdDay . "%";
-            break;
-        default:
-            $expname = "o" . ($mjdDay - 1) . "%"; // Default: last night
-            break;
-    }
-
-    // Query to get the minimum exp_id
-    $expIdQuery = "SELECT MIN(exp_id) AS min_exp_id FROM rawExp WHERE rawExp.exp_name LIKE '$expname'";
-    $result = $db->query($expIdQuery);
-
-    if (DB::isError($result)) {
-        die("Database error: " . $result->getMessage());
-    }
-
-    $row = $result->fetchRow(DB_FETCHMODE_ASSOC);
-
-    if (!empty($row['min_exp_id'])) {
-        $min_exp_id = $row['min_exp_id'];
-    //    echo "Minimum exp_id: " . $min_exp_id;
-    } else {
-        echo "No results found.";
-    }
-
-    //echo "<br><br>";
-
-    // Determine the date constraint based on the range
-    switch ($range) {
-        case 'year':
-            $dateConstraint = "dateobs >= NOW() - INTERVAL 365 DAY AND rawExp.exp_id >= $min_exp_id";
-            break;
-        case 'month':
-            $dateConstraint = "dateobs >= NOW() - INTERVAL 30 DAY AND rawExp.exp_id >= $min_exp_id";
-            break;
-        case 'week':
-            $expnames = array();
-            for ($i = 0; $i < 7; $i++) {
-                $expnames[] = "rawExp.exp_name LIKE 'o" . ($mjdDay - $i) . "%'";
-            }
-            $dateConstraint = "(" . implode(" OR ", $expnames) . ") AND rawExp.exp_id >= $min_exp_id";
-            break;
-        case 'yday':
-            $dateConstraint = "rawExp.exp_name LIKE 'o" . ($mjdDay - 1) . "%' AND rawExp.exp_id >= $min_exp_id";
-            break;
-        case 'day':
-            $dateConstraint = "rawExp.exp_name LIKE 'o$mjdDay%' AND rawExp.exp_id >= $min_exp_id";
-            break;
-        case 'all':
-            $dateConstraint = "rawExp.exp_id >= 0";
-            break;
-        default: // Default to last night
-            $dateConstraint = "rawExp.exp_name LIKE 'o" . ($mjdDay - 1) . "%' AND rawExp.exp_id >= $min_exp_id";
-            break;
-    }
- 
-    // Updated SQL query
-    $sql = "select * from (SELECT SUBTIME(dateobs, '10:00:00') AS time, AST_R0, AST_D0,
-                   round(( 367*YEAR(dateobs)- FLOOR((7 * (YEAR(dateobs) + FLOOR((MONTH(dateobs) + 9) / 12))) / 4) + FLOOR(275 * MONTH(dateobs) / 9)
-                   + DAY(dateobs) + 1721013.5 + (HOUR(dateobs) / 24.0) + (MINUTE(dateobs) / 1440.0) + (SECOND(dateobs) / 86400.0) - 2400000.5), 5) AS MJD,
-                   filter, exp_time, comment, ra*180/pi() as RA, decl*180/pi() as DECL, AST_RS, AST_DS, AST_T0, posang, exp_name, alt, az, rawExp.exp_id, camRun.label
-            FROM rawExp
-            JOIN chipRun USING (exp_id)
-            JOIN camRun USING (chip_id)
-            JOIN camProcessedExp USING (cam_id)
-            WHERE $dateConstraint
-              AND exp_type = 'OBJECT'
-              AND camRun.state LIKE 'full'
-              AND camProcessedExp.fault = 0
-              AND camProcessedExp.zpt_obs != 0 ORDER BY RAND() limit 5000) as sub order by time;";
-
-    $DQarray = array();
-    $qry = $db->query($sql);
-    if (dberror($qry)) {
-        echo "<b>Error with $sql</b><br>\n";
-        return;
-    }
-    //    echo "$sql<br><br>\n";
-    
-    while ($qry->fetchInto($row)) {
-        $DQarray[] = $row;
-    }
-    
-    // Ensure $DQarray is not empty
-    if (empty($DQarray)) {
-        echo "<center><b> No data for MJD: $mjdDay </b></center>";
-        return; // Stop execution if no data to encode
-    }
-    
-    // Convert data array to JSON for easier handling in JavaScript
-    $dataJson = json_encode($DQarray);
-    
-    if ($dataJson === false) {
-        echo "<b>Error encoding JSON:</b> " . json_last_error_msg(); // Display any JSON encoding errors
-        return; // Stop execution if JSON encoding fails
-    }
-    
-    echo "<script>console.log(" . json_encode($dataJson) . ");</script>"; // Log JSON output to console for debugging
-echo <<<HTML
-<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js" onerror="loadLocalGoogleCharts()"></script>
-
-<script type="text/javascript">
-    // Check if Google Charts library loaded successfully
-    window.addEventListener("load", function() {
-        if (typeof google === "undefined" || typeof google.charts === "undefined") {
-            loadLocalGoogleCharts();
-        }
-    });
-
-    // Function to load local version of Google Charts if CDN fails
-    function loadLocalGoogleCharts() {
-        console.warn("Google Charts CDN failed, loading local loader.js instead.");
-        var script = document.createElement("script");
-        script.src = "loader.js"; // Path to your local loader.js file
-        document.head.appendChild(script);
-    }
-</script>
-
-<script type="text/javascript">
-    google.charts.load('current', {packages: ['corechart']});
-
-    // Use the encoded JSON directly in JavaScript
-    const dataArray = JSON.parse('{$dataJson}'); // Directly parse the PHP JSON string
-
-    // draw pointing vs mjd
-    function drawMJDChart() {
-        var data = new google.visualization.DataTable();
-            data.addColumn('number', 'MJD');
-            data.addColumn('number', 'RA_offset (AST_R0)');
-            data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
-            data.addColumn('number', 'Dec_offset (AST_D0)');
-            data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
-            data.addColumn('number', '20 TP unit ~5.1"');
-            data.addColumn('number', '-20 TP unit ~5.1"');
-
-        const rows = dataArray.map(row => {
-            const [timestamp, ra_offset, dec_offset, mjd, filter, exp_time, comment, ra, dec, ra_offset_sig, dec_offset_sig, boresite_ang, position_ang, exp_name, alt, az, exp_id, cam_label] = row;
-
-            return [
-                parseFloat(mjd),               // MJD
-                parseFloat(ra_offset),         // RA_offset (AST_R0)
-                "expname: "+exp_name+"<br>exp_id: "+exp_id+"<br>timestamp: "+timestamp+"<br>RA: "+ra+"<br>DEC: "+dec+"<br>filter: "+filter+"<br>comment: "+comment+"<br>cam_label: "+cam_label,
-                parseFloat(dec_offset),        // Dec_offset (AST_D0)
-                "expname: "+exp_name+"<br>exp_id: "+exp_id+"<br>timestamp: "+timestamp+"<br>RA: "+ra+"<br>DEC: "+dec+"<br>filter: "+filter+"<br>comment: "+comment+"<br>cam_label: "+cam_label,
-                20,                            // Dummy value for 20 TP unit
-                -20                            // Dummy value for -20 TP unit
-            ];
-        });
-
-        data.addRows(rows);
-
-        // Extract the first MJD value from dataArray
-        //const firstMJD = dataArray.length > 0 ? parseFloat(dataArray[0][1]) : "N/A";
-        const firstMJD = dataArray.length > 0 ? Math.floor(parseFloat(dataArray[0][3])) : "N/A";
-        console.log("First MJD Value:", firstMJD);
-
-        const options = {
-            title: 'Pointing Offset (MJD: '+firstMJD+')',
-            titleTextStyle: {color: 'black', fontSize: 15},
-            width: '100%',
-            height: 480,
-            legend: { position: 'top', alignment: 'center' },
-            series: {
-                0: { color: '#0000ff', pointSize: 3, lineWidth: 0 }, // RA_offset series
-                1: { color: '#33a532', pointSize: 3, lineWidth: 0 }, // Dec_offset series
-                2: { color: 'red', lineWidth: 2, lineDashStyle: [8, 4], pointSize: 0 }, // Line at y = 20
-                3: { color: 'red', lineWidth: 2, lineDashStyle: [8, 4], pointSize: 0 }  // Line at y = -20
-            },
-            intervals: { color: 'red', lineWidth: 2, style: 'sticks' },
-            hAxis: {
-                title: 'MJD',
-                gridlines: {count: -1}
-            },
-            vAxis: {
-                title: 'Offset (TP units)',
-            },
-            tooltip: { isHtml: true }, // Render tooltips as HTML
-            chartArea: {left: '7%', top: 60, right: '4%', bottom: 50}, // Adjust left and right
-            fontSize: 15,
-        };
-
-        const chart = new google.visualization.ScatterChart(document.getElementById('dq_div_mjd'));
-        chart.draw(data, options);
-    }
-
-    // draw pointing scatter
-    function drawSIGChart() {
-        var data = new google.visualization.DataTable();
-            data.addColumn('number', 'MJD');
-            data.addColumn('number', 'RA_offset_scatter (AST_RS)');
-            data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
-            data.addColumn('number', 'Dec_offset_scatter (AST_DS)');
-            data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
-
-        const rows = dataArray.map(row => {
-            const [timestamp, ra_offset, dec_offset, mjd, filter, exp_time, comment, ra, dec, ra_offset_sig, dec_offset_sig, boresite_ang, position_ang, exp_name, alt, az, exp_id, cam_label] = row;
-
-            return [
-                parseFloat(mjd),               // MJD
-                parseFloat(ra_offset_sig),     // RA_offset_scatter (AST_RS)
-                "expname: "+exp_name+"<br>exp_id: "+exp_id+"<br>timestamp: "+timestamp+"<br>RA: "+ra+"<br>DEC: "+dec+"<br>filter: "+filter+"<br>comment: "+comment+"<br>cam_label: "+cam_label,
-                parseFloat(dec_offset_sig),    // Dec_offset_scatter (AST_DS)
-                "expname: "+exp_name+"<br>exp_id: "+exp_id+"<br>timestamp: "+timestamp+"<br>RA: "+ra+"<br>DEC: "+dec+"<br>filter: "+filter+"<br>comment: "+comment+"<br>cam_label: "+cam_label,
-            ];
-        });
-
-        data.addRows(rows);
-
-        const options = {
-            title: 'Pointing Offset Scatter (MJD)',
-            titleTextStyle: {color: 'black', fontSize: 15},
-            width: '100%',
-            height: 480,
-            legend: { position: 'top', alignment: 'center' },
-            series: {
-                0: { color: '#0000ff', pointSize: 3, lineWidth: 0 }, // RA_offset series
-                1: { color: '#33a532', pointSize: 3, lineWidth: 0 }, // Dec_offset series
-                2: { color: 'red', lineWidth: 2, lineDashStyle: [8, 4], pointSize: 0 }, // Line at y = 20
-                3: { color: 'red', lineWidth: 2, lineDashStyle: [8, 4], pointSize: 0 }  // Line at y = -20
-            },
-            intervals: { color: 'red', lineWidth: 2, style: 'sticks' },
-            hAxis: {
-                title: 'MJD',
-                gridlines: {count: -1}
-            },
-            vAxis: {
-                title: 'Offset Scatter (TP units)',
-            },
-            tooltip: { isHtml: true }, // Render tooltips as HTML
-            chartArea: {left: '7%', top: 60, right: '4%', bottom: 50}, // Adjust left and right
-            fontSize: 15,
-        };
-
-        const chart = new google.visualization.ScatterChart(document.getElementById('dq_div_sig'));
-        chart.draw(data, options);
-    }
-
-
-    // position angle
-    function drawPOSChart() {
-        var data = new google.visualization.DataTable();
-            data.addColumn('number', 'MJD');
-            data.addColumn('number', 'RA_offset (AST_R0)');
-            data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
-            data.addColumn('number', 'Dec_offset (AST_D0)');
-            data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
-
-        const rows = dataArray.map(row => {
-            const [timestamp, ra_offset, dec_offset, mjd, filter, exp_time, comment, ra, dec, ra_offset_sig, dec_offset_sig, boresite_ang, position_ang, exp_name, alt, az, exp_id, cam_label] = row;
-
-            return [
-                parseFloat(position_ang),      // Position Angle
-                parseFloat(ra_offset),         // RA_offset (AST_R0)
-                "expname: "+exp_name+"<br>exp_id: "+exp_id+"<br>timestamp: "+timestamp+"<br>RA: "+ra+"<br>DEC: "+dec+"<br>filter: "+filter+"<br>comment: "+comment+"<br>cam_label: "+cam_label,
-                parseFloat(dec_offset),        // Dec_offset (AST_D0)
-                "expname: "+exp_name+"<br>exp_id: "+exp_id+"<br>timestamp: "+timestamp+"<br>RA: "+ra+"<br>DEC: "+dec+"<br>filter: "+filter+"<br>comment: "+comment+"<br>cam_label: "+cam_label,
-            ];
-        });
-
-        data.addRows(rows);
-
-        const options = {
-            title: 'Pointing Offset (Position Angle)',
-            titleTextStyle: {color: 'black', fontSize: 15},
-            width: '100%',
-            height: 480,
-            legend: { position: 'top', alignment: 'center' },
-            // pointSize: 5, // Point size for scatter plot
-            // lineWidth: 2,
-            series: {
-                0: { color: '#0000ff', pointSize: 3, lineWidth: 0 }, // RA_offset series
-                1: { color: '#33a532', pointSize: 3, lineWidth: 0 }, // Dec_offset series
-            },
-            intervals: { color: 'red', lineWidth: 2, style: 'sticks' },
-            hAxis: {
-                title: 'Position Angle',
-                gridlines: {count: -1}
-            },
-            vAxis: {
-                title: 'Offset (TP units)',
-            },
-            tooltip: { isHtml: true }, // Render tooltips as HTML
-            chartArea: {left: '7%', top: 60, right: '4%', bottom: 50}, // Adjust left and right
-            fontSize: 15,
-        };
-
-        const chart = new google.visualization.ScatterChart(document.getElementById('dq_div_pos'));
-        chart.draw(data, options);
-    }
-
-    function drawALTChart() {
-        var data = new google.visualization.DataTable();
-            data.addColumn('number', 'Altitute');
-            data.addColumn('number', 'RA_offset (AST_R0)');
-            data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
-            data.addColumn('number', 'Dec_offset (AST_D0)');
-            data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
-
-        const rows = dataArray.map(row => {
-            const [timestamp, ra_offset, dec_offset, mjd, filter, exp_time, comment, ra, dec, ra_offset_sig, dec_offset_sig, boresite_ang, position_ang, exp_name, alt, az, exp_id, cam_label] = row;
-
-            return [
-                parseFloat(alt),      // Position Angle
-                parseFloat(ra_offset),         // RA_offset (AST_R0)
-                "expname: "+exp_name+"<br>exp_id: "+exp_id+"<br>timestamp: "+timestamp+"<br>RA: "+ra+"<br>DEC: "+dec+"<br>filter: "+filter+"<br>comment: "+comment+"<br>cam_label: "+cam_label,
-                parseFloat(dec_offset),        // Dec_offset (AST_D0)
-                "expname: "+exp_name+"<br>exp_id: "+exp_id+"<br>timestamp: "+timestamp+"<br>RA: "+ra+"<br>DEC: "+dec+"<br>filter: "+filter+"<br>comment: "+comment+"<br>cam_label: "+cam_label,
-            ];
-        });
-
-        data.addRows(rows);
-
-        const options = {
-            title: 'Pointing Offset (Altitude)',
-            titleTextStyle: {color: 'black', fontSize: 15},
-            width: '100%',
-            height: 480,
-            legend: { position: 'top', alignment: 'center' },
-            series: {
-                0: { color: '#0000ff', pointSize: 3, lineWidth: 0 }, // RA_offset series
-                1: { color: '#33a532', pointSize: 3, lineWidth: 0 }, // Dec_offset series
-            },
-            intervals: { color: 'red', lineWidth: 2, style: 'sticks' },
-            hAxis: {
-                title: 'Altitude',
-                gridlines: {count: -1}
-            },
-            vAxis: {
-                title: 'Offset (TP units)',
-            },
-            tooltip: { isHtml: true }, // Render tooltips as HTML
-            //chartArea: {left: 80, top: 50, right: 20, bottom: 50},
-            chartArea: {left: '7%', top: 60, right: '4%', bottom: 50}, // Adjust left and right
-            fontSize: 15,
-        };
-
-        const chart = new google.visualization.ScatterChart(document.getElementById('dq_div_alt'));
-        chart.draw(data, options);
-    }
-
-   function drawAZChart() {
-        var data = new google.visualization.DataTable();
-            data.addColumn('number', 'Azumith');
-            data.addColumn('number', 'RA_offset (AST_R0)');
-            data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
-            data.addColumn('number', 'Dec_offset (AST_D0)');
-            data.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html': true}});
-
-        const rows = dataArray.map(row => {
-            const [timestamp, ra_offset, dec_offset, mjd, filter, exp_time, comment, ra, dec, ra_offset_sig, dec_offset_sig, boresite_ang, position_ang, exp_name, alt, az, exp_id, cam_label] = row;
-
-            return [
-                parseFloat(az),      // Position Angle
-                parseFloat(ra_offset),         // RA_offset (AST_R0)
-                "expname: "+exp_name+"<br>exp_id: "+exp_id+"<br>timestamp: "+timestamp+"<br>RA: "+ra+"<br>DEC: "+dec+"<br>filter: "+filter+"<br>comment: "+comment+"<br>cam_label: "+cam_label,
-                parseFloat(dec_offset),        // Dec_offset (AST_D0)
-                "expname: "+exp_name+"<br>exp_id: "+exp_id+"<br>timestamp: "+timestamp+"<br>RA: "+ra+"<br>DEC: "+dec+"<br>filter: "+filter+"<br>comment: "+comment+"<br>cam_label: "+cam_label,
-            ];
-        });
-
-        data.addRows(rows);
-
-        const options = {
-            title: 'Pointing Offset (Azumith)',
-            titleTextStyle: {color: 'black', fontSize: 15},
-            width: '100%',
-            height: 480,
-            legend: { position: 'top', alignment: 'center' },
-            series: {
-                0: { color: '#0000ff', pointSize: 3, lineWidth: 0 }, // RA_offset series
-                1: { color: '#33a532', pointSize: 3, lineWidth: 0 }, // Dec_offset series
-            },
-            intervals: { color: 'red', lineWidth: 2, style: 'sticks' },
-            hAxis: {
-                title: 'Azumith',
-                gridlines: {count: -1}
-            },
-            vAxis: {
-                title: 'Offset (TP units)',
-            },
-            tooltip: { isHtml: true }, // Render tooltips as HTML
-            //chartArea: {left: 80, top: 50, right: 20, bottom: 50},
-            chartArea: {left: '7%', top: 60, right: '4%', bottom: 50}, // Adjust left and right
-            fontSize: 15,
-        };
-
-        const chart = new google.visualization.ScatterChart(document.getElementById('dq_div_az'));
-        chart.draw(data, options);
-    }
-
-    google.charts.setOnLoadCallback(drawMJDChart);
-    google.charts.setOnLoadCallback(drawSIGChart);
-    google.charts.setOnLoadCallback(drawPOSChart);
-    google.charts.setOnLoadCallback(drawALTChart);
-    google.charts.setOnLoadCallback(drawAZChart);
-</script>
-
-<div class="chartWithOverlay" style="position: relative; width: 1240px; height:500px;">
-    <div id="dq_div_mjd" style="width:1240px;"></div>
-    <div class="overlay" style="position: absolute; width: 800px; bottom: 60px; left: 85px;"></div>
-</div>
-
-<div class="chartWithOverlay" style="position: relative; width: 1240px; height:500px;">
-    <div id="dq_div_sig" style="width:1240px;"></div>
-    <div class="overlay" style="position: absolute; width: 800px; bottom: 60px; left: 85px;"></div>
-</div>
-
-<div class="chartWithOverlay" style="position: relative; width: 1240px; height:500px;">
-    <div id="dq_div_pos" style="width:1240px;"></div>
-    <div class="overlay" style="position: absolute; width: 800px; bottom: 60px; left: 85px;"></div>
-</div>
-
-<div class="chartWithOverlay" style="position: relative; width: 1240px; height:500px;">
-    <div id="dq_div_alt" style="width:1240px;"></div>
-    <div class="overlay" style="position: absolute; width: 800px; bottom: 60px; left: 85px;"></div>
-</div>
-
-<div class="chartWithOverlay" style="position: relative; width: 1240px; height:500px;">
-    <div id="dq_div_az" style="width:1240px;"></div>
-    <div class="overlay" style="position: absolute; width: 800px; bottom: 60px; left: 85px;"></div>
-</div>
-HTML;
-
-// End timer
-$total_time = round(microtime(true) - $start, 3);
-echo "<center>Loading plot in $total_time seconds<br></center>";
-
-}
 
 ?>
