413 lines
14 KiB
HTML
413 lines
14 KiB
HTML
{% extends "base.html" %}
|
|
{% load heasarc_templates %}
|
|
{% load simbadescape %}
|
|
{% block header %}
|
|
<a class="btn btn-success" role="button" href="{% url 'art-xc survey index' %}">ART-XC Survey</a>
|
|
<a class="btn btn-success" role="button" href="{% url 'srg data dumps' %}">Daily data dumps</a>
|
|
<a class="btn btn-success" role="button" href="{% url 'show sky map form' %}">Show SkyMap</a>
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
{% if cat %}
|
|
<h3>Origin: <a href="{{ src.dump.get_absolute_url }}">{{ src.dump }}</a>, Data Dump SkyMap: <a href="/srgcat/{{ src.dump.pk }}/{{ cat.pk }}/skymap">{{ cat }}</a>, Total SkyMap: <a href="{{ cat.get_absolute_url }}">{{ cat }}</a></h3>
|
|
|
|
{% if srcs %}
|
|
|
|
<!--table class="table"-->
|
|
<table id="dtsrgcat" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th class="th-sm">NRTA Name</th>
|
|
<th class="th-sm">N/Match</th>
|
|
<th class="th-sm">RA</th>
|
|
<th class="th-sm">Dec</th>
|
|
<th class="th-sm">Healpix</th>
|
|
<th class="th-sm">S/N</th>
|
|
<th class="th-sm">Rate</th>
|
|
<th class="th-sm">Flux</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for src in srcs %}
|
|
<tr>
|
|
<td>
|
|
<a href="{{ src.get_absolute_url }}"><b>{{ src.name }}</b></a>
|
|
</td>
|
|
<td>{{ src.heasarc.all.count }}</b></td>
|
|
<td>{{ src.ra|floatformat:3 }}</td>
|
|
<td>{{ src.dec|floatformat:2 }}</td>
|
|
<td>{{ src.healpix }}</td>
|
|
<td>{{ src.sign|floatformat:2 }}</td>
|
|
<td>{{ src.rate|floatformat:4 }}</td>
|
|
<td>{{ src.flux }} </td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th>NRTA Name</th>
|
|
<th>N/Match</th>
|
|
<th>RA</th>
|
|
<th>Dec</th>
|
|
<th>Healpix</th>
|
|
<th>S/N</th>
|
|
<th>Rate</th>
|
|
<th>Flux</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% if src %}
|
|
<h4><span class="glyphicon glyphicon-arrow-right"></span> <a href="{{ src.get_absolute_url }}"><b>{{ src }} ({{ src.heasarc.all.count }} matches)</b></a> {{ src.ra|floatformat:4 }}<sup>RA</sup> {{ src.dec|floatformat:4 }}<sup>Dec</sup> <a data-toggle="tooltip" data-placement="top" title="Lookup target position in survey" href="{% url 'target survey GET' %}?ra={{ src.ra|safe }}&dec={{ src.dec|safe }}"><span class="glyphicon glyphicon-flag"></span></a></h4>
|
|
|
|
|
|
<!--p>
|
|
<h2><a href="{% url 'artsurvey index' %}">ArtSurvey</a></h2>
|
|
{% if src.artsurvey_source %}
|
|
<strong>ArtSurveySource</strong> <a href="{{ src.artsurvey_source.get_absolute_url }}">SOURCE: {{ src.artsurvey_source.cname }} {{ src.artsurvey_source.name }}</a>
|
|
{% else %}
|
|
<a href="{{ src.get_new_artsurvey_url }}">Create new <strong>ArtSurveySource</strong></a>
|
|
{% endif %}
|
|
</p-->
|
|
|
|
|
|
{% if simbad %}
|
|
<h4>Simbad</h4>
|
|
<table id="dtsimbad" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th class="th-sm">major-id</th>
|
|
<th class="th-sm">Type</th>
|
|
<th class="th-sm">RA</th>
|
|
<th class="th-sm">Dec</th>
|
|
<th class="th-sm">Error (arcsec)</th>
|
|
<th class="th-sm">Offset (arcsec)</th>
|
|
<th class="th-sm">Z</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for simsrc in simbad %}
|
|
<tr>
|
|
<td><a href="http://simbad.u-strasbg.fr/simbad/sim-id?Ident={{ simsrc.main_id|simbad_escape }}&NbIdent=1&Radius=2&Radius.unit=arcmin&submit=submit+id">{{ simsrc.main_id }}</a></td>
|
|
<td>{{ simsrc.obj_class }}</td>
|
|
<td>{{ simsrc.ra|floatformat:-5}} </td>
|
|
<td>{{ simsrc.dec|floatformat:-5}} </td>
|
|
<td>{% if simsrc.is_error_radius_real %}{{ simsrc.error_radius|floatformat:-3 }}{% endif %}</td>
|
|
<td>{{ simsrc.separation|floatformat:3 }}</td>
|
|
<td>{% if simsrc.is_redshift_real %}{{ simsrc.z|stringformat:".3e" }}{% endif %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
</foot>
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% if heasarcs %}
|
|
<h4>XMMSSC (3XMM DR8 Version) CSC (Chandra Source Catalog, v2.0) RASS2RXS</h4>
|
|
<table id="dtheasarc" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th class="th-sm">Table</th>
|
|
<th class="th-sm">Name</th>
|
|
<th class="th-sm">RA</th>
|
|
<th class="th-sm">Dec</th>
|
|
<th class="th-sm">Lon</th>
|
|
<th class="th-sm">Lat</th>
|
|
<!--th class="th-sm">Healpix</th-->
|
|
<th class="th-sm">Error (arcsec)</th>
|
|
<th class="th-sm">Offset (arcsec)</th>
|
|
<th class="th-sm">Notes</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for src in heasarcs %}
|
|
{% if src.description != 'HeasarcXrayMaster' and src.description != 'HeasarcCHANMASTER' %}
|
|
<tr>
|
|
<td>{{ src.description|remove_heasarc }}</td>
|
|
<td>
|
|
<a href="{{ src.get_absolute_url }}">{{ src.name }}</a>
|
|
</td>
|
|
<td>{{ src.ra|floatformat:5 }}</td>
|
|
<td>{{ src.dec|floatformat:5 }}</td>
|
|
<td>{{ src.lii|floatformat:3 }}</td>
|
|
<td>{{ src.bii|floatformat:3 }}</td>
|
|
<!--td>{{ src.healpix }}</td-->
|
|
<td>{% if src.error_radius > 0 %}{{ src.error_radius|floatformat:2 }}{% endif %}</td>
|
|
<td>{{ src.separation|floatformat:3 }}</td>
|
|
<td>
|
|
{% if src.description == 'HeasarcCSC' %}
|
|
{% if src.extent_flag == 'T' %}extended{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<!--tr>
|
|
<th>Table</th>
|
|
<th>Name</th>
|
|
<th>RA</th>
|
|
<th>Dec</th>
|
|
<th>Lon</th>
|
|
<th>Lat</th>
|
|
<th>Error (arcsec)</th>
|
|
<th>Offset (arcsec)</th>
|
|
</tr-->
|
|
</foot>
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% if heasarcs %}
|
|
<h4>HEASARC X-ray Master</h4>
|
|
<table id="dtheasarcxraymaster" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th class="th-sm">Mission</th>
|
|
<th class="th-sm">Name</th>
|
|
<th class="th-sm">Offset (arcsec)</th>
|
|
<th class="th-sm">Type</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for src in heasarcs %}
|
|
{% if src.description == 'HeasarcXrayMaster' %}
|
|
<tr>
|
|
<td>{{ src.observatory }} ({{ src.database_table }})</td>
|
|
<td>
|
|
<a href="{{ src.get_absolute_url }}">{{ src.name }}</a>
|
|
</td>
|
|
<td>{{ src.separation|floatformat:3 }}</td>
|
|
<td>
|
|
{% if src.class_id != 9999 %}
|
|
{{ src.object_class.class_name }}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<!--tr>
|
|
<th>Mission</th>
|
|
<th>Name</th>
|
|
<th>Offset (arcsec)</th>
|
|
<th>Type</th>
|
|
</tr-->
|
|
</foot>
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% if gaia %}
|
|
<h4>Gaia</h4>
|
|
<table id="dtgaia" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th class="th-sm">Name</th>
|
|
<th class="th-sm">RA</th>
|
|
<th class="th-sm">Dec</th>
|
|
<th class="th-sm">Offset (arcsec)</th>
|
|
<th class="th-sm">Parallax</th>
|
|
<th class="th-sm">Parallax error</th>
|
|
<th class="th-sm">pmra</th>
|
|
<th class="th-sm">pmra_error</th>
|
|
<th class="th-sm">pmdec</th>
|
|
<th class="th-sm">pmdec_error</th>
|
|
<th class="th-sm">Magnitude</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for gaiasrc in gaia %}
|
|
<tr>
|
|
<td>{{ gaiasrc.name }} | <a href="{{ gaiasrc.get_absolute_url_vizier }}"><b>Vizier</b></a></td>
|
|
<td>{{ gaiasrc.ra|stringformat:".3e"}} </td>
|
|
<td>{{ gaiasrc.dec|stringformat:".3e"}} </td>
|
|
<td>{{ gaiasrc.separation|floatformat:3 }}</td>
|
|
<td>{{ gaiasrc.parallax|stringformat:".3e" }}</td>
|
|
<td>{{ gaiasrc.parallax_error|stringformat:".3e" }}</td>
|
|
<td>{{ gaiasrc.pmra|stringformat:".3e" }}</td>
|
|
<td>{{ gaiasrc.pmra_error|stringformat:".3e" }}</td>
|
|
<td>{{ gaiasrc.pmdec|stringformat:".3e" }}</td>
|
|
<td>{{ gaiasrc.pmdec_error|stringformat:".3e" }}</td>
|
|
<td>{{ gaiasrc.phot_g_mean_mag|stringformat:".1f" }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</tbody>
|
|
<tfoot>
|
|
</foot>
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% if heasarcs %}
|
|
<h4>HEASARC Chandra Master</h4>
|
|
<table id="dtheasarcchandramaster" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th class="th-sm">ObsID</th>
|
|
<th class="th-sm">Name</th>
|
|
<th class="th-sm">Offset (arcsec)</th>
|
|
<th class="th-sm">Exposure (sec)</th>
|
|
<th class="th-sm">Notes</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for src in heasarcs %}
|
|
{% if src.description == 'HeasarcCHANMASTER' %}
|
|
<tr>
|
|
<td>{{ src.obsid }}</td>
|
|
<td>
|
|
<a href="{{ src.get_absolute_url }}">{{ src.name }}</a>
|
|
</td>
|
|
<td>{{ src.separation|floatformat:3 }}</td>
|
|
<td>{{ src.exposure }}</td>
|
|
<td>PI: {{ src.pi }}, {{ src.category }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<!--tr>
|
|
<th>Mission</th>
|
|
<th>Name</th>
|
|
<th>Offset (arcsec)</th>
|
|
<th>Exposure (sec)</th>
|
|
<th>Notes</th>
|
|
</tr-->
|
|
</foot>
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% if srcs %}
|
|
|
|
<!-- insert this snippet where you want Aladin Lite viewer to appear and after the loading of jQuery -->
|
|
<div id="aladin-lite-div" style="width:800px;height:800px;align=center"></div>
|
|
<!--input id="allwise" type="radio" name="survey" value="P/allWISE/color"><label for="allwise">AllWISE<label-->
|
|
<script type="text/javascript" src="//aladin.u-strasbg.fr/AladinLite/api/v2/latest/aladin.min.js" charset="utf-8"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
|
|
/* survey: "P/DSS2/color", */
|
|
var aladin = A.aladin('#aladin-lite-div', {
|
|
cooFrame: "GAL",
|
|
survey: "P/DSS2/color",
|
|
fov: 197, target: "0. 0.",
|
|
showShareControl: true,
|
|
showCooGrid: false});
|
|
|
|
// define custom draw function
|
|
var drawFunction = function(source, canvasCtx, viewParams) {
|
|
//size=source.data['size'];
|
|
size=3.0
|
|
canvasCtx.beginPath();
|
|
canvasCtx.arc(source.x, source.y, size * 2, 0, 2 * Math.PI, false);
|
|
canvasCtx.closePath();
|
|
canvasCtx.strokeStyle = '#c38';
|
|
canvasCtx.lineWidth = 3;
|
|
canvasCtx.globalAlpha = 0.7,
|
|
canvasCtx.stroke();
|
|
var fov = Math.max(viewParams['fov'][0], viewParams['fov'][1]);
|
|
|
|
// object name is displayed only if fov<10°
|
|
if (fov>10) {
|
|
return;
|
|
}
|
|
|
|
canvasCtx.globalAlpha = 0.9;
|
|
canvasCtx.globalAlpha = 1;
|
|
|
|
var xShift = 20;
|
|
|
|
canvasCtx.font = '15px Arial'
|
|
canvasCtx.fillStyle = '#eee';
|
|
canvasCtx.fillText(source.data['name'], source.x + xShift, source.y -4);
|
|
return
|
|
// object type is displayed only if fov<2°
|
|
if (fov>2) {
|
|
return;
|
|
}
|
|
canvasCtx.font = '12px Arial'
|
|
canvasCtx.fillStyle = '#abc';
|
|
canvasCtx.fillText(source.data['otype'], source.x + 2 + xShift, source.y + 10);
|
|
};
|
|
|
|
|
|
aladin.setOverlayImageLayer("");
|
|
|
|
aladin.addCatalog(A.catalogFromURL('http://193.232.10.38/static/aladin/pvlabs.vot',
|
|
{name: 'Labels', sourceSize:5, color: 'red', shape: 'circle',
|
|
raField: "col3", decField: "col4",
|
|
displayLabel: true,labelColumn: "col8", labelColor: "red", labelFont: "12px sans-serif",
|
|
onClick: 'showPopup'}));
|
|
|
|
var cat0 = A.catalog({ name: 'ART-XC Sources', color: 'green', sourceSize: 10, displayLabel: false, onClick: 'showTable', shape: drawFunction,});
|
|
{% for src in srcs %} cat0.addSources(A.source({{ src.ra|safe }}, {{ src.dec|safe }}, {name: '{{ src.name }}', RA: '{{ src.ra|floatformat:4 }}', Dec: '{{ src.dec|floatformat:4 }}', source: '<a href="{{ src.get_absolute_url }}">link</a>', plate: '<a href="{{ src.skymap.get_absolute_url }}">{{ src.skymap }}',}));
|
|
{% endfor %}
|
|
|
|
aladin.addCatalog(cat0);
|
|
|
|
var skymap = A.catalog({shape: 'square', name: 'SkyMaps plates', color: 'green', sourceSize: 10, displayLabel: false,onClick: 'showPopup'});
|
|
{% for skymap in dump.skymap.all %}
|
|
skymap.addSources(A.source({{ skymap.RA_CEN|safe }}, {{ skymap.DE_CEN|safe }}, {Plate: '<a href="/srgcat/{{ dump.pk }}/{{ skymap.pk }}/skymap">{{ skymap }}', RA: '{{ skymap.RA_CEN|floatformat:4 }}', Dec: '{{ skymap.DE_CEN|floatformat:4 }}', Dump: '<a href="{{ dump.get_absolute_url }}">{{ dump }}</a>',}));
|
|
{% endfor %}
|
|
aladin.addCatalog(skymap);
|
|
|
|
{% if surveypaths %}
|
|
var overlay = A.graphicOverlay({name: 'Survey path', color: '#ee2345', lineWidth: 1});
|
|
aladin.addOverlay(overlay);
|
|
var poly_ra = [];
|
|
var poly_dec = [];
|
|
|
|
{% for path in surveypaths %}poly_ra.push({{ path.ra|safe }}); poly_dec.push({{ path.dec|safe }});
|
|
{% endfor %}
|
|
|
|
for (var i = 0; i < poly_ra.length-1; i++) { overlay.add(A.polyline([ [poly_ra[i], poly_dec[i]], [poly_ra[i+1], poly_dec[i+1]], ])); }
|
|
|
|
var cat1 = A.catalog({shape: 'circle', name: 'Survey path knots', color: 'white', sourceSize: 10, displayLabel: false,onClick: 'showTable'});
|
|
{% for path in surveypaths %} cat1.addSources(A.source({{ path.ra|safe }}, {{ path.dec|safe }}, {obsid: '{{ path.survey.experiment }}', eroday_start:'{{ survey.eroday_start|floatformat:3 }}', eroday_stop:'{{ survey.eroday_stop|floatformat:3 }}', 'Date/Time (MSK)':'{{ path.dtime|date:"d.m.y H:i:s" }}', eroday: '{{ path.eroday|floatformat:3 }}', eroday_shift:'{{ path.get_eroday_shift|floatformat:3 }}',day_shift:'{{ path.get_day_shift|floatformat:2 }}', RA: '{{ path.ra|floatformat:3 }}',Dec: '{{ path.dec|floatformat:3 }}',}));
|
|
{% endfor %}
|
|
aladin.addCatalog(cat1);
|
|
cat1.hide();
|
|
{% endif %}
|
|
|
|
|
|
{% if survey %}
|
|
|
|
var op = A.graphicOverlay({name: 'Healpix mean size', color:'green', lineWidth: 1});
|
|
aladin.addOverlay(op);
|
|
{% for plate in survey.surveyhealpixplate_set.all %} op.add(A.circle({{ plate.ra|floatformat:4 }}, {{ plate.dec|floatformat:4 }}, 1.8323));
|
|
{% endfor %}
|
|
op.hide();
|
|
|
|
var cat2 = A.catalog({shape: 'square', name: 'Healpix knots', color: 'green', sourceSize: 10, displayLabel: false, onClick: 'showTable'});
|
|
{% for plate in survey.surveyhealpixplate_set.all %} cat2.addSources(A.source({{ plate.ra|safe }}, {{ plate.dec|safe }}, {Healpix: '{{ plate.healpix }}', RA: '{{ plate.ra|floatformat:3 }}',Dec: '{{ plate.dec|floatformat:3 }}',}));
|
|
{% endfor %}
|
|
|
|
aladin.addCatalog(cat2);
|
|
cat2.hide();
|
|
|
|
{% endif %}
|
|
|
|
|
|
aladin.addCatalog(A.catalogFromURL('http://193.232.10.38/static/aladin/bound_radec.csv.xml', {name: 'boundary', sourceSize:10, color: 'red', shape: 'cross' }));
|
|
</script>
|
|
|
|
{% endif %}
|
|
|
|
|
|
{% endblock %}
|