Page tree
Skip to end of metadata
Go to start of metadata

GAVO Server:

The server runs GAVO DaCHS;

q.rd uses mixin #epntap2.rd available at ;

data for q.rd comes comes as a .csv format;

input table contains names, footprints and bounding box coordinates; output table conforms to epntap-v2 standards.

Bounding box coordinates can also be generated from footprints
(this is currently not implemented in this dataset, since footprints data in this dataset contains errors)
using the python expression, for instance

If you have a footprint, e.g.:

s_region='Polygon -103.649 -32.096 -103.739 -32.097 -103.824 -32.124 -103.909 -32.155 -103.995 -32.149 -103.996 -32.15 -103.998 -32.135 -104.004 -32.103 -104.009 -32.07 -103.917 -32.073 -103.83 -32.049 -103.746 -32.015 -103.66 -32.013 -103.653 -32.06 -103.648 -32.097 -103.649 -32.096'

[float(s_region.split(' ')[1:][i]) for i in range(0, len(s_region.split(' ')[1:]), 2)]

would give you an array of longitudes, and similarly

[float(s_region.split(' ')[2:][i]) for i in range(0, len(s_region.split(' ')[1:]), 2)]

will result in array of latitudes.
Consequently, to get, for instance, maximum latitude, call

max([float(s_region.split(' ')[2:][i]) for i in range(0, len(s_region.split(' ')[1:]), 2)])

For an example above this should return -32.013

footprints must follow this syntax: "Polygon Lon1 Lat1 Lon2 Lat2 Lon3 Lat3 Lon4 Lat4".

TOPCAT Previews:

In epn_vespa_crism.epn_core table, names of the coverages (obtained from using WCS GetCapabilities)
are used to generate URL's for WCPS requests to planetserver rasdaman to generate previews which can be viewed with TOPCAT internal viewer.

Subgranule Previews:

In the field subgranule_url Python expression within q.rd is used to generated URL pointing to
and containing a list of parameters which are used by JavaScript on the page, e.g.:

This page depends on jquery-1.12.3.min.js and samp.js, available here:

Sending to HUB via SAMP:

The button "Broadcast via SAMP" becomes visible if VO HUB is running, it was adapted from example of SAMPJS.
The button forwards a link to a PHP page using POST to XML-RPC in accordance with SAMP via webHUB.
PHP page generates a ascii file with .fus extensions and tells the browser to download it:

$SPEEDOFLIGHT = 299792458; $mySensorId = substr($_GET['cov'],-6,-5);
header('Content-Disposition: attachment; filename=' . $_GET['cov'] . '.fus');
if ($mySensorId=="s"){$specEnd_nm=1053; $specStep_nm=6.458; $numBands=107;}else{$specEnd_nm=3920; $specStep_nm=6.66; $numBands=438;}
$specStart_nm = $specEnd_nm - ($specStep_nm * $numBands);
$url='' . $_GET['cov']
    . '%29%20return%20encode%28c[E%28' . $_GET['e'] . '%29,N%28' . $_GET['n'] . '%29]%2C%20%22csv%22%29';
$spectra = explode(' ',substr(file_get_contents($url),2,-2));
$lineID=0; $mynumlines = 0;
foreach ($spectra as $value) {if ($value!=65535){$mynumlines++;}}
echo '// number of line : ' .  $mynumlines . PHP_EOL . '// vlsr : 0.0' . PHP_EOL;
echo "FreqLsb VeloLsb FreqUsb VeloUsb Intensity DeltaF DeltaV" . PHP_EOL;
foreach ($spectra as $value) {
    $freq = $specStart_nm + ($specStep_nm * $lineID);
    $lam = $SPEEDOFLIGHT / ( $freq * pow(10,-9) );
    $lam = $lam / 1000000;
    if ($value!=65535){echo $lam . "\t0\t0.000\t0.000\t" . $value . "\t0\t0" . PHP_EOL;}
    $lineID ++;}


  • No labels
Write a comment…