Changeset 19778 for trunk


Ignore:
Timestamp:
10/24/19 12:32:15 (5 years ago)
Author:
Daniela Dorner
Message:
added links to visbility and GBM alerts
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/flare_alerts/index.php

    r19634 r19778  
    116116
    117117    $query="SELECT CONCAT(fTriggerKey, '[', fTriggerType, ']') AS 'Trigger[Type]', if (isnull(fName), fSourceName, fName) AS 'Source', ";
    118     $query.="fPacketTypeKey AS 'Packet', CONCAT(Round(fRa,1), '/', Round(fDec,1), '/', Round(fErr,1)) AS 'Ra/Dec/Err', ";
     118    $query.="fPacketTypeKey AS 'Packet', CONCAT(Round(fRa,2), '/', Round(fDec,2), '/', Round(fErr,2)) AS 'Ra/Dec/Err', ";
    119119    $query.="CONCAT(fNight, '_', fRunID) AS 'Run', ";
    120120    $query.="if (fBinning=-1, 'nightly', CONCAT(fBinning, ' min')) AS 'Binning', ";
     
    154154        }
    155155        echo "<tr>\n";
    156         foreach ($colnames as $key) {
    157            
    158             echo "<td>".$row[$key]."</td>\n";
     156        foreach ($colnames as $key)
     157        {
     158            echo "<td>".$row[$key];
     159            if ($key=="Ra/Dec/Err")
     160            {
     161                $coordinates=explode("/", $row[$key], 3);
     162                $rahh=floor($coordinates[0]);
     163                $ramm=floor(($coordinates[0]-$rahh)*60);
     164                $rass=round((($coordinates[0]-$rahh)*60-$ramm)*60, 2);
     165                //echo "RA: ".$rahh.":".$ramm.":".$rass;
     166                $decdd=floor($coordinates[1]);
     167                $decmm=floor(($coordinates[1]-$decdd)*60);
     168                $decss=floor((($coordinates[1]-$decdd)*60-$decmm)*60);
     169                $decss=round((($coordinates[1]-$decdd)*60-$decmm)*60, 2);
     170                //echo "Dec: ".$decdd.":".$decmm.":".$decss;
     171
     172                //echo "<iframe width='100%' height='315' src='http://tevcat.uchicago.edu/visplot.cgi?tname=Sample-Crab&ra=19 24 00&dec=15 54 00&lat=28.76&date=24-10-2019&lon=-17.88&mode=1' frameborder='0' allowfullscreen></iframe>\n";
     173                echo " <a target='_blank' rel='noopener' href='http://tevcat.uchicago.edu/visplot.cgi?tname=".str_replace("#", "", $row["Source"])."&ra=".$rahh." ".$ramm." ".$rass."&dec=".$decdd." ".$decmm." ".$decss."&lat=28.76&date=24-10-2019&lon=-17.88&mode=1'>vis</a>\n";
     174            }
     175            if ($key=="Source")
     176            {
     177                if (strpos($row[$key], "GBM")!==false)
     178                    echo " <a target='_blank' rel='noopener' href='https://gcn.gsfc.nasa.gov/other/".str_replace("GBM#", "", $row[$key]).".fermi'>gcn</a>\n";
     179            }
     180            echo "</td>\n";
    159181        }
    160182        echo "</tr>\n";
Note: See TracChangeset for help on using the changeset viewer.