Templates added
This commit is contained in:
178
Templates/srgcat/ddumps.html
Normal file
178
Templates/srgcat/ddumps.html
Normal file
@@ -0,0 +1,178 @@
|
||||
{% extends "base.html" %}
|
||||
{% load heasarc_templates %}
|
||||
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<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>
|
||||
|
||||
{% if ddumps %}
|
||||
|
||||
|
||||
<table class="table">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">Name</th>
|
||||
<th class="th-sm">Date</th>
|
||||
<th class="th-sm">Sources</th>
|
||||
<th class="th-sm">Plates</th>
|
||||
<th class="th-sm"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for dump in ddumps %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ dump.get_absolute_url }}"><b>{{ dump.name }}</b></a>
|
||||
</td>
|
||||
<td>{{ dump.date|date:"d M Y H:i:s" }}</b></td>
|
||||
<td>{{ dump.skymapsource_set.count }}</td>
|
||||
<td>{{ dump.skymap.count }}</td>
|
||||
<td>
|
||||
{% if user.is_authenticated and user|has_group:"srg-iki-admin" %}
|
||||
{% if dump.catalog_loaded %}<a class="btn btn-danger btn-size-xs" role="button" href="{{ dump.get_update_catalog_url }}">Reload catalog</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not dump.catalog_loaded %}<b>In progress</b>{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if dump %}
|
||||
|
||||
<table class="table">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">Name</th>
|
||||
<th class="th-sm">Date</th>
|
||||
<th class="th-sm">Survey</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ dump.get_absolute_url }}"><b>{{ dump.name }}</b></a>
|
||||
</td>
|
||||
<td>{{ dump.date|date:"d M Y H:i:s" }}</b></td>
|
||||
<td><a href="{{ survey.get_absolute_url }}">{{ survey }}</a></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- 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});
|
||||
/*
|
||||
see http://aladin.u-strasbg.fr/hips/list for more
|
||||
*/
|
||||
aladin.createImageSurvey("DIRBE_4","DIRBE_4", "http://cade.irap.omp.eu/documents/Ancillary/4Aladin/DIRBE_4",'galactic',8, {imgFormat: 'jpg'});
|
||||
/* aladin.createImageSurvey("XMMrgb","XMMrgb", "http://skies.esac.esa.int/XMM-Newton/EPIC-RGB",'equatorial',8, {imgFormat: 'jpg'}) */
|
||||
aladin.getBaseImageLayer().getColorMap().update('rainbow');
|
||||
|
||||
aladin.createImageSurvey("INTEGRAL_14y_17_60", "INTEGRAL_14y_17_60", "http://cade.irap.omp.eu/documents/Ancillary/4Aladin/INTEGRAL_14y_17_60/", 'galactic', 3)
|
||||
aladin.createImageSurvey("RASS-soft", "RASS-soft", "http://cade.irap.omp.eu/documents/Ancillary/4Aladin/RASS_IM3", 'galactic', 12, {imgFormat: 'jpg'})
|
||||
aladin.setImageSurvey(aladin.createImageSurvey("RASS", "RASS", "http://alasky.u-strasbg.fr/RASS", 'equatorial', 12, {imgFormat: 'jpg'}));
|
||||
aladin.getBaseImageLayer().getColorMap().update('cubehelix');
|
||||
aladin.getBaseImageLayer().getColorMap().reverse('true');
|
||||
aladin.setImageSurvey(aladin.createImageSurvey("LAB-NH", "LAB-NH", "http://cade.irap.omp.eu/documents/Ancillary/4Aladin/LAB_NH", 'galactic', 12, {imgFormat: 'jpg'}));
|
||||
aladin.setOverlayImageLayer(aladin.createImageSurvey("Planck-HFI", "Planck-HFI", "http://alasky.u-strasbg.fr/PLANCK/R2/HFI_Color_353_545_857", 'galactic', 12, {imgFormat: 'jpg'}));
|
||||
aladin.getOverlayImageLayer().setAlpha(0.35);
|
||||
aladin.getOverlayImageLayer().getColorMap().reverse('true');
|
||||
|
||||
aladin.setImageSurvey("DIRBE_4");
|
||||
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: 'showTable'}));
|
||||
|
||||
var cat0 = A.catalog({shape: 'square', name: 'SkyMaps plates', color: 'green', sourceSize: 10, displayLabel: false,onClick: 'showPopup'});
|
||||
|
||||
{% for skymap in dump.skymap.all %}
|
||||
cat0.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(cat0);
|
||||
|
||||
|
||||
|
||||
|
||||
var cat1 = A.catalog({shape: 'circle', name: 'Survey Path', color: 'white', sourceSize: 10, displayLabel: false,onClick: 'showTable'});
|
||||
{% if surveypaths %}
|
||||
|
||||
var overlay = A.graphicOverlay({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]], ]));
|
||||
}
|
||||
|
||||
{% for path in surveypaths %}
|
||||
{% with next_element=surveypaths|next:forloop.counter0 %}
|
||||
{% with previous_element=surveypaths|previous:forloop.counter0 %}
|
||||
|
||||
cat1.addSources(A.source({{ path.ra|safe }}, {{ path.dec|safe }},
|
||||
{obsid: '{{ path.survey.experiment }}',
|
||||
eroday: '{{ path.eroday|floatformat:4 }}',
|
||||
RA: '{{ path.ra|floatformat:4 }}',Dec: '{{ path.dec|floatformat:4 }}',}));
|
||||
|
||||
{% if next_element %}
|
||||
{% endif %}
|
||||
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
aladin.addCatalog(cat1);
|
||||
cat1.hide()
|
||||
|
||||
|
||||
|
||||
aladin.addCatalog(A.catalogFromURL('http://193.232.10.38/static/aladin/bound_radec.csv.xml',
|
||||
{name: 'boundary', sourceSize:10, color: 'red', shape: 'cross' }));
|
||||
|
||||
var simbadhips = A.catalogHiPS('http://axel.u-strasbg.fr/HiPSCatService/Simbad', {color: "#2F4F4F", onClick: 'showPopup', name: 'Simbad'}, null, true);
|
||||
aladin.addCatalog(simbadhips);
|
||||
simbadhips.hide();
|
||||
|
||||
</script>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
49
Templates/srgcat/edit_all_selections.html
Normal file
49
Templates/srgcat/edit_all_selections.html
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% 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>
|
||||
<hr>
|
||||
{% endblock %}
|
||||
{% block precontent %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h4>Selections <small>[<a href="{% url 'create new selection' %}"><span class="glyphicon glyphicon-plus"></span></a>]</small></h4>
|
||||
{% if selections %}
|
||||
<table class="table">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">Access</th>
|
||||
<th class="th-sm">Slug</th>
|
||||
<th class="th-sm">Name</th>
|
||||
<th class="th-sm">Sources</th>
|
||||
<th class="th-sm">Operations</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for selection in selections %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if selection.public %}
|
||||
<span class="glyphicon glyphicon-eye-open"></span>{% else %}<span class="glyphicon glyphicon-eye-close"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ selection.slug }}</strong>
|
||||
</td>
|
||||
<td><a href="{{ selection.get_absolute_url }}">{{ selection.name }}</a></td>
|
||||
<td>{{ selection.skymap_sources.count }}</td>
|
||||
<td>
|
||||
<small>[<a href="{{ selection.get_download_url }}">download</a>]</small>
|
||||
<small>[<a href="{{ selection.get_edit_url }}">edit</a>]</small>
|
||||
<small>[<a href="{{ selection.get_delete_url }}">delete</a>]</small>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
139
Templates/srgcat/erosita_matched_catalogs.html
Normal file
139
Templates/srgcat/erosita_matched_catalogs.html
Normal file
@@ -0,0 +1,139 @@
|
||||
{% extends "base.html" %}
|
||||
{% load heasarc_templates %}
|
||||
{% load srgcat_templates %}
|
||||
|
||||
{% block precontent %}
|
||||
|
||||
{% if catalog %}
|
||||
<a class="btn btn-success" role="button" href="{{ catalog.get_absolute_url }}">Initial</a>
|
||||
<a class="btn btn-success" role="button" href="{{ catalog.get_erosita_matched_url }}">eRosita matched</a>
|
||||
<a class="btn btn-success" role="button" href="{{ catalog.get_erosita_nomatch_url }}">eRosita not matched</a>
|
||||
{% endif %}
|
||||
|
||||
{% if skymap_sources %}
|
||||
<table id="dtskymapsources" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<!--th class="th-sm">#</th-->
|
||||
<th class="th-sm">Name</th>
|
||||
<th class="th-sm">Match</th>
|
||||
<th class="th-sm" width="20%" >Type? (abridged<5)</th>
|
||||
<th class="th-sm">RA</th>
|
||||
<th class="th-sm">Dec</th>
|
||||
<th class="th-sm">Rate</th>
|
||||
<th class="th-sm">Flux</th>
|
||||
<th class="th-sm">Sign</th>
|
||||
<th class="th-sm">log10(nFalse)</th>
|
||||
<th class="th-sm">SkyMap</th>
|
||||
<th class="th-sm">eRosita</th>
|
||||
<th class="th-sm">Ratio</th>
|
||||
<th class="th-sm">Selection</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for src in skymap_sources %}
|
||||
<tr>
|
||||
<!--td>{{forloop.counter}}</td-->
|
||||
<td><a href="{{ src.get_absolute_url }}">{{ src.name }}</a> | <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>
|
||||
{% if src.get_swiftbat_count > 0 %}
|
||||
| <b>Swift</b>
|
||||
{% endif %}
|
||||
{% if src.gaia.all.count %}
|
||||
| <b>Gaia</b>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<b>{{ src.heasarc.all.count }}</b>
|
||||
</td>
|
||||
<td><p>
|
||||
{% for simsrc in src.simbad.all|slice:":5" %}
|
||||
{% if simsrc.obj_class %}{{ simsrc.obj_class }} {% if simsrc.is_redshift_real %}<strong>z={{ simsrc.z }}</strong> {% endif %}|{% endif %}
|
||||
{% endfor %}
|
||||
</p></td>
|
||||
<td>{{ src.ra|floatformat:5 }}</td>
|
||||
<td>{{ src.dec|floatformat:5 }}</td>
|
||||
<td>{{ src.rate|floatformat:3 }}</td>
|
||||
<td>{{ src.flux|stringformat:"1.1e" }}</td>
|
||||
<td>{{ src.sig|floatformat:2 }}</td>
|
||||
<td>{{ src.get_log10_nfalse|floatformat:2 }}</td>
|
||||
<td><a href="{{ src.skymap.get_absolute_url }}">{{ src.skymap }}</a></td>
|
||||
<td>{{ src.erositamatch.flux|stringformat:"1.1e" }}</td>
|
||||
<td>
|
||||
{{ src.get_erosita_ratio|floatformat:2 }}
|
||||
</td>
|
||||
<td>
|
||||
|
||||
{% if selection %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{{ selection.get_absolute_url }}/{{ src.pk }}/delete">{{ selection.slug }} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
{% else %}
|
||||
{% for selection in selections %}
|
||||
{% is_skymapsource_in_selection selection src as selected %}
|
||||
{% if selected %}
|
||||
<a class="btn btn-danger btn-sm" role="button" href="{{ selection.get_absolute_url }}/{{ src.pk }}/delete">{{ selection.slug }} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
{% else %}
|
||||
<a class="btn btn-warning btn-sm" role="button" href="{{ selection.get_absolute_url }}/{{ src.pk }}/add">{{ selection.slug }} <span class="glyphicon glyphicon-plus"></span></a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfooter>
|
||||
<tr>
|
||||
<th class="th-sm"></th>
|
||||
<th class="th-sm">Heasarc</th>
|
||||
<th class="th-sm">Simbad</th>
|
||||
<th class="th-sm">J2000</th>
|
||||
<th class="th-sm">cts/s</th>
|
||||
<th class="th-sm">erg/s/cm2</th>
|
||||
<th class="th-sm"></th>
|
||||
<th class="th-sm"></th>
|
||||
<th class="th-sm"></th>
|
||||
<th class="th-sm"></th>
|
||||
<th class="th-sm">erg/s/cm2</th>
|
||||
<th class="th-sm">ART/eRo</th>
|
||||
<th class="th-sm"></th>
|
||||
</tr>
|
||||
|
||||
</tfooter>
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
{% if artcats %}
|
||||
|
||||
|
||||
<table class="table">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">Catalog</th>
|
||||
<th class="th-sm">Sources</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for cat in artcats %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ cat.get_absolute_url }}"><b>{{ cat.name }}</b></a>
|
||||
</td>
|
||||
<td>{{ cat.skymapsource_set.count }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
46
Templates/srgcat/healpix.html
Normal file
46
Templates/srgcat/healpix.html
Normal file
@@ -0,0 +1,46 @@
|
||||
|
||||
{% extends "base.html" %}
|
||||
{% load heasarc_templates %}
|
||||
|
||||
{% block header %}{% endblock %}
|
||||
{% block precontent %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">
|
||||
|
||||
|
||||
<h2>Первый обзор всего неба телескопом АРТ-XC</h2>
|
||||
<hr>
|
||||
|
||||
<div id="aladin-lite-div" style="width:100%;height:750px;align=right;"></div>
|
||||
|
||||
<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: 35, target: "0.0 0.0",
|
||||
showShareControl: true,
|
||||
showCooGrid: false});
|
||||
|
||||
aladin.createImageSurvey("INTEGRAL_14y_17_60", "INTEGRAL_14y_17_60", "http://cade.irap.omp.eu/documents/Ancillary/4Aladin/INTEGRAL_14y_17_60/", 'galactic', 3)
|
||||
aladin.createImageSurvey("IKI/SRG/ART-XC", "SRG/ART-XC", "http://localhost:9999/static/ArtHiPS/", 'galactic', 3, {imgFormat: 'png'})
|
||||
|
||||
aladin.setImageSurvey('IKI/SRG/ART-XC');
|
||||
aladin.getBaseImageLayer().getColorMap().update('cubehelix');
|
||||
|
||||
var simbadhips = A.catalogHiPS('http://axel.u-strasbg.fr/HiPSCatService/Simbad', {color: "#2F4F4F", onClick: 'showPopup', name: 'Simbad'}, null, true);
|
||||
aladin.addCatalog(simbadhips);
|
||||
simbadhips.hide();
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
412
Templates/srgcat/index.html
Normal file
412
Templates/srgcat/index.html
Normal file
@@ -0,0 +1,412 @@
|
||||
{% 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 %}
|
63
Templates/srgcat/selection.html
Normal file
63
Templates/srgcat/selection.html
Normal file
@@ -0,0 +1,63 @@
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% 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>
|
||||
<hr>
|
||||
{% endblock %}
|
||||
{% block precontent %}{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Create/update new user-defined Selection</h2>
|
||||
{% if message %}
|
||||
<div class="alert alert-warning">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if form %}
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
<p>Hint: For a compact view, please use the shortest <em>Short name (slug)</em></p>
|
||||
{% endif %}
|
||||
|
||||
{% if selections %}
|
||||
<table class="table">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">Access</th>
|
||||
<th class="th-sm">Slug</th>
|
||||
<th class="th-sm">Name</th>
|
||||
<th class="th-sm">Sources</th>
|
||||
<th class="th-sm">Operations</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for selection in selections %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if selection.public %}
|
||||
<span class="glyphicon glyphicon-eye-open"></span>{% else %}<span class="glyphicon glyphicon-eye-close"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ selection.slug }}</strong>
|
||||
</td>
|
||||
<td><a href="{{ selection.get_absolute_url }}">{{ selection.name }}</a></td>
|
||||
<td>{{ selection.skymap_sources.count }}</td>
|
||||
<td>
|
||||
<small>[<a href="{{ selection.get_download_url }}">download</a>]</small>
|
||||
<small>[<a href="{{ selection.get_edit_url }}">edit</a>]</small>
|
||||
<small>[<a href="{{ selection.get_delete_url }}">delete</a>]</small>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
63
Templates/srgcat/session.html
Normal file
63
Templates/srgcat/session.html
Normal file
@@ -0,0 +1,63 @@
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% 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>
|
||||
<hr>
|
||||
{% endblock %}
|
||||
{% block precontent %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<h1>Session parameters</h1>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<h3>Edit</h3>
|
||||
|
||||
{% if message %}
|
||||
<div class="alert alert-warning">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if form %}
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<table class="table">
|
||||
{{ form }}
|
||||
</table>
|
||||
<input class="btn btn-default" type="submit" value="Submit">
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
{% if session %}
|
||||
<h3>Current values</h3>
|
||||
<pre>
|
||||
sign_threshold = {{ session.sign_threshold }}
|
||||
target_ra = {{ session.target_ra }}
|
||||
target_dec = {{ session.target_dec }}
|
||||
</pre>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
370
Templates/srgcat/skymap.html
Normal file
370
Templates/srgcat/skymap.html
Normal file
@@ -0,0 +1,370 @@
|
||||
{% extends "js9base.html" %}
|
||||
{% load heasarc_templates %}
|
||||
|
||||
{% 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>
|
||||
<hr>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
{% if form %}
|
||||
|
||||
<form action="/srgcat/skymap" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if skymap %}
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-2">
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<p>
|
||||
{% if dump %}
|
||||
<a href='javascript:JS9.Load("/skymap/{{ skymap }}/L3/{{ dump }}/img_conv.fits.gz", {display: "js9aver", scale:"log", colormap:"cool", zoom:"toFit"});'>conv</a> |
|
||||
<a href='javascript:JS9.Load("/skymap/{{ skymap }}/L3/{{ dump }}/img_conv2dp.fits.gz", {display: "js9aver", scale:"log", colormap:"cool", zoom:"toFit"});'>conv2dp</a> |
|
||||
<a href='javascript:JS9.Load("/skymap/{{ skymap }}/L3/{{ dump }}/exp.fits.gz", {display: "js9aver", zoom:"toFit"});'>exp</a> |
|
||||
<a href='javascript:JS9.Load("/skymap/{{ skymap }}/L3/{{ dump }}/pbg.fits.gz", {display: "js9aver", zoom:"toFit"});'>pbg</a>
|
||||
{% else %}
|
||||
Load:
|
||||
<a href='javascript:JS9.Load("/skymap/{{ skymap }}/L3/img_conv_2.fits.fz", {display: "js9aver", scale:"log",colormap:"cool", zoom:"toFit"});'>conv</a> |
|
||||
<a href='javascript:JS9.Load("/skymap/{{ skymap }}/L3/img_conv2dp_2.fits.fz", {display: "js9aver", scale:"log",colormap:"cool", zoom:"toFit"});'>conv2dp</a> |
|
||||
<a href='javascript:JS9.Load("/skymap/{{ skymap }}/L3/exp_2.fits.fz", {display: "js9aver", zoom:"toFit"});'>exp</a> |
|
||||
<a href='javascript:JS9.Load("/skymap/{{ skymap }}/L3/pbg_2.fits.fz", {display: "js9aver", zoom:"toFit"});'>pbg</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<div class="JS9Panner" id="js9averPanner" data-width="180px" data-height="180px"></div>
|
||||
|
||||
<div id="aladin-lite-div" style="width:180px;height:180px;align=center"></div>
|
||||
<script type="text/javascript" src="//aladin.u-strasbg.fr/AladinLite/api/v2/latest/aladin.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var aladin = A.aladin('#aladin-lite-div', {
|
||||
cooFrame: "J2000d",
|
||||
survey: "P/DSS2/color",
|
||||
fov: 12, target: "{{ skymap.RA_CEN|safe }} {{ skymap.DE_CEN|safe }}",
|
||||
showShareControl: false,showGotoControl:false,showReticle:false,
|
||||
showCooGrid: false,showLayersControl:false,showZoomControl:false,});
|
||||
|
||||
aladin.createImageSurvey("IKI/SRG/ART-XC", "SRG/ART-XC", "http://localhost:9999/static/ArtHiPS/", 'galactic', 3, {imgFormat: 'png'})
|
||||
|
||||
aladin.setImageSurvey('IKI/SRG/ART-XC');
|
||||
//aladin.getBaseImageLayer().getColorMap().update('cubehelix');
|
||||
|
||||
|
||||
var center = A.catalog({shape: 'square', name: 'Center', color: 'red', sourceSize: 10, displayLabel: false,onClick: 'showTable'});
|
||||
center.addSources(A.source({{ skymap.RA_CEN|safe }}, {{ skymap.DE_CEN|safe }},
|
||||
{'':'<a href="{{ skymap.get_absolute_url }}">{{ skymap }}</a>',}));
|
||||
aladin.addCatalog(center);
|
||||
|
||||
var neib = A.catalog({shape: 'square', name: 'Neibghour', color: 'green', sourceSize: 10, displayLabel: false,onClick: 'showTable'});
|
||||
{% for neib in skymap.get_neighbours %}
|
||||
neib.addSources(A.source({{ neib.RA_CEN|safe }}, {{ neib.DE_CEN|safe }},
|
||||
{'':'<a href="{{ neib.get_absolute_url }}">{{ neib }}</a>',}));
|
||||
{% endfor %}
|
||||
aladin.addCatalog(neib);
|
||||
|
||||
aladin.addCatalog(A.catalogFromURL('http://193.232.10.38/static/aladin/bound_radec.csv.xml',
|
||||
{name: 'boundary', sourceSize:10, color: 'red', shape: 'cross' }));
|
||||
</script>
|
||||
|
||||
<hr>
|
||||
|
||||
{% if target_ra and target_dec %}
|
||||
<p>
|
||||
<button type="button" class="btn btn-warning" onclick="load_target()">Reference source</button>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
<button onclick="load_skymap_sources()">SkyMap sources</button>
|
||||
<!--button onclick="load_skymap_names()">Names</button-->
|
||||
</p>
|
||||
<h4>Load catalogs</h4>
|
||||
|
||||
{% if intrefcat %}<button onclick="load_integral()">INTEGRAL</button>{% endif %}
|
||||
{% if swiftbat %}<button onclick="load_swiftbat()">Swift-BAT</button>{% endif %}
|
||||
{% if rosat %}<button onclick="load_rosat()">ROSAT</button>{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-8">
|
||||
|
||||
{% if skymap.is_L3_valid %}
|
||||
<div class="JS9Menubar" id="js9averMenubar" data-width="500px"></div>
|
||||
<div class="JS9" id="js9aver" data-width="500px" data-height="500px"></div> <!-- 700 px -->
|
||||
<pre>{{ skymap.get_absolute_path }}/L3/{% if dump %}{{ dump }}{% endif %}</pre>
|
||||
{% else %}
|
||||
|
||||
<hr>
|
||||
<div class="alert alert-warning">
|
||||
<p><h4>L3 is not found in {{ skymap.get_absolute_path }}</h4></p>
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<!--div class="col-sm-2">
|
||||
{% if skymap.skymapsource_set.count %}
|
||||
<h4>Add to sky:</h4>
|
||||
{% for src in skymap.skymapsource_set.all %}
|
||||
<a href='javascript:JS9.AddRegions("circle", {ra:"{{ src.ra }}", dec:"{{ src.dec }}", display: "js9aver"});'>{{ src.name }}</a></a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div-->
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-2">
|
||||
|
||||
{% if request.user.session.target_ra and request.user.session.target_dec %}
|
||||
<button type="button" class="btn btn-info" onclick="load_target()"><span class="glyphicon glyphicon-screenshot"></span> Target {{ request.user.session.target_ra }}<sup>RA</sup>
|
||||
{{ request.user.session.target_dec }}<sup>Dec</sup></button>
|
||||
{% endif %}
|
||||
|
||||
<h4>SkyMap <a href="{{ skymap.get_absolute_url }}">{{ skymap }}</a> </h4> {{ skymap.RA_CEN|floatformat:2 }}<sup>RA</sup> {{ skymap.DE_CEN|floatformat:2 }}<sup>Dec</sup> <a data-toggle="tooltip" data-placement="top" title="Lookup target position in survey" href="{% url 'target survey GET' %}?ra={{ skymap.RA_CEN|safe }}&dec={{ skymap.DE_CEN|safe }}&load_surveypath=False"><span class="glyphicon glyphicon-flag"></span></a>
|
||||
|
||||
|
||||
|
||||
{% if related_dumps %}
|
||||
<h4>Related dumps</h4>
|
||||
<list-scroll>
|
||||
<ul>
|
||||
{% for dump in related_dumps %}
|
||||
<li>
|
||||
<a href="/srgcat/{{ dump.pk }}/{{ skymap.pk }}/skymap">{{ dump.date|date:"d M Y H:i" }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</list-scroll>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function load_skymap_names(){
|
||||
{% if skymap.skymapsource_set.count %}
|
||||
{% for src in skymap.skymapsource_set.all %}
|
||||
JS9.AddRegions("text", {ra:"{{ src.ra }}", dec:"{{ src.dec }}", text:"{{ src.name }}", color:"yellow", display: "js9aver"});
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
function load_skymap_sources(){
|
||||
JS9.RemoveRegions();
|
||||
{% if skymap.skymapsource_set.count %}
|
||||
{% for src in skymap_sources %}
|
||||
JS9.AddRegions("circle", {ra:"{{ src.ra }}", dec:"{{ src.dec }}", color:"yellow", display: "js9aver"});
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
function load_integral(){
|
||||
load_skymap_sources();
|
||||
{% for src in intrefcat %}
|
||||
//console.log("{{ src.name }}")
|
||||
JS9.AddRegions("circle", {ra:"{{ src.ra }}", dec:"{{ src.dec }}", text:"{{ src.name }}",});
|
||||
{% endfor %}
|
||||
}
|
||||
|
||||
function load_target(){
|
||||
JS9.AddRegions("circle", {ra:"{{ target_ra }}", dec:"{{ target_dec }}", text:"{{ src.name }}", color:"red",});
|
||||
}
|
||||
|
||||
|
||||
function load_swiftbat(){
|
||||
load_skymap_sources();
|
||||
{% for src in swiftbat %}
|
||||
//console.log("{{ src.name }}")
|
||||
JS9.AddRegions("circle", {ra:"{{ src.ra }}", dec:"{{ src.dec }}", text:"{{ src.name }}",});
|
||||
{% endfor %}
|
||||
}
|
||||
function load_rosat(){
|
||||
load_skymap_sources();
|
||||
{% for src in rosat %}
|
||||
console.log("{{ src.name }}")
|
||||
JS9.AddRegions("circle", {ra:"{{ src.ra }}", dec:"{{ src.dec }}", text:"{{ src.name }}",});
|
||||
{% endfor %}
|
||||
}
|
||||
|
||||
|
||||
function load_toggle(){
|
||||
|
||||
if($(this).attr('data-click-state') == 1) {
|
||||
$(this).attr('data-click-state', 0)
|
||||
console.log("remove rosat regions")
|
||||
//JS9.RemoveRegions("All",{tag:"rosat"});
|
||||
} else {
|
||||
$(this).attr('data-click-state', 1)
|
||||
console.log("load rosat regions");
|
||||
JS9.RemoveRegions();
|
||||
{% for src in rosat %}
|
||||
console.log("{{ src.name }}")
|
||||
JS9.AddRegions("circle", {ra:"{{ src.ra }}", dec:"{{ src.dec }}", text:"{{ src.name }}", tag:"rosat",});
|
||||
{% endfor %}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<!-- if skymap.skymapsource_set.count -->
|
||||
{% if skymap_sources %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h4>Loaded source list</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">Name</th>
|
||||
<th class="th-sm">Match</th>
|
||||
<th class="th-sm">Simbad type (abridged <5)</th>
|
||||
<th class="th-sm">RA</th>
|
||||
<th class="th-sm">Dec</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 skymap_sources %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ src.get_absolute_url }}"><b>{{ src.name }}</b></a> | <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>
|
||||
</td>
|
||||
<td><b>{{ src.heasarc.all.count }}</b></td>
|
||||
<td>
|
||||
{% for simsrc in src.simbad.all|slice:":5" %}
|
||||
{{ simsrc.obj_class }} |
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{{ src.ra|floatformat:5 }}</td>
|
||||
<td>{{ src.dec|floatformat:5 }}</td>
|
||||
<td>{{ src.sig|floatformat:2 }}</td>
|
||||
<td>{{ src.rate|floatformat:4 }}</td>
|
||||
<td>{{ src.flux|stringformat:"1.1e" }} </td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<!--div class="col-sm-2">
|
||||
</div-->
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if swiftbat %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h4>Swift-BAT 105m survey</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">Name</th>
|
||||
<th class="th-sm">Counterpart</th>
|
||||
<th class="th-sm">RA</th>
|
||||
<th class="th-sm">Dec</th>
|
||||
<th class="th-sm">S/N</th>
|
||||
<th class="th-sm">Flux</th>
|
||||
<th class="th-sm">Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for src in swiftbat %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ src.get_nasa_url }}" target="_blank"><b>{{ src.name }}</b> <span class="glyphicon glyphicon-new-window"></span></a> | <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>
|
||||
</td>
|
||||
<td>{{ src.counterpart_name}}</td>
|
||||
<td>{{ src.ra|floatformat:3 }}</td>
|
||||
<td>{{ src.dec|floatformat:2 }}</td>
|
||||
<td>{{ src.snr|floatformat:2 }}</td>
|
||||
<td>{{ src.flux|floatformat:2 }} × 10<sup>-12</sup> </td>
|
||||
<td>
|
||||
{{ src.otype }}
|
||||
{% if src.redshift > 0.0 %}z={{ src.redshift }}{% endif %}
|
||||
{% if src.lum > 0.0 %}logL={{ src.lum }}{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th class="th-sm"></th>
|
||||
<th class="th-sm"></th>
|
||||
<th class="th-sm"></th>
|
||||
<th class="th-sm"></th>
|
||||
<th class="th-sm"></th>
|
||||
<th class="th-sm">ergs/s/cm<sup>2</sup><br>14-195 keV</th>
|
||||
<th class="th-sm"></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<!--div class="col-sm-2">
|
||||
</div-->
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if dump %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<h4>Loaded data dump</h4>
|
||||
<table class="table">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">Name</th>
|
||||
<th class="th-sm">Date</th>
|
||||
<th class="th-sm">Survey</th>
|
||||
<th class="th-sm">Survey duration</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ dump.get_absolute_url }}"><b>{{ dump.name }}</b></a>
|
||||
</td>
|
||||
<td>{{ dump.date|date:"d M Y H:i:s" }}</b></td>
|
||||
<td>{% if survey %}<a href="{{ survey.get_absolute_url }}">{{ survey }}</a>{% endif %}</td>
|
||||
<td>{% if survey %}{{ survey.start|date:"d.m.Y H:i" }} - {{ survey.stop|date:"d.m.Y H:i" }}{% endif %}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
18
Templates/srgcat/source_name.html
Normal file
18
Templates/srgcat/source_name.html
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
{% extends "base.html" %}
|
||||
{% load heasarc_templates %}
|
||||
{% block precontent %}{% endblock %}
|
||||
{% block header %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Generate SRGa/e source name</h2>
|
||||
<form action="/srgcat/srga" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
|
||||
{% if name %}<h3>{{ name }}</h3>{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
42
Templates/srgcat/stats.html
Normal file
42
Templates/srgcat/stats.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{% extends "base.html" %}
|
||||
{% load heasarc_templates %}
|
||||
|
||||
{% block header %}{% endblock %}
|
||||
{% block precontent %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
<strong>Filter by group:</strong>
|
||||
{% for group in groups %}
|
||||
<a href="/stats/{{ group.pk }}/group">{{ group }}</a> |
|
||||
{% endfor %}
|
||||
<a href="/stats">show all</a>
|
||||
</p>
|
||||
|
||||
{% if data %}
|
||||
|
||||
<table id="srgcatstats" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">User</th>
|
||||
<th scope="col">Group</th>
|
||||
<th scope="col">URL name</th>
|
||||
<th scope="col">URL path</th>
|
||||
<th scope="col">IP</th>
|
||||
<th scope="col">Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for d in data %}
|
||||
<tr>
|
||||
<td>{{ d.user }}</td>
|
||||
<td><a href="/groups/{{ d.group.pk }}/info">{{ d.group }}</a></td>
|
||||
<td><a href="{{ d.path_info }}">{{ d.url_name }}</a></td>
|
||||
<td>{{ d.path_info|truncatechars:25 }}</td>
|
||||
<td>{{ d.ip_address }}</td>
|
||||
<td>{{ d.created|date:"d M Y H:i" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endblock %}
|
148
Templates/srgcat/target_survey.html
Normal file
148
Templates/srgcat/target_survey.html
Normal file
@@ -0,0 +1,148 @@
|
||||
|
||||
{% extends "base.html" %}
|
||||
{% load heasarc_templates %}
|
||||
|
||||
{% block header %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Lookup target position during SRG survey</h2>
|
||||
<form action="/target/" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
|
||||
{% if plate %}<!--h3>{{ plate }}</h3-->
|
||||
<!--h4>SkyMap: {% for skymap in plate.skymaps_set.all %}<a href="{{ skymap.get_absolute_url }}">{{ skymap }}</a> {% endfor %}</h4-->
|
||||
<h4>SkyMap (offset in arcmin): {% for skymap in skymaps %}<a href="/srgcat/{{ skymap.pk }}/skymap_radec/{{ form.ra.value }}/{{ form.dec.value }}/">{{ skymap }} ({{ skymap.separation|floatformat:1 }})</a> {% endfor %}</h4>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
<table class="table table-hover">
|
||||
{% if surveys %}
|
||||
<thead>
|
||||
<tr><th scope="col" colspan="4">List of close SRG passages</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for survey in surveys %}
|
||||
<tr class="{% if survey.is_past_due %}bg-success{% endif %}{% if survey.is_future %} bg-info{% endif %}{% if survey.is_current %} bg-danger{% endif %}">
|
||||
<td><span class="glyphicon glyphicon-repeat"></span></td>
|
||||
<td>{{ survey.start|date:"d M Y H:i" }}</td>
|
||||
<td>{{ survey.stop|date:"d M Y H:i" }}</td>
|
||||
<td><a href="{{ survey.get_absolute_url }}">{{ survey.experiment }}</a></td>
|
||||
<td>{% if user.is_authenticated %}<a href="{{ survey.head.get_absolute_url }}">{{ survey.head.get_datetime_middle|date:"F Y" }}</a>{% endif %}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endif %}
|
||||
</table>
|
||||
|
||||
|
||||
{% if surveys and load_surveypath %}
|
||||
|
||||
|
||||
<!-- insert this snippet where you want Aladin Lite viewer to appear and after the loading of jQuery -->
|
||||
<div id="aladin-lite-div" style="width:1000px;height:600px;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">
|
||||
|
||||
function getRandomColor() {
|
||||
var letters = '0123456789ABCDEF';
|
||||
var color = '#';
|
||||
for (var i = 0; i < 6; i++) {
|
||||
color += letters[Math.floor(Math.random() * 16)];
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
/* survey: "P/DSS2/color", */
|
||||
var aladin = A.aladin('#aladin-lite-div', {
|
||||
cooFrame: "J2000d",
|
||||
survey: "P/DSS2/color",
|
||||
fov: 4, target: "{{ ra_cen }} {{ dec_cen }}",
|
||||
showShareControl: true,
|
||||
showCooGrid: false});
|
||||
aladin.createImageSurvey("DIRBE_4","DIRBE_4", "http://cade.irap.omp.eu/documents/Ancillary/4Aladin/DIRBE_4",'galactic',8, {imgFormat: 'jpg'});
|
||||
aladin.getBaseImageLayer().getColorMap().update('rainbow');
|
||||
aladin.createImageSurvey("INTEGRAL_14y_17_60", "INTEGRAL_14y_17_60", "http://cade.irap.omp.eu/documents/Ancillary/4Aladin/INTEGRAL_14y_17_60/", 'galactic', 3)
|
||||
aladin.createImageSurvey("RASS-soft", "RASS-soft", "http://cade.irap.omp.eu/documents/Ancillary/4Aladin/RASS_IM3", 'galactic', 12, {imgFormat: 'jpg'})
|
||||
aladin.setImageSurvey(aladin.createImageSurvey("RASS", "RASS", "http://alasky.u-strasbg.fr/RASS", 'equatorial', 12, {imgFormat: 'jpg'}));
|
||||
aladin.getBaseImageLayer().getColorMap().update('cubehelix');
|
||||
aladin.getBaseImageLayer().getColorMap().reverse('true');
|
||||
aladin.setImageSurvey(aladin.createImageSurvey("LAB-NH", "LAB-NH", "http://cade.irap.omp.eu/documents/Ancillary/4Aladin/LAB_NH", 'galactic', 12, {imgFormat: 'jpg'}));
|
||||
aladin.setOverlayImageLayer(aladin.createImageSurvey("Planck-HFI", "Planck-HFI", "http://alasky.u-strasbg.fr/PLANCK/R2/HFI_Color_353_545_857", 'galactic', 12, {imgFormat: 'jpg'}));
|
||||
aladin.getOverlayImageLayer().setAlpha(0.35);
|
||||
aladin.getOverlayImageLayer().getColorMap().reverse('true');
|
||||
|
||||
aladin.setImageSurvey("P/DSS2/color");
|
||||
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 overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 1});
|
||||
aladin.addOverlay(overlay);
|
||||
|
||||
{% for survey in surveys %}
|
||||
var col=getRandomColor();
|
||||
var cat1 = A.catalog({shape: 'circle', name: 'Survey '+{{ survey.experiment }}, color: col, sourceSize: 10, displayLabel: false,onClick: 'showPopup'});
|
||||
console.log({{ survey.experiment }});
|
||||
var poly_ra = [];
|
||||
var poly_dec = [];
|
||||
{% for path in survey.get_path_filtered %}
|
||||
poly_ra.push({{ path.ra|safe }})
|
||||
poly_dec.push({{ path.dec|safe }})
|
||||
|
||||
cat1.addSources(A.source({{ path.ra|safe }}, {{ path.dec|safe }},
|
||||
{obsid: '<a href={{ survey.get_absolute_url }}>{{ survey.experiment }}</a>',
|
||||
eroday: '{{ path.eroday|floatformat:3 }}',start: '{{ survey.start|date:"d M Y H:i:s" }}',stop: '{{ survey.stop|date:"d M Y H:i:s" }}',
|
||||
RA: '{{ path.ra|floatformat:3 }}',Dec: '{{ path.dec|floatformat:3 }}', Roll: '{{ path.roll|floatformat:3 }}',}));
|
||||
|
||||
{% endfor %}
|
||||
aladin.addCatalog(cat1);
|
||||
|
||||
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 cat2 = A.catalog({shape: 'circle', name: 'Healpix Plates {{ survey }}', color: 'green', sourceSize: 10, displayLabel: false,onClick: 'showPopup'});
|
||||
var cat3 = A.catalog({shape: 'square', name: 'SkyMap Plates {{ survey }}', color: 'cyan', sourceSize: 10, displayLabel: false,onClick: 'showPopup'});
|
||||
{% for plate in survey.surveyhealpixplate_set.all %}
|
||||
|
||||
cat2.addSources(A.source({{ plate.ra|safe }}, {{ plate.dec|safe }},
|
||||
{RA: '{{ plate.ra|floatformat:3 }}',Dec: '{{ plate.dec|floatformat:3 }}', Healpix: '{{ plate.healpix }}',}));
|
||||
|
||||
{% for skymap in plate.skymaps_set.all %}
|
||||
cat3.addSources(A.source({{ skymap.RA_CEN|safe }}, {{ skymap.DE_CEN|safe }}, {SkyMap: '<a href="{{ skymap.get_absolute_url }}">{{ skymap }}', RA: '{{ skymap.RA_CEN|floatformat:4 }}', Dec: '{{ skymap.DE_CEN|floatformat:4 }}',}));
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
cat2.hide()
|
||||
aladin.addCatalog(cat2);
|
||||
aladin.addCatalog(cat3);
|
||||
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
overlay.add(A.circle({{ ra_cen }}, {{ dec_cen }}, 0.5, {color: 'cyan'}));
|
||||
overlay.add(A.circle({{ ra_cen }}, {{ dec_cen }}, 0.3, {color: 'yellow'}));
|
||||
overlay.add(A.circle({{ ra_cen }}, {{ dec_cen }}, 0.8, {color: 'white',}));
|
||||
|
||||
aladin.addCatalog(A.catalogFromURL('http://193.232.10.38/static/aladin/bound_radec.csv.xml',
|
||||
{name: 'boundary', sourceSize:10, color: 'red', shape: 'cross' }));
|
||||
|
||||
var simbadhips = A.catalogHiPS('http://axel.u-strasbg.fr/HiPSCatService/Simbad', {color: "#2F4F4F", onClick: 'showPopup', name: 'Simbad'}, null, true);
|
||||
aladin.addCatalog(simbadhips);
|
||||
simbadhips.hide();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user