Templates added
This commit is contained in:
98
Templates/artsim/index.html
Normal file
98
Templates/artsim/index.html
Normal file
@@ -0,0 +1,98 @@
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block header %}
|
||||
|
||||
<h3>Loaded ART-XC simulations:</h3>
|
||||
<ul>
|
||||
{% for sim in sims %}
|
||||
<li><a href="{{ sim.get_absolute_url }}">{{ sim.filename }}</a>, <b>Month {{ sim.month }}, Telescope {{ sim.telescope }}</b></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if sim %}
|
||||
<h3><a href="{{ sim.get_absolute_url }}">{{ sim.filename }}</a>, <b>Month {{ sim.month }}, T{{ sim.telescope }}</b></h3>
|
||||
{% endif %}
|
||||
|
||||
{% if sim %}
|
||||
<!-- 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("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: 'showPopup'}));
|
||||
|
||||
var cat1 = A.catalog({shape: 'circle', name: 'ArtSim Events', color: 'white', sourceSize: 10, displayLabel: false,onClick: 'showPopup'});
|
||||
{% if events %}
|
||||
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 1});
|
||||
aladin.addOverlay(overlay);
|
||||
{% for event in events %}
|
||||
cat1.addSources(A.source({{ event.ra|safe }}, {{ event.dec|safe }},
|
||||
{time: '{{ event.time|floatformat:4 }}',
|
||||
energy: '{{ event.energy|floatformat:2 }}',
|
||||
RA: '{{ event.ra|floatformat:4 }}',
|
||||
Dec: '{{ event.dec|floatformat:4 }}',
|
||||
Telescope: '{{ event.sim.telescope }}',
|
||||
Healpix: '{{ event.healpix }}',
|
||||
{% if event.plate %}Plate: '{{ event.plate.healpix }}',{% endif %}}));
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
aladin.addCatalog(cat1);
|
||||
|
||||
var cat2 = A.catalog({shape: 'circle', name: 'Healpix Plates', color: 'blue', sourceSize: 12, displayLabel: false,onClick: 'showPopup'});
|
||||
{% if plates %}
|
||||
{% for plate in plates %}
|
||||
cat2.addSources(A.source({{ plate.ra|safe }}, {{ plate.dec|safe }},
|
||||
{RA: '{{ plate.ra|floatformat:4 }}',Dec: '{{ plate.dec|floatformat:4 }}', Healpix: '{{ plate.healpix }}'}));
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
aladin.addCatalog(cat2);
|
||||
|
||||
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