741 lines
29 KiB
HTML
741 lines
29 KiB
HTML
{% extends "base.html" %}
|
|
{% load mathfilters %}
|
|
{% load heasarc_templates %}
|
|
{% load simbadescape %}
|
|
|
|
{% block javascripts %}
|
|
|
|
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
|
|
|
<script>
|
|
|
|
var editcommentobj = null;
|
|
|
|
$(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
|
|
}
|
|
});
|
|
});
|
|
|
|
$(document).on('submit', '#editcommentform',function(e){
|
|
var fform = $("#editcommentform")
|
|
var ctext = $("#commenttextform").val();
|
|
var senddata = {
|
|
cid: fform.data("cid"),
|
|
csrfmiddlewaretoken:"{{csrf_token}}",
|
|
action:'post',
|
|
srcid:"{{ src.id }}",
|
|
text:ctext};
|
|
|
|
$.ajax({
|
|
type:'POST',
|
|
url:"{% url 'genericsource:gs add comment' %}",
|
|
data: senddata,
|
|
success:function(json){
|
|
fform.reset();
|
|
},
|
|
error : function(xhr,errmsg,err) {
|
|
console.log(xhr.status + ": " + xhr.responseText); // provide a bit more info about the error to the console
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
|
|
function change_class(element, srcid, clsname){
|
|
$.ajax({url: "{% url 'set erosita source class' srcid=0 classname='cln' %}".replace(/0/, srcid).replace(/cln/, clsname),
|
|
success: function(e){element.parentElement.previousElementSibling.firstChild.textContent=clsname;}});
|
|
|
|
};
|
|
|
|
function update_source_status(element, srcid, stat){
|
|
$.ajax({url: "{% url 'set erosita source status' srcid=0 status='sst' %}".replace(/0/, srcid).replace(/sst/, stat),
|
|
success: function(e){element.parentElement.previousElementSibling.firstChild.textContent=stat;}});
|
|
|
|
};
|
|
|
|
function update_source_followup(element, srcid, followup){
|
|
$.ajax({url: "{% url 'set erosita source followup' srcid=0 followup='flup' %}".replace(/0/, srcid).replace(/flup/, followup),
|
|
success: function(e){element.parentElement.previousElementSibling.firstChild.textContent=followup;}});
|
|
|
|
};
|
|
|
|
|
|
$(document).on('show.bs.modal', '#editcomment', function(event) {
|
|
var button = $(event.relatedTarget)
|
|
editcommentobj = button.parent().find('#commenttext').clone()
|
|
var ctext = button.parent().find('#commenttext').clone().text()
|
|
var modal = $("#editcomment")
|
|
var formtextarea = $('#commenttextform')
|
|
formtextarea.val(ctext)
|
|
$("#editcommentform").data("cid", button.data("cid"))
|
|
|
|
});
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
{% block precontent %}
|
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
|
|
|
|
|
|
|
|
<div class="container"><h1>Source:{{src.name}} </h1></div>
|
|
<div class=container">
|
|
<div class="row">
|
|
<div class="col"><h3></h3></div>
|
|
<div class="col"><h3>survey {{src.survey}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col"><h3>survey {{srcdet.survey}}</h3></div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
<div class="col"><h3>Transient</h3></div>
|
|
{% if refsrc %} <div class="col"><h3>reference</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<hr>
|
|
<div class="row">
|
|
<div class="col"><h3>name</h3></div>
|
|
<div class="col"><h3>{{src.name}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %} <h3>{{srcdet.name}}</h3> {% endif %}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
<div class="col"><h3>{{src.name}}</h3></div>
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}<a href="{{refsrc.get_absolute_url}}">{{refsrc.name}}</a>{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<hr>
|
|
<div class="row">
|
|
<div class="col"><h3>obs start</h3></div>
|
|
<div class="col"><h3>{{src.tstart}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col"><h3>{{srcdet.tstart}}</h3></div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
<div class="col"><h3>{{src.tstart}}</h3></div>
|
|
{% if refsrc %} <div class="col"><h3>{{refsrc.tstart}}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<div class="row">
|
|
<div class="col"><h3>obs stop</h3></div>
|
|
<div class="col"><h3>{{src.tstop}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col"><h3>{{srcdet.tstop}}</h3></div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{{refsrc.tstop}}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<hr>
|
|
<div class="row">
|
|
<div class="col"><h3>RA</h3></div>
|
|
<div class="col"><h3>{{src.ra|floatformat:-4}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col"><h3>{{srcdet.ra|floatformat:-4}}</h3></div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.ra|floatformat:-4}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<div class="row">
|
|
<div class="col"><h3>DEC</h3></div>
|
|
<div class="col"><h3>{{src.dec|floatformat:-4}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col"><h3>{{srcdet.dec|floatformat:-4}}</h3></div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.dec|floatformat:-4}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<hr>
|
|
<div class="row">
|
|
<div class="col"><h3>RADEC_ERR</h3></div>
|
|
<div class="col"><h3>{{src.error_radius|floatformat:-1}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}<h3>{{srcdet.error_radius|floatformat:-4}}</h3>{% endif %}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.error_radius|floatformat}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col"><h3>ML_BKG_0</h3></div>
|
|
<div class="col"><h3>{{src.ML_BKG_0|floatformat:-1}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}<h3>{{srcdet.ML_BKG_0|floatformat:-1}}</h3>{% endif %}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.ML_BKG_0|floatformat}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<hr>
|
|
<div class="row">
|
|
<div class="col"><h3>EXT</h3></div>
|
|
<div class="col"><h3>{{src.EXT|floatformat:-1}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}<h3>{{srcdet.EXT}}</h3>{% endif %}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.EXT|floatformat}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<div class="row">
|
|
<div class="col"><h3>EXT_ERR</h3></div>
|
|
<div class="col"><h3>{{src.EXT_ERR|floatformat:-1}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}<h3>{{srcdet.EXT_ERR|floatformat:-1}}</h3>{% endif %}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.EXT_ERR|floatformat}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<div class="row">
|
|
<div class="col"><h3>EXT_LIKE</h3></div>
|
|
<div class="col"><h3>{{src.EXT_LIKE|stringformat:"f"}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}<h3>{{srcdet.EXTLIKE}}</h3>{% endif %}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.EXT_LIKE|stringformat:"f"}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
|
|
<hr>
|
|
<div class="row">
|
|
<div class="col"><h3>ML_EXP_1</h3></div>
|
|
<div class="col"><h3>{{src.ML_EXP_1|floatformat:-1}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}{{srcdet.ML_EXP_1}}{% endif %}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.ML_EXP_1|floatformat}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<hr>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col"><h3>lii</h3></div>
|
|
<div class="col"><h3>{{src.lii|floatformat:-3}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}<h4>{{srcdet.lii|floatformat:-3}}</h4>{% endif %}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.lii|floatformat:-3}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col"><h3>bii</h3></div>
|
|
<div class="col"><h3>{{src.bii|floatformat:-3}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}<h4>{{srcdet.bii|floatformat:-3}}</h4>{% endif %}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.bii|floatformat}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<hr>
|
|
|
|
<div class="row">
|
|
<div class="col"><h3>flux</h3></div>
|
|
<div class="col"><h3>{{src.sxflux|stringformat:"1.1e"}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}<font color="black">{%else%}<font color="red">{%endif%}<h4>{{srcdet.sxflux|stringformat:"1.1e"}}</h4></font></div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{{refflux|stringformat:"1.1e"}}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<div class="row">
|
|
<div class="col"><h3>ML_CTS_0</h3></div>
|
|
<div class="col"><h3>{{src.ML_CTS_0|stringformat:".1f"}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}<h4>{{srcdet.ML_CTS_0|stringformat:".1f"}}</h4>{%endif%}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.ML_CTS_0|stringformat:".1f"}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col"><h3>DETLKL</h3></div>
|
|
<div class="col"><h3>{{src.DET_LIKE_0|stringformat:"1.1e"}}</h3></div>
|
|
{% for srcdet in detections %}
|
|
<div class="col">{%if srcdet.detected %}<h4>{{srcdet.DET_LIKE_0|stringformat:"1.1e"}}</h4>{%endif%}</div>
|
|
{% endfor %}
|
|
{% comment %}
|
|
{% if refsrc %} <div class="col"><h3>{% if true_counterpart %}{{refsrc.DET_LIKE_0|stringformat:"1.1e"}}{% endif %}</h3></div> {% endif %}
|
|
{% endcomment %}
|
|
</div>
|
|
<hr>
|
|
</div>
|
|
</div>
|
|
|
|
{% if src.sourcecomment_set.all %}
|
|
<div style="margin-top: 30px; margin-left: 10px;"
|
|
<div class="container-fluid" id="final_comment">
|
|
<h2>Final comment</h2>
|
|
<div class="well">
|
|
<h3>{{src.sourcecomment_set.last.text}}</h3>
|
|
<p>{{src.sourcecomment_set.last.author.username}} ({{src.sourcecomment_set.last.created}})</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div style="margin-top: 20px; margin-left: 30px;"
|
|
<div class="dropdown">
|
|
<h1> class:
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
{% if src.srcclass %}{{src.srcclass}}{% else %}select class{% endif %}
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" id="testjs">
|
|
<a class="dropdown-item" onclick="change_class(this,{{src.id}},'extragalactic')">extragalactic</a>
|
|
<a class="dropdown-item" onclick="change_class(this,{{src.id}},'galactic')">galactic</a>
|
|
<a class="dropdown-item" onclick="change_class(this,{{src.id}},'unknown')">unknown</a>
|
|
<a class="dropdown-item" onclick="change_class(this,{{src.id}},'false')">false</a>
|
|
<a class="dropdown-item" onclick="change_class(this,{{src.id}},'none')">unselect</a>
|
|
</div>
|
|
</div>
|
|
</h1>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin-top: 20px; margin-left: 30px;"
|
|
<div class="dropdown">
|
|
<h1> status:
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
{% if src.srcstatus %}{{src.srcstatus}}{% else %}change status{% endif %}
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" id="set_status">
|
|
<a class="dropdown-item" onclick="update_source_status(this,{{src.id}},'solved')">solved</a>
|
|
<a class="dropdown-item" onclick="update_source_status(this,{{src.id}},'inwork')">in work</a>
|
|
<a class="dropdown-item" onclick="update_source_status(this,{{src.id}},'unclear')">unclear</a>
|
|
<a class="dropdown-item" onclick="update_source_status(this,{{src.id}},'none')">unselect</a>
|
|
</div>
|
|
</div>
|
|
</h1>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin-top: 20px; margin-left: 30px;"
|
|
<div class="dropdown">
|
|
<h1> followup:
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
{% if src.followup %}{{src.followup}}{% else %}change followup policy{% endif %}
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" id="set_followup">
|
|
<a class="dropdown-item" onclick="update_source_followup(this,{{src.id}},'urgent')">urgent</a>
|
|
<a class="dropdown-item" onclick="update_source_followup(this,{{src.id}},'normal')">normal</a>
|
|
<a class="dropdown-item" onclick="update_source_followup(this,{{src.id}},'NA')">NA</a>
|
|
<a class="dropdown-item" onclick="update_source_followup(this,{{src.id}},'none')">unselect</a>
|
|
</div>
|
|
</div>
|
|
</h1>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container"><h1>Source:{{src.name}} </h1></div>
|
|
<div class=container">
|
|
|
|
{% if src.srcauxdata %}
|
|
{% load static %}
|
|
<div class="row">
|
|
<div class="col">
|
|
<h3> Gamma = {{src.srcauxdata.gamma|floatformat:-2 }} ({{src.srcauxdata.gammael|floatformat:-2 }}, {{src.srcauxdata.gammaeu|floatformat:-2 }}) nH = {{src.srcauxdata.nh|stringformat:"1.1e"}} </h3>
|
|
</div>
|
|
<div class="col">
|
|
<h3> Gamma = {{refsrc.srcauxdata.gamma|floatformat:-2 }} ({{refsrc.srcauxdata.gammael|floatformat:-2 }}, {{refsrc.srcauxdata.gammaeu|floatformat:-2 }}) nH = {{refsrc.srcauxdata.nh|stringformat:"1.1e" }}</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col">
|
|
{% comment %}
|
|
{% if src.srcauxdata.gamma > 0 %}
|
|
<object data='{% static src.srcauxdata.specimg %}' type="application/pdf" width="100%" height="600px"></object>
|
|
{% autoescape off %}
|
|
{{ srcspec }}
|
|
{% endautoescape %}
|
|
<div class="embed-responsive embed-responsive-16by9">
|
|
<object class="embed-responsive-item" src='/products/erotrans/0BB3D3F894F4CC5B7D700E07CF5E3392/{{src.id}}/{{src.srcauxdata.specimg}}' type="application/pdf"></object>
|
|
</div>
|
|
{%endif%}
|
|
{% endcomment %}
|
|
<embed src='/products/erotrans/0BB3D3F894F4CC5B7D700E07CF5E3392/{{src.id}}/{{src.srcauxdata.specimg}}#view=FitH' width="100%" height=600px type="application/pdf"></embed>
|
|
</div>
|
|
{% for refsrc in detections %}
|
|
<div class="col">
|
|
{%if refsrc and refsrc.srcauxdata and refsrc.srcauxdata.specimg %}
|
|
{% comment %}
|
|
<embed src='{% static refsrc.srcauxdata.specimg %}#toolbar=0&navpanes=0&scrollbar=0' width="100%" height="100%" type="application/pdf">
|
|
{% endcomment %}
|
|
<embed src='/products/erotrans/0BB3D3F894F4CC5B7D700E07CF5E3392/{{refsrc.id}}/{{refsrc.srcauxdata.specimg}}' width="100%" height="100%" type="application/pdf">
|
|
{% endif %}
|
|
</div>
|
|
{%endfor%}
|
|
</div>
|
|
<div class="row">
|
|
<div class="col">
|
|
{% if src.srcauxdata %}
|
|
<img src='/products/erotrans/0BB3D3F894F4CC5B7D700E07CF5E3392/{{src.id}}/{{src.srcauxdata.img}}' width="100%">
|
|
{% endif %}
|
|
</div>
|
|
{% for refsrc in detections %}
|
|
<div class="col">
|
|
{% if refsrc.srcauxdata and refsrc.srcauxdata.img %}
|
|
<img src='/products/erotrans/0BB3D3F894F4CC5B7D700E07CF5E3392/{{refsrc.id}}/{{refsrc.srcauxdata.img}}' width="100%">
|
|
{% comment %}
|
|
<img src='{% static refsrc.srcauxdata.img %}' width="100%">
|
|
{% endcomment %}
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="row">
|
|
<div class="col">
|
|
<embed src='/products/erotrans/0BB3D3F894F4CC5B7D700E07CF5E3392/{{src.id}}/{{src.srcauxdata.lcpdf}}#view=FitH' width="100%" height=600px type="application/pdf"></embed>
|
|
</div>
|
|
{% for refsrc in detections %}
|
|
<div class="col">
|
|
<embed src='/products/erotrans/0BB3D3F894F4CC5B7D700E07CF5E3392/{{refsrc.id}}/{{refsrc.srcauxdata.lcpdf}}#view=FitH' width="100%" height=600px type="application/pdf"></embed>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
</div>
|
|
</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>
|
|
|
|
{% if gaia.count %}
|
|
<div style="font-size:16px">
|
|
<h3>GAIA</h3>
|
|
<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">G mag</th>
|
|
<th class="th-sm">plx</th>
|
|
<th class="th-sm">pmra</th>
|
|
<th class="th-sm">pmdec</th>
|
|
<th class="th-sm">offset, "</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for csrc in gaia %}
|
|
<tr>
|
|
<td><a href="{{ csrc.get_absolute_url }}">{{ csrc.name }}</a></td>
|
|
<td>{{ csrc.ra|floatformat:5 }}</td>
|
|
<td>{{ csrc.dec|floatformat:5 }}</td>
|
|
<td>
|
|
{{ csrc.gaiasource.phot_g_mean_mag|floatformat:-1 }}
|
|
</td>
|
|
<td>
|
|
{{csrc.gaiasource.parallax|floatformat:-2}}±{{csrc.gaiasource.parallax_error|floatformat:-2}}
|
|
</td>
|
|
<td>
|
|
{{csrc.gaiasource.pmra|floatformat:-2}}±{{csrc.gaiasource.pmra_error|floatformat:-2}}
|
|
</td>
|
|
<td>
|
|
{{csrc.gaiasource.pmdec|floatformat:-2}}±{{csrc.gaiasource.pmdec_error|floatformat:-2}}
|
|
</td>
|
|
<td>{{ csrc.sep|floatformat:3 }}</td>
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if simbad.count %}
|
|
<h3>Simbad</h3>
|
|
<div style="font-size:16px">
|
|
<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">class & z</th>
|
|
<th class="th-sm">offset, "</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for csrc in simbad %}
|
|
<tr>
|
|
<td><a href="{{ csrc.get_absolute_url }}">{{ csrc.name }}</a></td>
|
|
<td>{{ csrc.ra|floatformat:3 }}</td>
|
|
<td>{{ csrc.dec|floatformat:3 }}</td>
|
|
<td>
|
|
class={{csrc.simbadsource.obj_class}} {%if csrc.simbadsource.z > 0.0001 %} z={{csrc.simbadsource.z}} {% endif %}
|
|
</td>
|
|
<td>{{ csrc.sep|floatformat:3 }}</td>
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
{% if xray.count %}
|
|
<h3>X-ray</h3>
|
|
<div style="font-size:16px">
|
|
<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, erg/s </th>
|
|
<th class="th-sm">offset, "</th>
|
|
<th class="th-sm">catalog</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for csrc in xray %}
|
|
<tr>
|
|
<td><a href="{{ csrc.get_absolute_url }}">{{ csrc.name }}</a></td>
|
|
<td>{{ csrc.ra|floatformat:3 }}</td>
|
|
<td>{{ csrc.dec|floatformat:3 }}</td>
|
|
<td>
|
|
{{ csrc.sxflux|stringformat:"1.1e" }}
|
|
</td>
|
|
<td>{{ csrc.sep|floatformat:3 }}</td>
|
|
<td>{{ csrc.catalog.first.name }}</td>
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if ztf.count %}
|
|
<h3>ZTF</h3>
|
|
<div style="font-size:16px">
|
|
<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">class, Mag </th>
|
|
<th class="th-sm">offset, "</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for csrc in ztf %}
|
|
<tr>
|
|
<td><a href="{{ csrc.get_absolute_url }}">{{ csrc.name }}</a></td>
|
|
<td>{{ csrc.ra|floatformat:3 }}</td>
|
|
<td>{{ csrc.dec|floatformat:3 }}</td>
|
|
<td>
|
|
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}}
|
|
</td>
|
|
<td>{{ csrc.sep|floatformat:3 }}</td>
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if allwise.count %}
|
|
<h3>AllWISE</h3>
|
|
<div style="font-size:16px">
|
|
<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">W1 </th>
|
|
<th class="th-sm">W2 </th>
|
|
<th class="th-sm">W3 </th>
|
|
<th class="th-sm">W4 </th>
|
|
<th class="th-sm">offset, "</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for csrc in allwise %}
|
|
<tr>
|
|
<td><a href="{{ csrc.get_absolute_url }}">{{ csrc.name }}</a></td>
|
|
<td>{{ csrc.ra|floatformat:3 }}</td>
|
|
<td>{{ csrc.dec|floatformat:3 }}</td>
|
|
<td>{{ csrc.w1mag|floatformat:3 }}</td>
|
|
<td>{{ csrc.w2mag|floatformat:3 }}</td>
|
|
<td>{{ csrc.w3mag|floatformat:3 }}</td>
|
|
<td>{{ csrc.w4mag|floatformat:3 }}</td>
|
|
<td>{{ csrc.sep|floatformat:3 }}</td>
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
{% comment %}
|
|
<div class="container">
|
|
<div id="aladin-lite-div" style="width:800px;height:800px;align=center"></div>
|
|
</div>
|
|
<!--input id="allwise" type="radio" name="survey" value="P/allWISE/color"><label for="allwise">AllWISE<label-->
|
|
<link rel="stylesheet" href="https://aladin.u-strasbg.fr/AladinLite/api/v2/latest/aladin.min.css" />
|
|
<script type="text/javascript" src="https://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",
|
|
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'}));
|
|
</script>
|
|
{% endcomment %}
|
|
|
|
<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>
|
|
|
|
|
|
<div class="container-fluid" id="src_comments">
|
|
{% if src.sourcecomment_set.all %}
|
|
<h2>Comments</h2>
|
|
{% for comment in src.sourcecomment_set.all %}
|
|
<div class="well">
|
|
<h3 id='commenttext'>{{comment.text}}</h3>
|
|
<p>{{comment.author.username}} ({{comment.created}})</p>
|
|
{% if comment.author == user %}
|
|
<button type="button" class="btn btn-primary" type="button" data-toggle="modal" data-cid="{{comment.id}}" data-target="#editcomment" id="toggleeditcomment">EDIT</button>
|
|
<!--button type="button" class="btn btn-primary" type="button" data-target="#editcomment" id="toggleeditcomment">EDIT</button-->
|
|
{% endif %}
|
|
</div>
|
|
{%endfor%}
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="modal fade" id="editcomment" tabindex="-1" role="dialog" aria-labelledby="editcomment" aria-hidden="true">
|
|
<div class="modal-dialog modal-xl" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="exampleModalLabel">your comment</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body" data-cid="">
|
|
<form id="editcommentform" data-cid="">
|
|
<div class="form-group">
|
|
<!--input type="text" class="form-control" id="recipient-name"-->
|
|
<input type="textArea" class="form-control input-xl" id="commenttextform" value="" />
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
|
<!--button type="button" class="btn btn-primary">Save changes</button-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
{% endblock %}
|
|
|