srg/Templates/monthplan/show_scan_info.html
2024-06-05 11:33:02 +03:00

238 lines
9.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "monthplan/base.html" %}
{% load monthplan_templates %}
{% block content %}
<table class="table table-hover">
{% if scan %}
<thead>
<tr><th scope="col" colspan="4">Scans</th></tr>
</thead>
<tbody>
<tr class="{% if scan.is_past_due %}bg-success{% endif %}{% if scan.is_future %} bg-info{% endif %}{% if scan.is_current %} bg-danger{% endif %}">
<td><span class="glyphicon glyphicon-screenshot"></span></td>
<td><a href="{{ scan.get_absolute_url_logbook_start }}">{{ scan.start|date:"d M Y H:i:s" }}</a></td>
<td><a href="{{ scan.get_absolute_url_logbook_stop }}">{{ scan.stop|date:"d M Y H:i:s" }}</a></td>
<td><a href="{{ scan.get_absolute_url }}">{{ scan.experiment }}</a> {% if user.is_authenticated %}<a href="{{ scan.get_download_csv_url }}"><span class="glyphicon glyphicon-download"></span> download csv</a>{% endif %}</td><td>{{ scan.ra|floatformat:4 }}</td><td>{{ scan.dec|floatformat:4 }}</td><td>{{ scan.target }}</td>
</tr>
</tbody>
{% endif %}
</table>
{% if flightplans and user.is_authenticated %}
<table class="table table-hover">
<thead>
<tr><th scope="col" colspan="4">Flight program</th></tr>
</thead>
<tbody>
{% for obs in flightplans %}
<tr class="{% if obs.is_past_due %}bg-success{% endif %}{% if obs.is_future %} bg-info{% endif %}{% if obs.is_current %} bg-danger{% endif %}">
<td>
{% if obs.valid %}
<span class="glyphicon glyphicon-ok"></span>
{% else %}
<span class="glyphicon glyphicon-remove"></span>
{% endif %}
</td>
<td>{{ obs.start|date:"d M Y H:i:s"}}</td>
<td>{{ obs.stop|date:"d M Y H:i:s"}}</td>
<td>{{ obs.experiment }}</td>
<td>RA: {{ obs.ra|floatformat:4 }}</td>
<td>Dec: {{ obs.dec|floatformat:4 }}</td>
<td>Loaded: {{ obs.load_stamp|date:"d M Y" }}</td>
</tr>
<tr>
<td>MJD</td>
<td>{{ obs.mjd_start|floatformat:6}}</td>
<td>{{ obs.mjd_stop|floatformat:6}}</td>
<td>Q1: {{ obs.q1 }}</td>
<td>Q2: {{ obs.q2 }}</td>
<td>Q3: {{ obs.q3 }}</td>
<td>Q4: {{ obs.q4 }}</td>
</tr>
<tr>
<td>OBT</td>
<td>{{ obs.obt_start|floatformat:4}}</td>
<td>{{ obs.obt_stop|floatformat:4}}</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<table class="table table-hover">
{% if seances %}
<thead>
<tr><th scope="col" colspan="4">Сеансы связи с КА</th></tr>
</thead>
<tbody>
{% for seance in seances %}
<tr class="{% if seance.is_past_due %}bg-success{% endif %}{% if seance.is_future %} bg-info{% endif %}{% if seance.is_current %} bg-danger{% endif %}">
<td><span class="glyphicon glyphicon-time"></span></td>
<td><a href="{{ seance.get_absolute_url_logbook_start }}">{{ seance.start }}</a></td>
<td><a href="{{ seance.get_absolute_url_logbook_stop }}">{{ seance.stop }}</a></td>
<td></td>
<td></td>
<td></td>
<td>{{ seance.stations }}</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
{% if corrections %}
<thead>
<tr><th scope="col" colspan="4">Коррекция траектории КА</th></tr>
</thead>
<tbody>
{% for cor in corrections %}
<tr>
<td><span class="glyphicon glyphicon-flash"></span></td>
<td>{{ cor.start }}</td><td>{{ cor.stop }}</td><td>IMPSTART: {{ cor.impstart }}</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
{% if observations %}
<thead>
<tr><th scope="col" colspan="4">Наблюдения</th></tr>
</thead>
<tbody>
{% for obs in observations %}
<tr class="{% if obs.is_past_due %}bg-success{% endif %}{% if obs.is_future %} bg-info{% endif %}{% if obs.is_current %} bg-danger{% endif %}">
<td><span class="glyphicon glyphicon-screenshot"></span></td>
<td><a href="{{ obs.get_absolute_url_logbook_start }}">{{ obs.start }}</a></td>
<td><a href="{{ obs.get_absolute_url_logbook_stop }}">{{ obs.stop }}</a></td>
<td>{{ obs.experiment }}</td><td>{{ obs.ra|floatformat:4 }}</td><td>{{ obs.dec|floatformat:4 }}</td><td>{{ obs.target }}</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
{% if scans %}
<thead>
<tr><th scope="col" colspan="4">Scans</th></tr>
</thead>
<tbody>
{% for scan in scans %}
<tr class="{% if scan.is_past_due %}bg-success{% endif %}{% if scan.is_future %} bg-info{% endif %}{% if scan.is_current %} bg-danger{% endif %}">
<td><span class="glyphicon glyphicon-retweet"></span></td>
<td><a href="{{ scan.get_absolute_url_logbook_start }}">{{ scan.start }}</a></td>
<td><a href="{{ scan.get_absolute_url_logbook_stop }}">{{ scan.stop }}</a></td>
<td>{{ scan.experiment }}</td><td>{{ scan.target }}</td><td>template {{ scan.template }}</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
{% if datadumps and user.is_authenticated %}
<thead>
<tr><th scope="col" colspan="4">Data dumps</th></tr>
</thead>
<tbody>
{% for dd in datadumps %}
<tr>
<td><span class="glyphicon glyphicon-save"></span></td>
<td>{{ dd.start|date:"d M Y H:i:s" }}</td>
<td>{{ dd.stop|date:"d M Y H:i:s" }}</td><td>{{ dd.tstart }} {{ dd.tstop }}</td>
<td>{{ dd.name }}</td><td>{{ dd.filename }}</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
</table>
{% if scanpaths %}
<!-- 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: 'Scan Path', color: 'white', sourceSize: 10, displayLabel: false,onClick: 'showPopup'});
{% if scanpaths %}
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 1});
aladin.addOverlay(overlay);
{% for path in scanpaths %}
{% with next_element=scanpaths|next:forloop.counter0 %}
{% with previous_element=scanpaths|previous:forloop.counter0 %}
cat1.addSources(A.source({{ path.ra|safe }}, {{ path.dec|safe }},
{obsid: '{{ path.scan.experiment }}',
eroday: '{{ path.eroday }}',
RA: '{{ path.ra }}',Dec: '{{ path.dec }}', Roll: '{{ path.roll }}',}));
{% if next_element %}
overlay.add(A.polyline([ [{{ path.ra|safe }}, {{ path.dec|safe }}], [{{ next_element.ra|safe }}, {{ next_element.dec|safe }}], ]));
{% endif %}
{% endwith %}
{% endwith %}
{% endfor %}
{% endif %}
aladin.addCatalog(cat1);
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>
<div class="alert alert-info">
Note that the attitude information of the original flight plan has time resolution of 1 second. To reduce internet bandwidth consumption not all points of the scanning pattern are shown. The full scanning pattern is available for download after authorization.
</div>
{% endif %}
{% endblock %}