214 lines
9.0 KiB
HTML
214 lines
9.0 KiB
HTML
{% extends "base.html" %}
|
|
{% load mathfilters %}
|
|
{% load heasarc_templates %}
|
|
{% load simbadescape %}
|
|
|
|
{% block javascripts %}
|
|
<script>
|
|
$(document).on('submit', '#add_genericsource_comment',function(e){
|
|
e.preventDefault();
|
|
var ctext = $("#gs_comment").val();
|
|
$.ajax({
|
|
type:'POST',
|
|
url:'{% url 'genericsource:gs add comment' %}',
|
|
data:{
|
|
csrfmiddlewaretoken:"{{csrf_token}}",
|
|
action:'post',
|
|
srcid:"{{ src.id }}",
|
|
text:ctext
|
|
},
|
|
success:function(json){
|
|
document.getElementById("add_genericsource_comment").reset();
|
|
var newDiv = document.createElement("div");
|
|
newDiv.innerHTML='<h4>' + ctext + '</h4>';
|
|
newDiv.setAttribute("class", "well");
|
|
document.getElementById("src_comments").appendChild(newDiv);
|
|
},
|
|
error : function(xhr,errmsg,err) {
|
|
console.log(xhr.status + ": " + xhr.responseText); // provide a bit more info about the error to the console
|
|
}
|
|
});
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
{% block precontent %}
|
|
|
|
|
|
{% if src %}
|
|
<div class='container-fluid' style='background-color:#9cf5ff'>
|
|
<h1>Source</h1>
|
|
<h3><a href="{{ src.get_absolute_url }}"><b>{{ src.name }}</b></a> </h3>
|
|
<h3>RA, DEC: {{ src.ra|floatformat:4 }} {{ src.dec|floatformat:4 }} </h3>
|
|
<h3>l, b: {{ src.lii|floatformat:4 }} {{ src.bii|floatformat:4 }} </h3>
|
|
<h3> Flux 0.5-2 keV: {{ src.sxflux|stringformat:"1.1e" }} erg/(s cm<sup>2</sup>)</h3>
|
|
<h3> ML_CTS_0 : {{ src.ML_CTS_0|stringformat:".1f" }} pm {{src.ML_CTS_ERR_0|stringformat:".1f"}} </h3>
|
|
<h3>Detection likelihood: {{src.DET_LIKE_0|stringformat:"1.1e"}} </h3>
|
|
<h3>Extended: ext_like={{ src.EXT_LIKE|stringformat:"f"}}, ext_err={{src.EXT_ERR|stringformat:"f"}} </h3>
|
|
|
|
|
|
</div>
|
|
<div class='container-fluid' style='background-color:#cdff9c'>
|
|
<h1>Catalog</h1>
|
|
<h3>
|
|
obsid: {{ cat.obsid }}, start: {{ cat.start }}, ends: {{cat.stop }}, erodays: {{ cat.eroday_start }}--{{ cat.eroday_stop }}
|
|
</h3>
|
|
</div>
|
|
|
|
</br>
|
|
<h3><span class="label label-default"> <a href=http://simbad.u-strasbg.fr/simbad/sim-coo?Coord={{src.ra}}{{src.dec|stringformat:"+.7f"}}&CooFrame=FK5&CooEpoch=2000&CooEqui=2000&CooDefinedFrames=none&Radius=20&Radius.unit=arcsec&submit=submit+query&CoordList=>Simbad</a></span>
|
|
<span class="label label-default">
|
|
<a href=https://ned.ipac.caltech.edu/conesearch?search_type=Near%20Position%20Search&coordinates={{src.ra}}d{{src.dec|stringformat:"+.3f"|escape}}d&radius=0.2&in_csys=Equatorial&in_equinox=J2000&out_csys=Equatorial&out_equinox=Same%20as%20Input&hconst=67.8&omegam=0.308&omegav=0.692&wmap=4&corr_z=1&iau_style=liberal&in_csys_IAU=Equatorial&in_equinox_IAU=B1950&z_constraint=Unconstrained&z_unit=z&ot_include=ANY&nmp_op=ANY&out_csys_nearname=Equatorial&out_equinox_nearname=J2000&obj_sort=Distance%20to%20search%20center>NED</a>
|
|
</span></h3>
|
|
</br>
|
|
<h3>The list of all counterparts </h3>
|
|
<!--table class="table"-->
|
|
<table id="dailysrctr" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th class="th-sm">Source name</th>
|
|
<th class="th-sm">ra</th>
|
|
<th class="th-sm">dec</th>
|
|
<th class="th-sm">flux and aux info</th>
|
|
<th class="th-sm">offset, "</th>
|
|
<th class="th-sm">catalog</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for csrc in src.connectto.all|dictsort:"separation" %}
|
|
<tr>
|
|
<td><a href="{{ csrc.connected.get_absolute_url }}">{{ csrc.connected.name }}</a></td>
|
|
<td>{{ csrc.connected.ra|floatformat:3 }}</td>
|
|
<td>{{ csrc.connected.dec|floatformat:3 }}</td>
|
|
<td>
|
|
{% if csrc.connected.sxflux > 0 %} {{ csrc.connected.sxflux|stringformat:"1.1e" }}(X-ray 0.5-2 keV){% endif %}
|
|
{% if csrc.connected.gaiasource %}
|
|
{{ csrc.connected.gaiasource.phot_g_mean_mag|floatformat:-1 }}(G mag)
|
|
<!--
|
|
{% if csrc.connected.gaiasource.parallax > csrc.connected.gaiasource.parallax_error|mul:3 or csrc.connected.gaiasource.parallax < csrc.connected.gaiasource.parallax_error|mul:-3 %}
|
|
plx={{csrc.connected.gaiasource.parallax|floatformat:-2}}±{{csrc.connected.gaiasource.parallax_error|floatformat:-2}}
|
|
{%endif %}
|
|
-->
|
|
plx={{csrc.connected.gaiasource.parallax|floatformat:-2}}±{{csrc.connected.gaiasource.parallax_error|floatformat:-2}},
|
|
pmra={{csrc.connected.gaiasource.pmra|floatformat:-2}}±{{csrc.connected.gaiasource.pmra_error|floatformat:-2}},
|
|
pmdec={{csrc.connected.gaiasource.pmdec|floatformat:-2}}±{{csrc.connected.gaiasource.pmdec_error|floatformat:-2}}
|
|
|
|
{% endif %}
|
|
{% if csrc.connected.sdssspec %}z={{csrc.connected.sdssspec.z|stringformat:"1.2e"}}{% endif %}
|
|
{% if csrc.connected.ztfoid %}ztf classrf: <a class="ztfclassrf" href="">{{csrc.connected.ztfoid.classrf}}</a>, g {{csrc.connected.ztfoid.mean_magap_g|floatformat:-1}}, r {{csrc.connected.ztfoid.mean_magap_r|floatformat:-1}}{% endif %}
|
|
{% if csrc.connected.simbadsource %} class={{csrc.connected.simbadsource.obj_class}} {%if csrc.connected.simbadsource.z > 0.0001 %} z={{csrc.connected.simbadsource.z}} {% endif %} {% endif %}
|
|
</td>
|
|
<td>{{ csrc.separation|floatformat:3 }}</td>
|
|
<td>{{ csrc.connected.catalog.first.name }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
</table>
|
|
<br>
|
|
|
|
{% if src.sourcecomment_set.all %}
|
|
<div class="container-fluid" id="src_comments">
|
|
<h2>Comments</h2>
|
|
{% for comment in src.sourcecomment_set.all %}
|
|
<div class="well">
|
|
<h4>{{comment.text}}</h4>
|
|
<p>{{comment.author.username}} ({{comment.created}})</p>
|
|
</div>
|
|
{%endfor%}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<h3>Add comment</h3>
|
|
<form id="add_genericsource_comment" method="POST">
|
|
{% csrf_token %}
|
|
<div class="form-group">
|
|
<input type="textArea" class="form-control" id="gs_comment" placeholder="">
|
|
</div>
|
|
</form>
|
|
|
|
|
|
{% if src.srcauxdata %}
|
|
{% load static %}
|
|
<div class="container">
|
|
<embed src='{% static src.srcauxdata.specimg %}#toolbar=0&navpanes=0&scrollbar=0' width="800" height="500" type="application/pdf">
|
|
</div>
|
|
<div class="container">
|
|
<img src='{% static src.srcauxdata.img %}'>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<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: "J2000d",
|
|
fov: 0.05,
|
|
target: "{{src.ra|stringformat:'.6f'|safe}} {{src.dec|stringformat:'.6f'|safe}}",
|
|
showShareControl: true,
|
|
showCooGrid: true});
|
|
aladin.setOverlayImageLayer(aladin.createImageSurvey("RASS", "RASS", "http://alasky.u-strasbg.fr/RASS", 'equatorial', 12, {imgFormat: 'jpg'}));
|
|
|
|
var srccat = A.catalog({name: 'erosita source cat', color: 'white', shape:"cross", sourceSize: 30, onClick: 'showPopup'});
|
|
srccat.addSources(A.source({{src.ra|stringformat:"+.6f"|safe}}, {{src.dec|stringformat:"+.6f"|safe}}, {name: '<a href="{{ src.get_absolute_url }}">{{ src.name }}</a>' }));
|
|
aladin.addCatalog(srccat);
|
|
|
|
var xcon = A.catalog({name: 'erosita source X cat', color: 'white', shape:"circle", sourceSize: 30, onClick: 'showPopup'});
|
|
var ocon = A.catalog({name: 'erosita source O cat', color: 'red', shape:'circle', sourceSize: 30, onClick: 'showPopup'});
|
|
aladin.addCatalog(xcon);
|
|
aladin.addCatalog(ocon);
|
|
{% for csrc in src.connections.all %}
|
|
{% if csrc.sxflux > 0 %}
|
|
xcon.addSources(A.source({{csrc.ra|stringformat:"+.6f"|safe}}, {{csrc.dec|stringformat:"+.6f"|safe}}, {name: '<a href="{{ csrc.get_absolute_url }}">{{ csrc.name }}</a>' }));
|
|
{% else %}
|
|
ocon.addSources(A.source({{csrc.ra|stringformat:"+.6f"|safe}}, {{csrc.dec|stringformat:"+.6f"|safe}}, {name: '<a href="{{ csrc.get_absolute_url }}">{{ csrc.name }}</a>' }));
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
</script>
|
|
|
|
<script>
|
|
var ztfclasses={
|
|
null:"Not specified",
|
|
"classified":"Classified",
|
|
"not classified":"Not classified",
|
|
1:"Ceph",
|
|
2:"DSCT",
|
|
3:"EB",
|
|
4:"LPV",
|
|
5:"RRL",
|
|
6:"SN",
|
|
0:"Other",
|
|
7:"AGN I",
|
|
8:"Blazar",
|
|
9:"CV/Nova",
|
|
10:"SN Ia",
|
|
11:"SN Ibc",
|
|
12:"SN II",
|
|
14:"SLSN",
|
|
15:"EB/SD/D",
|
|
16:"EB/C",
|
|
17:"Periodic/Other",
|
|
18:"AGN",
|
|
19:"SN",
|
|
20:"Variable Star",
|
|
21:"Asteroid",
|
|
22:"Bogus",
|
|
23:"RS-CVn",
|
|
24:"QSO-I"}
|
|
|
|
var element=document.getElementsByClassName('ztfclassrf');
|
|
for (var i = 0, length = element.length; i < length; i++) {element[i].innerHTML=ztfclasses[element[i].innerHTML]};
|
|
</script>
|
|
|
|
|
|
|
|
{% endif %}
|
|
{% endblock %}
|
|
|