Templates added
This commit is contained in:
520
Templates/erositadailycatalogues/index.html
Normal file
520
Templates/erositadailycatalogues/index.html
Normal file
@@ -0,0 +1,520 @@
|
||||
{% extends "base.html" %}
|
||||
{% load heasarc_templates %}
|
||||
{% load simbadescape %}
|
||||
|
||||
{% block header %}
|
||||
|
||||
{% endblock %}
|
||||
{% block precontent %}{% endblock %}
|
||||
{% block content %}
|
||||
{% if cat %}
|
||||
<h3>Source list <a href="{{ cat.get_absolute_url }}">{{ cat.obsid }}</a> ({{ cat.nrows }} rows) </h3>
|
||||
<p><strong>Dates:</strong> {{ cat.start|date:"d M Y H:i" }} - {{ cat.stop|date:"d M Y H:i" }},
|
||||
<strong>MJD:</strong> {{ cat.mjd_start|floatformat:4 }} - {{ cat.mjd_stop|floatformat:4 }},
|
||||
<strong>eRoDays:</strong> {{ cat.eroday_start }} - {{ cat.eroday_stop }},
|
||||
<strong>Created</strong> {{ cat.created|date:"d.m.y H:i" }}</p>
|
||||
<h4><a href="{{ cat.get_absolute_url_match }}">Matched only ({{ match_count }})</a> |
|
||||
<a href="{{ cat.get_absolute_url_nomatch }}">Not matched ({{ nomatch_count }})</a> |
|
||||
<a href="{{ cat.get_absolute_url_transients }}">Transients ({{ trans_count }})</a>
|
||||
{% if gaia_match_count %}| <a href="{{ cat.get_absolute_url_gaia }}">Gaia ({{ gaia_match_count }})</a>{% endif %}
|
||||
</h4>
|
||||
|
||||
{% if srcs %}
|
||||
|
||||
<!--table class="table"-->
|
||||
<table id="dterotrans" 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">N/Match</th>
|
||||
<th class="th-sm">RA</th>
|
||||
<th class="th-sm">Dec</th>
|
||||
<th class="th-sm">DET_LIKE_0</th>
|
||||
<th class="th-sm">ML_FLUX_0</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> {% if src.rosat_transient %}(ROSAT){% endif %}
|
||||
</td>
|
||||
<td>{{ src.heasarc.all.count }}</b></td>
|
||||
<td>{{ src.ra|floatformat:3 }}</td>
|
||||
<td>{{ src.dec|floatformat:2 }}</td>
|
||||
<td>{{ src.DET_LIKE_0|floatformat:2 }}</td>
|
||||
<td>{{ src.ML_FLUX_0|floatformat:2 }}</td>
|
||||
<td>{{ src.rate|floatformat:4 }}</td>
|
||||
<td>{{ src.flux|stringformat:"1.2e" }} </td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<!--tr>
|
||||
<th>Source 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 %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if src %}
|
||||
<h4><span class="glyphicon glyphicon-arrow-right"></span> <a href="{{ src.get_absolute_url }}"><b>{{ src.name }} ({{ src.heasarc.all.count }} matches)</b></a> from <a href="{{ src.catalog.get_absolute_url }}">{{ src.catalog.obsid }}</a></h4>
|
||||
<p><strong>RA & DEC:</strong> {{ src.ra|floatformat:4 }} {{ src.dec|floatformat:4 }} </br>
|
||||
<strong>L & B:</strong> {{ src.lii|floatformat:4 }} {{ src.bii|floatformat:4 }} </br>
|
||||
<strong>Ext, Ext Like:</strong> {{src.EXT|floatformat:-2}};{{src.EXT_LIKE|floatformat:-2}}</br>
|
||||
<strong>Dates:</strong> {{ src.catalog.start|date:"d M Y H:i" }} - {{ src.catalog.stop|date:"d M Y H:i" }},
|
||||
<strong>MJD:</strong> {{ src.catalog.mjd_start|floatformat:4 }} - {{ src.catalog.mjd_stop|floatformat:4 }},
|
||||
<strong>eRoDays:</strong> {{ src.catalog.eroday_start }} - {{ src.catalog.eroday_stop }},
|
||||
<strong>Created</strong> {{ src.created|date:"d.m.y H:i" }},
|
||||
<strong>Modified</strong> {{ src.created|date:"d.m.y H:i" }} </br>
|
||||
<strong><a href=http://simbad.u-strasbg.fr/simbad/sim-coo?Coord={{src.ra}}{{src.dec|stringformat:"+.3f"}}&CooFrame=FK5&CooEpoch=2000&CooEqui=2000&CooDefinedFrames=none&Radius=20&Radius.unit=arcsec&submit=submit+query&CoordList=>simbad ref</a></strong></br>
|
||||
<strong><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 ref</a></strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>DET_LIKE_0:</strong> {{ src.DET_LIKE_0|floatformat:2 }},
|
||||
<strong>ML_FLUX_0:</strong> {{ src.ML_FLUX_0|floatformat:2 }},
|
||||
<strong>flux:</strong> {{ src.flux|stringformat:"1.2e" }} erg/sec/cm^2
|
||||
</p>
|
||||
|
||||
{% if heasarcs %}
|
||||
<h4>XMMSSC (3XMM DR8 Version) CSC (Chandra Source Catalog, v2.0) RASS2RXS, AllWISEAGN</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">flux, erg/sec/cm^2</th>
|
||||
<th class="th-sm">Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for hsrc in heasarcs %}
|
||||
{% if hsrc.description != 'HeasarcXrayMaster' and hsrc.description != 'HeasarcCHANMASTER' %}
|
||||
<tr>
|
||||
<td>{{ hsrc.description|remove_heasarc }}</td>
|
||||
<td>
|
||||
<a href="{{ hsrc.get_absolute_url }}">{{ hsrc.name }}</a>
|
||||
</td>
|
||||
<td>{{ hsrc.ra|floatformat:3 }}</td>
|
||||
<td>{{ hsrc.dec|floatformat:3 }}</td>
|
||||
<td>{{ hsrc.lii|floatformat:3 }}</td>
|
||||
<td>{{ hsrc.bii|floatformat:3 }}</td>
|
||||
<!--td>{{ hsrc.healpix }}</td-->
|
||||
<td>{% if hsrc.error_radius > 0 %}{{ hsrc.error_radius|floatformat:2 }}{% endif %}</td>
|
||||
<td>{{ hsrc.separation|floatformat:3 }}</td>
|
||||
<td>{{ hsrc.erosita_flux|stringformat:"1.3e" }} </td>
|
||||
<td>
|
||||
{% if hsrc.description == 'HeasarcCSC' %}
|
||||
{% if hsrc.extent_flag == 'T' %}extended{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot></foot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if gaia %}
|
||||
<h4>GAIA</h4>
|
||||
<table id="dthgaia" 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><a href="{{ gaiasrc.get_absolute_url }}">{{ gaiasrc.name }}</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>
|
||||
<tfoot>
|
||||
</foot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if sdss %}
|
||||
<h4>SDSS</h4>
|
||||
<table id="dthgaia" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">specobjid</th>
|
||||
<th class="th-sm">ra</th>
|
||||
<th class="th-sm">dec</th>
|
||||
<th class="th-sm">Offset (arcsec)</th>
|
||||
<th class="th-sm">Z</th>
|
||||
<th class="th-sm">Zerr</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for sdsssrc in sdss %}
|
||||
<tr>
|
||||
<td><a href="{{ sdsssrc.get_absolute_url }}">{{ sdsssrc.specobjid }}</a></td>
|
||||
<td>{{ sdsssrc.ra|floatformat:-3}} </td>
|
||||
<td>{{ sdsssrc.dec|floatformat:-3}} </td>
|
||||
<td>{{ sdsssrc.separation|floatformat:3 }}</td>
|
||||
<td>{{ sdsssrc.z|stringformat:".3e" }}</td>
|
||||
<td>{{ sdsssrc.z_err|stringformat:".3e" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</foot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if simbad %}
|
||||
<h4>Simbad</h4>
|
||||
<table id="dthgaia" 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">ra</th>
|
||||
<th class="th-sm">dec</th>
|
||||
<th class="th-sm">Offset (arcsec)</th>
|
||||
<th class="th-sm">class</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.ra|floatformat:-3}} </td>
|
||||
<td>{{ simsrc.dec|floatformat:-3}} </td>
|
||||
<td>{{ simsrc.separation|floatformat:3 }}</td>
|
||||
<td>{{ simsrc.obj_class }}</td>
|
||||
<td>{{ simsrc.z|stringformat:".3e" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</foot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if flesch %}
|
||||
<h4>Flesch 2019</h4>
|
||||
<table id="dthgaia" 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">Z</th>
|
||||
<th class="th-sm">Zerr</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for fleschsrc in flesch %}
|
||||
<tr>
|
||||
<td><a href="{{ fleschsrc.get_absolute_url }}">{{ fleschsrc.name }}</a></td>
|
||||
<td>{{ fleschsrc.ra|floatformat:-3}} </td>
|
||||
<td>{{ fleschsrc.dec|floatformat:-3}} </td>
|
||||
<td>{{ fleschsrc.separation|floatformat:3 }}</td>
|
||||
<td>{{ fleschsrc.z|stringformat:".3e" }}</td>
|
||||
<td>{{ fleschsrc.z_err|stringformat:".3e" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</foot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if heasarc_xray %}
|
||||
<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 hsrc in heasarc_xray %}
|
||||
<tr>
|
||||
<td>{{ hsrc.observatory }} ({{ hsrc.database_table }})</td>
|
||||
<td>
|
||||
<a href="{{ hsrc.get_absolute_url }}">{{ hsrc.name }}</a>
|
||||
</td>
|
||||
<td>{{ hsrc.separation|floatformat:3 }}</td>
|
||||
<td>
|
||||
{% if hsrc.class_id != 9999 %}
|
||||
{{ hsrc.object_class.class_name }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<!--tr>
|
||||
<th>Mission</th>
|
||||
<th>Name</th>
|
||||
<th>Offset (arcsec)</th>
|
||||
<th>Type</th>
|
||||
</tr-->
|
||||
</foot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if heasarc_chanmaster %}
|
||||
<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 hsrc in heasarc_chanmaster %}
|
||||
<tr>
|
||||
<td>{{ hsrc.obsid }}</td>
|
||||
<td>
|
||||
<a href="{{ hsrc.get_absolute_url }}">{{ hsrc.name }}</a>
|
||||
</td>
|
||||
<td>{{ hsrc.separation|floatformat:3 }}</td>
|
||||
<td>{{ hsrc.exposure }}</td>
|
||||
<td>PI: {{ hsrc.pi }}, {{ hsrc.category }}</td>
|
||||
</tr>
|
||||
{% 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 %}
|
||||
|
||||
<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 rasscat = A.catalog({shape: 'circle', name: 'Counterparts', color: 'white', sourceSize: 30, displayLabel: false,onClick: 'showPopup'});
|
||||
aladin.addCatalog(rasscat);
|
||||
var xmmcat = A.catalog({shape: 'circle', name: 'Counterparts', color: 'red', sourceSize: 30, displayLabel: false,onClick: 'showPopup'});
|
||||
aladin.addCatalog(xmmcat);
|
||||
var csccat = A.catalog({shape: 'circle', name: 'Counterparts', color: 'green', sourceSize: 30, displayLabel: false,onClick: 'showPopup'});
|
||||
aladin.addCatalog(csccat);
|
||||
var sxpscat = A.catalog({shape: 'circle', name: 'Counterparts', color: 'magenta', sourceSize: 30, displayLabel: false,onClick: 'showPopup'});
|
||||
aladin.addCatalog(sxpscat);
|
||||
{% for hsrc in heasarcs %}
|
||||
{% if hsrc.description == 'HeasarcRASS2RXS' %}
|
||||
rasscat.addSources(A.source({{ hsrc.ra|safe }}, {{ hsrc.dec|safe }}, {name: '<a href="{{ hsrc.get_absolute_url }}">{{ hsrc.name }}</a>', flux: '{{hsrc.erosita_flux|stringformat:"1.3e"}}' }));
|
||||
{% endif %}
|
||||
{% if hsrc.description == 'HeasarcXMMSSC' %}
|
||||
xmmcat.addSources(A.source({{ hsrc.ra|safe }}, {{ hsrc.dec|safe }}, {name: '<a href="{{ hsrc.get_absolute_url }}">{{ hsrc.name }}</a>', flux: '{{hsrc.erosita_flux|stringformat:"1.3e"}}' }));
|
||||
{% endif %}
|
||||
{% if hsrc.description == 'HeasarcCSC' %}
|
||||
csccat.addSources(A.source({{ hsrc.ra|safe }}, {{ hsrc.dec|safe }}, {name: '<a href="{{ hsrc.get_absolute_url }}">{{ hsrc.name }}</a>', flux: '{{hsrc.erosita_flux|stringformat:"1.3e"}}' }));
|
||||
{% endif %}
|
||||
{% if hsrc.description == 'Heasarc2SXPS' %}
|
||||
sxpscat.addSources(A.source({{ hsrc.ra|safe }}, {{ hsrc.dec|safe }}, {name: '<a href="{{ hsrc.get_absolute_url }}">{{ hsrc.name }}</a>', flux: '{{hsrc.erosita_flux|stringformat:"1.3e"}}' }));
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
var erncat = A.catalog({shape: 'cross', name: 'Counterparts', color: 'red', sourceSize: 30, displayLabel: false,onClick: 'showPopup'});
|
||||
aladin.addCatalog(erncat);
|
||||
{% for esrc in erneighbours %}
|
||||
erncat.addSources(A.source({{ esrc.ra|safe }}, {{ esrc.dec|safe }}, {name: '<a href="{{ esrc.get_absolute_url }}">{{ esrc.name }}</a>', flux: '{{esrc.flux|stringformat:"1.3e"}}' }));
|
||||
{% endfor %}
|
||||
|
||||
|
||||
var gaiacat = A.catalog({shape: 'rhomb', name: 'Counterparts', color: 'white', sourceSize: 30, labelColumn:'name', onClick: 'showPopup'});
|
||||
aladin.addCatalog(gaiacat);
|
||||
{% for gsrc in gaia %}
|
||||
gaiacat.addSources(A.source({{ gsrc.ra|safe }}, {{ gsrc.dec|safe }}, {name: '<a href="{{ gserc.get_absolute_url }}"> {{ gsrc.name }}</a>'}));
|
||||
{% endfor %}
|
||||
/*
|
||||
var cat2 = A.catalog({shape: 'circle', name: 'Counterparts', color: 'red', sourceSize: 0.005, displayLabel: false,onClick: 'showPopup'});
|
||||
var cat3 = A.catalog({shape: 'circle', name: 'Counterparts', color: 'green', sourceSize: 0.005, displayLabel: false,onClick: 'showPopup'});
|
||||
var cat4 = A.catalog({shape: 'circle', name: 'Counterparts', color: 'blue', sourceSize: 0.005, displayLabel: false,onClick: 'showPopup'});
|
||||
|
||||
|
||||
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 %}
|
||||
|
||||
|
||||
{% if alerce_match %}
|
||||
|
||||
<!--table class="table"-->
|
||||
<table id="dtalerce" 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">Flux</th>
|
||||
<th class="th-sm">EroTrans Catalog</th>
|
||||
<th class="th-sm">ZTF alert</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for src in alerce_match %}
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<a href="{{ src.get_absolute_url }}"><b>{{ src.name }}</b></a> {% if src.rosat_transient %}(ROSAT){% endif %}
|
||||
</td>
|
||||
<td>{{ src.flux|stringformat:"1.1e" }} </td>
|
||||
<td><a href="{{ src.catalog.get_absolute_url }}">{{ src.catalog }}</a> {{ src.catalog.start|date:"d.m.y H:i" }} - {{ src.catalog.stop|date:"d.m.y H:i" }}</td>
|
||||
<td>
|
||||
{% if src.alerce.all %}
|
||||
{% for ztf in src.alerce.all %}
|
||||
<a href="{{ ztf.get_absolute_url }}">{{ ztf.oid }}</a> <strong>{{ ztf.get_early_class }}</strong> {{ ztf.firstdate|date:"d.m.y H:i" }} - {{ ztf.lastdate|date:"d.m.y H:i" }}<br>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
{% 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});
|
||||
/*
|
||||
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: 'EroTrans Sources', color: 'white', sourceSize: 10, displayLabel: false,onClick: 'showPopup'});
|
||||
|
||||
{% for src in srcs %}
|
||||
cat1.addSources(A.source({{ src.ra|safe }}, {{ src.dec|safe }}, {name: '<a href="{{ src.get_absolute_url }}">{{ src.name }}', RA: '{{ src.ra|floatformat:4 }}', Dec: '{{ src.dec|floatformat:4 }}', Healpix: '{{ src.healpix }}'}));
|
||||
{% endfor %}
|
||||
|
||||
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>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
227
Templates/erositadailycatalogues/listerositasample.html
Normal file
227
Templates/erositadailycatalogues/listerositasample.html
Normal file
@@ -0,0 +1,227 @@
|
||||
{% extends "base.html" %}
|
||||
{% 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 filtstatus = {"page": 1,
|
||||
"orderedby": "-tstop",
|
||||
"filter_classs": [],
|
||||
"filter_class": "[]",
|
||||
"filter_eclass": "any",
|
||||
"followup": ["any",],
|
||||
"srcperpage": 1000,
|
||||
"downloadtable": false,
|
||||
"status": "any",
|
||||
"pqual": "any",
|
||||
"pquals": ['1','2']};
|
||||
|
||||
function remove_from_trans_catalog(element,srcid) {
|
||||
element.parentElement.parentElement.remove();
|
||||
var senddata = new Object();
|
||||
senddata.srcid = srcid;
|
||||
senddata.csrfmiddlewaretoken = "{{csrf_token}}";
|
||||
senddata.sample="{{sample_name}}";
|
||||
$.ajax({url: "{% url 'remove from flux transients' %}",
|
||||
method: 'POST',
|
||||
data: senddata});
|
||||
}
|
||||
|
||||
function get_pandas(){
|
||||
filtstatus.downloadtable = true;
|
||||
$.ajax({url: window.location.href,
|
||||
method: 'POST',
|
||||
data: filtstatus,})
|
||||
filtstatus.downloadtable = false;
|
||||
};
|
||||
|
||||
|
||||
function paginate({page=null,ordercol=null,filter_class=null,filter_eclass=null,estatus=null,followup=null,srcperpage=null,pqual=null}={}) {
|
||||
filtstatus.csrfmiddlewaretoken = "{{csrf_token}}";
|
||||
if (!!page) {filtstatus.page=page};
|
||||
if (!!ordercol) {filtstatus.orderedby=ordercol};
|
||||
if (!!filter_class) {
|
||||
if (filter_class == "any"){
|
||||
filtstatus.filter_classs=[];
|
||||
}else{
|
||||
var idx = filtstatus.filter_classs.indexOf(filter_class)
|
||||
if ( idx == -1 ) {
|
||||
filtstatus.filter_classs.splice(0, 0, filter_class)
|
||||
} else {
|
||||
filtstatus.filter_classs.splice(idx, 1)
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
if (!!pqual) {
|
||||
if (pqual == "any"){
|
||||
filtstatus.pquals=[];
|
||||
}else{
|
||||
var idx = filtstatus.pquals.indexOf(pqual)
|
||||
if ( idx == -1 ) {
|
||||
filtstatus.pquals.splice(0, 0, pqual)
|
||||
} else {
|
||||
filtstatus.pquals.splice(idx, 1)
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
filtstatus.filter_class = JSON.stringify(filtstatus.filter_classs);
|
||||
filtstatus.pqual = JSON.stringify(filtstatus.pquals);
|
||||
if (!!filter_eclass) {filtstatus.filter_eclass=filter_eclass};
|
||||
if (!!estatus) {filtstatus.status=estatus};
|
||||
if (!!followup) {filtstatus.followup=followup};
|
||||
if (!!srcperpage) {filtstatus.srcperpage=srcperpage};
|
||||
|
||||
var ordercol = document.getElementById("ordercol")
|
||||
var followup = document.getElementById("followupst")
|
||||
var sourcestatus = document.getElementById("sourcestatus")
|
||||
var objectclass = document.getElementById("objectclass")
|
||||
var pqualfilter = document.getElementById("pquality")
|
||||
var typefilter = document.getElementById("typefilte")
|
||||
var ppbutton = document.getElementById("recordsnumbutton")
|
||||
|
||||
var element = document.getElementById("sourcetablecontainer");
|
||||
$.ajax({url: window.location.href,
|
||||
method: 'POST',
|
||||
data: filtstatus,
|
||||
success: function(d){
|
||||
element.firstElementChild.remove();
|
||||
element.innerHTML = d;
|
||||
ordercol.innerHTML=filtstatus.orderedby;
|
||||
followup.innerHTML=filtstatus.followup;
|
||||
sourcestatus.innerHTML=filtstatus.status;
|
||||
objectclass.innerHTML=filtstatus.filter_classs;
|
||||
typefilter.innerHTML=filtstatus.filter_eclass;
|
||||
ppbutton.innerHTML=filtstatus.srcperpage;
|
||||
pqualfilter.innerHTML=filtstatus.pquals;
|
||||
ztfclassnames();}});
|
||||
|
||||
}
|
||||
|
||||
function change_class(element, srcid, clsname){
|
||||
$.ajax({url: 'set_class/' + srcid + '/' + clsname,
|
||||
success: function(e){element.parentElement.previousElementSibling.firstChild.textContent=clsname;}});
|
||||
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", function(){paginate();});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block precontent %}
|
||||
|
||||
{% if srcs %}
|
||||
|
||||
<h1>pavel quality: {{pq}}</h1>
|
||||
|
||||
<h3>The list of {{ sample_name }}, total count {{srcs.count}} </h3>
|
||||
|
||||
<div class=container">
|
||||
<table id="tablefilters" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">last updated</th>
|
||||
<th class="th-sm">order col</th>
|
||||
<th class="th-sm">type filter</th>
|
||||
<th class="th-sm">class filter</th>
|
||||
<th class="th-sm">status filter</th>
|
||||
<th class="th-sm">followup filter</th>
|
||||
<th class="th-sm">quality</th>
|
||||
<th class="th-sm">src per page</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<th class="th-sm">{{cat.stop}}</th>
|
||||
<th class="th-sm" id="ordercol"></th>
|
||||
<th class="th-sm" id="typefilte"></th>
|
||||
<th class="th-sm" id="objectclass"></th>
|
||||
<th class="th-sm" id="sourcestatus"></th>
|
||||
<th class="th-sm" id="followupst"></th>
|
||||
<th class="th-sm" id="pquality"></th>
|
||||
<th class="th-sm" id="srcperpage">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="recordsnumbutton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
src per page
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','srcperpage':10})>10</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','srcperpage':50})>50</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','srcperpage':100})>100</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','srcperpage':1000})>1000</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','srcperpage':10000})>10000</a>
|
||||
</div>
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
</td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<h1>pavel quality: {{pq}}</h1>
|
||||
|
||||
<!--table class="table"-->
|
||||
|
||||
<div class=container">
|
||||
<div id="sourcetablecontainer"><div></div></div>
|
||||
</div>
|
||||
{% else %}
|
||||
<h3> This sample has zero sources </h3>
|
||||
{% endif %}
|
||||
|
||||
<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"}
|
||||
|
||||
function ztfclassnames(){
|
||||
var element=document.getElementsByClassName('ztfclassrf');
|
||||
for (var i = 0, length = element.length; i < length; i++) {element[i].innerHTML=ztfclasses[element[i].innerHTML]};
|
||||
};
|
||||
ztfclassnames();
|
||||
</script>
|
||||
|
||||
<script src="https://d3js.org/d3.v5.min.js">
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
195
Templates/erositadailycatalogues/listsources.html
Normal file
195
Templates/erositadailycatalogues/listsources.html
Normal file
@@ -0,0 +1,195 @@
|
||||
{% load simbadescape %}
|
||||
|
||||
<h3 id="srcnum">{{totcount}} sources</h3>
|
||||
</br>
|
||||
<div class=container">
|
||||
|
||||
<table id="sourcetable" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="th-sm">Source name<a onclick=paginate({"page":'1',"ordercol":'name'})>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a></th>
|
||||
<th class-"th-sm">l</th>
|
||||
<th class-"th-sm">b</th>
|
||||
<th class-"th-sm">start date
|
||||
<a onclick=paginate({"page":'1',"ordercol":'-tstart'})>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a></th>
|
||||
<th class-"th-sm">stop date
|
||||
<a onclick=paginate({"page":'1',"ordercol":'-tstop'})>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a></th>
|
||||
<th class="th-sm">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
type
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" onclick=paginate({"page":'1',"filter_eclass":'T1'})>T1</a>
|
||||
<a class="dropdown-item" onclick=paginate({"page":'1',"filter_eclass":'T2'})>T2</a>
|
||||
<a class="dropdown-item" onclick=paginate({"page":'1',"filter_eclass":'T3'})>T3</a>
|
||||
<a class="dropdown-item" onclick=paginate({"page":'1',"filter_eclass":'V1'})>V1</a>
|
||||
<a class="dropdown-item" onclick=paginate({"page":'1',"filter_eclass":'V2'})>V2</a>
|
||||
<a class="dropdown-item" onclick=paginate({"page":'1',"filter_eclass":'V3'})>V3</a>
|
||||
<a class="dropdown-item" onclick=paginate({"page":'1',"filter_eclass":'any'})>any</a>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<th class="th-sm">flux
|
||||
<a onclick=paginate({'page':'1','ordercol':'-sxflux'})>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a></th>
|
||||
<th class=th-sm">max ratio
|
||||
<a onclick=paginate({'page':'1','ordercol':'-erositatransient__ratio_to_maxxflux'})>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a>
|
||||
</th>
|
||||
<th class=th-sm">min ratio
|
||||
<a onclick=paginate({'page':'1','ordercol':'-erositatransient__ratio_to_minxflux'})>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a>
|
||||
</th>
|
||||
|
||||
<!-- <th class="th-sm">X offset, "</th> -->
|
||||
<th class="th-sm"><button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="bottom" title="condition: |pmra| > 4 pmraerr or |pmdec| > 4pmdecerr or |plx| > 4plxerr">GAIA</button></th>
|
||||
<th class="th-sm">Simbad class<a onclick=paginate({'page':'1','ordercol':'sclass'})>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes"></i></th>
|
||||
<th class="th-sm">Simbad z<a onclick=paginate({'page':'1','ordercol':'erositatransient__z'})><i class="glyphicon glyphicon-sort-by-attributes"></i> </th>
|
||||
<th class="th-sm">SRGz</th>
|
||||
<th class="th-sm">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
class
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','filter_class':'extragalactic'})>extragalactic</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','filter_class':'galactic'})>galactic</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','filter_class':'unknown'})>unknown</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','filter_class':"notfalse"})>not false</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','filter_class':'any'})>any</a>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<th class-"th-sm">comments</th>
|
||||
<th class-"th-sm">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
quality
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','pqual':'any'})>any</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','pqual':'-1'})>-1</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','pqual':'0'})>0</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','pqual':'1'})>1</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','pqual':'2'})>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<th class="th-sm">ztf (class<a onclick=paginate({'page':'1','ordercol':'erositatransient__ztfcl'})>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes"></i>
|
||||
</a>, sep "<a onclick=paginate({'page':'1','ordercol':'erositatransient__ztfcl_sep'})>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes"></i>
|
||||
)</th>
|
||||
<th class="th-sm">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
status
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','estatus':'solved'})>solved</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','estatus':'inwork'})>in work</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','estatus':'unclear'})>unclear</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','estatus':'any'})>any</a>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<th class="th-sm">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
followup
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','followup':'urgent')>urgent</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','followup':'normal')>normal work</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','followup':'NA')>NA</a>
|
||||
<a class="dropdown-item" onclick=paginate({'page':'1','followup':'any')>any</a>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for src in srcs %}
|
||||
<tr>
|
||||
<td>
|
||||
<!--button type="button" data-id={{src.id}} class="btn btn-warning" onclick=remove_from_trans_catalog(this,{{ src.id }})>hide</button-->
|
||||
<a href="{{ src.get_absolute_url }}"><b>{{ src.name }}{% if src.EXT_LIKE > 10 %} <p style="color:red">ext!</p> {% endif %}</b></a>
|
||||
</td>
|
||||
<td>{{ src.lii|floatformat:-3 }}</td>
|
||||
<td>{{ src.bii|floatformat:-3 }}</td>
|
||||
<td>{{ src.tstart|date:'Y-m-d' }}</td>
|
||||
<td>{{ src.tstop|date:'Y-m-d' }}</td>
|
||||
<td>{% if src.erositatransient.onlydetection%}V{%else%}T{%endif%}{{src.survey}}</td>
|
||||
<td>{{ src.sxflux|stringformat:"1.1e" }}</td>
|
||||
<td>{{src.erositatransient.ratio_to_maxxflux|floatformat:-1}} </td>
|
||||
<td>{{src.erositatransient.ratio_to_minxflux|floatformat:-1}} </td>
|
||||
<td align="center">{% if src.erositatransient.plx %} + {% endif %}</td>
|
||||
<td>{% if src.erositatransient.sclass %}<a href="http://simbad.u-strasbg.fr/simbad/sim-id?Ident={{ src.erositatransient.sname|simbad_escape }}&NbIdent=1&Radius=2&Radius.unit=arcmin&submit=submit+id">{{ src.erositatransient.sclass }}</a>{% endif %}</td>
|
||||
<td>{% if src.erositatransient.z and src.erositatransient.z != "nan" %}{{ src.erositatransient.z }}{% endif %}</td>
|
||||
<td></td>
|
||||
<td aligh="center">
|
||||
<!--div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" id="testjs">
|
||||
<a class="dropdown-item" onclick="change_class(this,{{src.id}},'AGN')">AGN</a>
|
||||
<a class="dropdown-item" onclick="change_class(this,{{src.id}},'star')">star</a>
|
||||
<a class="dropdown-item" onclick="change_class(this,{{src.id}},'galaxy')">galaxy</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}},'fake')">fake</a>
|
||||
</div>
|
||||
</div-->
|
||||
{{ src.srcclass }}
|
||||
</td>
|
||||
<td align="center">
|
||||
{% if src.sourcecomment_set.all %}
|
||||
<button type="button" class="btn btn-seconday" data-toggle="tooltip" data-placement="left" title="({{ src.sourcecomment_set.last.created }}) {{ src.sourcecomment_set.last.author.username }}: {{ src.sourcecomment_set.last.text }}">c</button>
|
||||
|
||||
|
||||
<!--div class="tooltip">c<span class="tooltiptext">({{ src.sourcecomment_set.last.created }}) {{ src.sourcecomment_set.last.author.username }}: {{ src.sourcecomment_set.last.text }}</span></div-->
|
||||
|
||||
{% endif %}</td>
|
||||
<td align="center">
|
||||
{{src.erositatransient.pavel_qual}}
|
||||
</td>
|
||||
<td>{% if src.erositatransient.ztfcl %} <a class="ztfclassrf" href="https://alerce.online/object/{{ src.erositatransient.ztfnm }}">{{ src.erositatransient.ztfcl }}</a>, {{ src.erositatransient.ztfcl_sep|floatformat:-1 }}" {% endif %}</td>
|
||||
<td>{{src.srcstatus}}</td>
|
||||
<td>{{src.followup}}</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pagination">
|
||||
<span class="step-links">
|
||||
{% if srcs.has_previous %}
|
||||
<button type="button" class="btn btn-warning" onclick=paginate({'page':1}) >first</button>
|
||||
<button type="button" class="btn btn-warning" onclick=paginate({'page':'{{ srcs.previous_page_number }}'}) >previous</button>
|
||||
{% endif %}
|
||||
|
||||
<span class="current">
|
||||
Page {{ srcs.number }} of {{ srcs.paginator.num_pages }}.
|
||||
</span>
|
||||
|
||||
{% if srcs.has_next %}
|
||||
<button type="button" class="btn btn-warning" onclick=paginate({'page':'{{ srcs.next_page_number }}'}) >next</button>
|
||||
<button type="button" class="btn btn-warning" onclick=paginate({'page':'{{ srcs.paginator.num_pages }}'}) >last</button>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
95
Templates/erositadailycatalogues/listsources_oldversion.html
Normal file
95
Templates/erositadailycatalogues/listsources_oldversion.html
Normal file
@@ -0,0 +1,95 @@
|
||||
{% load simbadescape %}
|
||||
|
||||
<table id="sourcetable" 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">l</th>
|
||||
<th class-"th-sm">b</th>
|
||||
<th class-"th-sm">obs date
|
||||
<a onclick=paginate(1,'-obsdate')>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a></th>
|
||||
<th class="th-sm">DET_LIKE_0
|
||||
<a onclick=paginate(1,'-DET_LIKE_0')>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a></th>
|
||||
<th class="th-sm">flux
|
||||
<a onclick=paginate(1,'-sxflux')>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a></th>
|
||||
<th class="th-sm">max X-ray companion flux
|
||||
<a onclick=paginate(1,'-max_companion_xflux')>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a>
|
||||
(name, ratio
|
||||
<a onclick=paginate(1,'-ratio_to_maxxflux')>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes-alt"></i>
|
||||
</a>)</th>
|
||||
<!-- <th class="th-sm">X offset, "</th> -->
|
||||
<th class="th-sm">Simbad class<a onclick=paginate(1,'sclass')>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes"></i>
|
||||
</a>(name, sep "
|
||||
<a onclick=paginate(1,'sclass_sep')>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes"></i>
|
||||
</a>)</th>
|
||||
<th class="th-sm">Gaia</th>
|
||||
<th class="th-sm">ztf (class<a onclick=paginate(1,'ztfcl')>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes"></i>
|
||||
</a>, sep "<a onclick=paginate(1,'ztfcl_sep')>
|
||||
<i class="glyphicon glyphicon-sort-by-attributes"></i>
|
||||
)</th>
|
||||
<th class-"th-sm">comments</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for src in srcs %}
|
||||
<tr>
|
||||
<td>
|
||||
<!--button type="button" data-id={{src.id}} class="btn btn-warning" onclick=remove_from_trans_catalog(this,{{ src.id }})>hide</button-->
|
||||
<a href="{{ src.get_absolute_url }}"><b>{{ src.name }}{% if src.EXT_LIKE > 10 %} <p style="color:red">ext!</p> {% endif %}</b></a>
|
||||
</td>
|
||||
<td>{{ src.lii|floatformat:-3 }}</td>
|
||||
<td>{{ src.bii|floatformat:-3 }}</td>
|
||||
<td>{{ src.tstart|date:'Y-m-d' }}--{{ src.tstop|date:'Y-m-d' }}</td>
|
||||
<td>{{ src.DET_LIKE_0|stringformat:"1.3e" }}</td>
|
||||
<td>{{ src.sxflux|stringformat:"1.1e" }}</td>
|
||||
<td>{% if src.max_companion_xflux %}{{ src.max_companion_xflux|stringformat:"1.1e" }}({{src.max_com_name}}, {{src.max_com_sep|floatformat:-1}}", {{src.ratio_to_maxxflux|floatformat:-1}})
|
||||
{% else %}<p style="color:red">{{src.rasslim|stringformat:"1.1e"}} ({{src.rasslimratio|floatformat:-1}})</p>{% endif %}</td>
|
||||
<!--<td>{% if src.closest_xray_separation %}{{ src.closest_xray_separation|floatformat:-1 }}"{% endif %}</td>-->
|
||||
<td>{% if src.sclass %}<a href="http://simbad.u-strasbg.fr/simbad/sim-id?Ident={{ src.sname|simbad_escape }}&NbIdent=1&Radius=2&Radius.unit=arcmin&submit=submit+id">{{ src.sclass }}</a>
|
||||
, {% if sdssz %}z={{ src.sdssz }}(sdss){% else %}{% if src.ssz and src.ssz != "nan" %}z={{ src.ssz }}{% endif %}{% endif %}{% endif %}</td>
|
||||
<td align="center">{% if src.plx %} + {% endif %}</td>
|
||||
<td>{% if src.ztfcl %} <a class="ztfclassrf" href="https://alerce.online/object/{{ src.ztfnm }}">{{ src.ztfcl }}</a>, {{ src.ztfcl_sep|floatformat:-1 }}" {% endif %}</td>
|
||||
<td align="center">
|
||||
{% if src.sourcecomment_set.all %}
|
||||
<button type="button" class="btn btn-seconday" data-toggle="tooltip" data-placement="left" title="({{ src.sourcecomment_set.last.created }}) {{ src.sourcecomment_set.last.author.username }}: {{ src.sourcecomment_set.last.text }}">c</button>
|
||||
|
||||
|
||||
<!--div class="tooltip">c<span class="tooltiptext">({{ src.sourcecomment_set.last.created }}) {{ src.sourcecomment_set.last.author.username }}: {{ src.sourcecomment_set.last.text }}</span></div-->
|
||||
|
||||
{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="pagination">
|
||||
<span class="step-links">
|
||||
{% if srcs.has_previous %}
|
||||
<button type="button" class="btn btn-warning" onclick=paginate(1,'{{ srcs.ordercol }}') >first</button>
|
||||
<button type="button" class="btn btn-warning" onclick=paginate('{{ srcs.previous_page_number }}','{{ srcs.ordercol }}') >previous</button>
|
||||
{% endif %}
|
||||
|
||||
<span class="current">
|
||||
Page {{ srcs.number }} of {{ srcs.paginator.num_pages }}.
|
||||
</span>
|
||||
|
||||
{% if srcs.has_next %}
|
||||
<button type="button" class="btn btn-warning" onclick=paginate('{{ srcs.next_page_number }}','{{ srcs.ordercol }}') >next</button>
|
||||
<button type="button" class="btn btn-warning" onclick=paginate('{{ srcs.paginator.num_pages }}','{{ srcs.ordercol }}') >last</button>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
213
Templates/erositadailycatalogues/viewsource.html
Normal file
213
Templates/erositadailycatalogues/viewsource.html
Normal file
@@ -0,0 +1,213 @@
|
||||
{% 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 %}
|
||||
|
740
Templates/erositadailycatalogues/viewsource_erosita.html
Normal file
740
Templates/erositadailycatalogues/viewsource_erosita.html
Normal file
@@ -0,0 +1,740 @@
|
||||
{% 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 %}
|
||||
|
Reference in New Issue
Block a user