Commit e13d97a6 authored by Tom Dwelly's avatar Tom Dwelly
Browse files

getting ready for efeds_vi

parent 01a8718c
......@@ -35,7 +35,8 @@ ctx.canvas.height = window.innerHeight * 0.6;
var specfile = "";
//var submit_button = 0;
var submit_button = 1;
var submit_php = 'http://www.mpe.mpg.de/~tdwelly/SPIDERS/speccy_results/receive_speccy_submissions.php';
//var submit_php = 'http://www.mpe.mpg.de/~tdwelly/SPIDERS/speccy_results/receive_speccy_submissions.php';
var submit_php = 'http://erosita-bhm.mpe.mpg.de/efeds_vi/receive_vi.php';
var lambdaArray = [];
var fluxArray = [];
var fluxerrArray= [];
......@@ -206,14 +207,14 @@ function interpURL ()
}
else if ( par_name == "SUBMIT_BUTTON" ) { //see if we should add a submit button
submit_button = Number(par_val);
if ( submit_button > 0 ) {
document.getElementById("submitButton").type = "button";
}
}
else if ( par_name == "SUBMIT_PHP" ) { //see which php page to submit the results to
else if ( par_name == "SUBMIT_PHP" || par_name == "SUBMIT_URL" ) { //see which php page to submit the results to
submit_php = par_val;
}
}
if ( submit_button > 0 ) {
document.getElementById("submitButton").type = "button";
}
}
function AjaxError(x, e) {
......@@ -425,6 +426,11 @@ function changeTemplate() {
modelz0 = 0.0;
fluxcolnum = 1;
}
else if ( templateCode == "fromURLnoz" ){
templateURL = document.getElementById("templateURL").value;
modelz0 = znow;
fluxcolnum = 1;
}
else
{
templateURL = "templates/template_"+templateCode+".txt";
......@@ -877,6 +883,15 @@ function setTominus1()
writeVIinfo();
}
function setTozero()
{
var elem = document.getElementById("zinput");
znow = 0.0;
elem.value = precise(znow, 1);
plotData();
writeVIinfo();
}
function updateSmoothing(){
//re-calc the smoothed flux array
......@@ -943,6 +958,8 @@ function submitVIinfo(){
var class_person = $("input[type='radio'][name='class_person']:checked").val();
var issue = document.getElementById("issueSelect").value;
var comments = document.getElementById("commentBox").value;
var is_blagn = $('#isBlagn').is(":checked");
var is_interesting = $('#isInteresting').is(":checked");
var run1d = "-";
var run2d = "-";
for(var i=0;i<nkeys;i++)
......@@ -972,6 +989,8 @@ function submitVIinfo(){
FD.append("COMMENTS" ,comments);
FD.append("RUN1D" ,run1d);
FD.append("RUN2D" ,run2d);
FD.append("ISINTERESTING",is_interesting);
FD.append("ISBLAGN" ,is_blagn);
// // -----------------------------
......@@ -1023,6 +1042,14 @@ function writeVIinfo(){
var class_person = $("input[type='radio'][name='class_person']:checked").val();
var issue = document.getElementById("issueSelect").value;
var comments = document.getElementById("commentBox").value;
var is_blagn = $('#isBlagn').is(":checked");
var is_interesting = $('#isInteresting').is(":checked");
var str_is_blagn = "";
var str_is_interesting = "";
// console.log(is_blagn);
// console.log(is_interesting);
for(var i=0;i<nkeys;i++)
{
switch (keynames[i]) {
......@@ -1034,8 +1061,11 @@ function writeVIinfo(){
case "Z": zpipe = keyvals[i]; break;
}
}
str = sprintf("SDSSOBJECT %5d %5d %4d %12.7f %12.7f %10s %.7g %3s \"%8s\" \"%s\" \"%s\"\n",
plate, mjd, fiberid, ra, dec, zpipe, znow, z_conf_person, class_person, issue, comments);
if ( is_blagn == true ) { str_is_blagn = " BLAGN!";}
if ( is_interesting == true ) { str_is_interesting = " Interesting!";}
str = sprintf("SDSSOBJECT %5d %5d %4d %12.7f %12.7f %10s %.7g %3s \"%8s\" \"%s\" \"%s\"%s%s\n",
plate, mjd, fiberid, ra, dec, zpipe, znow, z_conf_person,
class_person, issue, comments, str_is_blagn, str_is_interesting);
outbox.value = str;
}
......@@ -1063,6 +1093,10 @@ function writePipeInfo(){
var str = sprintf("<a href='http://www.mpe.mpg.de/~tdwelly/SPIDERS/bitmask_decoder.html?ZWARNING=%s' target=_blank title='decode the ZWARNING flag'>%s</a>",
keyvals[i],keyvals[i]);
document.getElementById("pipeParams_ZWARNING" ).innerHTML = str; break;
case "EBOSS_TARGET1":
var str = sprintf("<a href='http://www.mpe.mpg.de/~tdwelly/SPIDERS/bitmask_decoder.html?EBOSS_TARGET1=%s' target=_blank title='decode the EBOSS_TARGET1 flag'>%s</a>",
keyvals[i],keyvals[i]);
document.getElementById("pipeParams_EBOSS_TARGET1" ).innerHTML = str; break;
}
}
......
......@@ -61,7 +61,7 @@
<body onload="startUpTasks()" onresize="plotData();">
<table>
<tr>
<td colspan="3" style="padding:0px;">
<td colspan="5" style="padding:0px;">
<canvas id="myCanvas" width="1000" height="500" style="border:1px solid #d3d3d3; cursor: crosshair;" tabindex="1">
Your browser does not support the HTML5 canvas element. Try e.g. a recent version of Firefox.
</canvas>
......@@ -69,7 +69,7 @@
</tr>
<tr>
<td colspan="2">
<td colspan="4">
<table title="SDSS pipeline parameters" style="padding:3px;">
<tr>
<th title="SDSS Plate index">Plate</th>
......@@ -83,6 +83,7 @@
<th title="SDSS 1D pipeline template spectral class">Class</th>
<th title="SDSS 1D pipeline template spectral sub-class">Subclass</th>
<th title="SDSS SN_MEDIAN_ALL metric">SNR</th>
<th title="SDSS EBOSS_TARGET1 bitmask">EBOSS_TARGET1</th>
<th>Links</th>
</tr>
<tr>
......@@ -97,6 +98,7 @@
<td id="pipeParams_CLASS" ></td>
<td id="pipeParams_SUBCLASS" ></td>
<td id="pipeParams_SN_MEDIAN_ALL"></td>
<td id="pipeParams_EBOSS_TARGET1"></td>
<td id="pipeParams_links"></td>
</tr>
</table>
......@@ -120,11 +122,12 @@
<td>
Current redshift:
</td>
<td>
<td colspan="3">
<input id="zinput" type="text" value="" onchange="updateFromzinput();" size="10" title="Current redshift of model+lines">
<input type="button" onclick="resetTozpipe()" value="Reset to Zpipe" title="reset redshift to pipeline value">
<input type="button" onclick="setTominus1()" value="Set to -1" title="Set the redshift to -1 to represent an unknown value">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adjust redshift:
<input type="button" onclick="resetTozpipe()" value="Set Z=Zpipe" title="Reset redshift to pipeline value">
<input type="button" onclick="setTominus1()" value="Set Z=-1" title="Set the redshift to -1 to represent an unknown value">
<input type="button" onclick="setTozero()" value="Set Z=0" title="Set the redshift to 0.0">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adjust redshift:
<input type="button" onclick="decrementRedshift(dznow_vcoarse)" value="<<<" title="large decrement">
<input type="button" onclick="decrementRedshift(dznow_coarse)" value="<<" title="coarse decrement">
<input type="button" onclick="decrementRedshift(dznow_fine)" value="<" title="fine decrement">
......@@ -157,10 +160,11 @@
<tr>
<td>
Model Template:</td>
<td>
<td colspan="3">
<select id="templateSelect" onchange="changeTemplate()" >
<option value="fromspec" selected>From specfile</option>
<option value="fromURL" >From URL</option>
<option value="fromURLnoz" >From URL - already redshifted</option>
<option value="qso1" >QSO: Type-I</option>
<option value="ellgal" >Galaxy: Elliptical</option>
<option value="Sabgal" >Galaxy: Sab</option>
......@@ -189,11 +193,11 @@
<td>
Z_CONF_PERSON:
</td>
<td>
<td colspan="3">
<label title="High level of certainty for both redshift and classification"><input type="radio" name="z_conf_person" onchange="writeVIinfo()" value="3" checked>3</label>
<label title="Uncertain redshift, certain classification" ><input type="radio" name="z_conf_person" onchange="writeVIinfo()" value="2" >2</label>
<label title="Uncertain redshift and classification" ><input type="radio" name="z_conf_person" onchange="writeVIinfo()" value="1" >1</label>
<label title="No inspection, Bad, Unplugged etc" ><input type="radio" name="z_conf_person" onchange="writeVIinfo()" value="0" >0</label>
<label title="No inspection, Bad, Unplugged etc" ><input type="radio" name="z_conf_person" onchange="writeVIinfo()" value="0" >0 (No Vote)</label>
</td>
......@@ -219,13 +223,22 @@
<td>
CLASS_PERSON:
</td>
<td>
<input type="radio" name="class_person" onchange="writeVIinfo()" value="NONE" >NONE
<input type="radio" name="class_person" onchange="writeVIinfo()" value="STAR" id="class_person_star" >STAR
<input type="radio" name="class_person" onchange="writeVIinfo()" value="GALAXY" id="class_person_galaxy">GALAXY
<input type="radio" name="class_person" onchange="writeVIinfo()" value="QSO" id="class_person_qso" >QSO
<input type="radio" name="class_person" onchange="writeVIinfo()" value="QSO_BAL" >QSO_BAL
<input type="radio" name="class_person" onchange="writeVIinfo()" value="BLAZAR" >BLAZAR
<td colspan="1">
<input type="radio" name="class_person" onchange="writeVIinfo()" value="NONE" >NONE
<input type="radio" name="class_person" onchange="writeVIinfo()" value="STAR" id="class_person_star" >STAR
<input type="radio" name="class_person" onchange="writeVIinfo()" value="GALAXY" id="class_person_galaxy">GALAXY
<input type="radio" name="class_person" onchange="writeVIinfo()" value="QSO" id="class_person_qso" >QSO
<input type="radio" name="class_person" onchange="writeVIinfo()" value="QSO_BAL" >QSO_BAL
<input type="radio" name="class_person" onchange="writeVIinfo()" value="BLAZAR" >BLAZAR
</td>
<td colspan="1">
&nbsp;EXTRAS:&nbsp;
</td>
<td colspan="1">
<label><input type="checkbox" onclick="writeVIinfo();" value="Galaxy with broad line(s)?" id="isBlagn">
Galaxy with broad lines?</label>&nbsp;&nbsp;
<label><input type="checkbox" onclick="writeVIinfo();" value="Particularly interesting spectrum?" id="isInteresting">
Particularly interesting spectrum?</label>
</td>
</tr>
......@@ -233,7 +246,7 @@
<td>
ISSUE:
</td>
<td>
<td colspan="3">
<select id="issueSelect" onchange="writeVIinfo()" >
<option value="None" selected>None</option>
<option value="low SN">Low S/N</option>
......@@ -243,7 +256,7 @@
<option value="Little/No Data">Little/No Data</option>
<option value="Superposition">Superposition</option>
<option value="Other/Unknown">Other/Unknown</option>
</select>
</select>
</td>
<td rowspan="2" title="Apply smoothing using a boxcar with the selected width (in pixels)">
Smoothing:
......@@ -261,14 +274,14 @@
<tr>
<td>
COMMENTS:</td>
<td>
<td colspan="3">
<!-- <input id="commentBox" type="text" onchange="writeVIinfo()" value="" size="50"> !-->
<input id="commentBox" type="text" onchange="writeVIinfo()" value="" size="50" style="width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;">
</td>
</tr>
<tr>
<td colspan="2">
<td colspan="4">
<!-- <textarea rows="1" cols="105" id="resultBox" style="background-color: lightgrey;">-</textarea> !-->
<textarea rows="1" id="resultBox" style="background-color: lightgrey; border: none; width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;">-</textarea>
</td>
......@@ -282,9 +295,8 @@
<p id="inspectInBrowser"></p>
<hr>
<p style="color: red;"> Warning! Speccy is still in development, so please be wary of (and report) unexpected behaviour.</p>
<h4>Usage:</h4>
<p>http://www.mpe.mpg.de/~tdwelly/speccy/speccy.html?specfile={URL} (substitute URL of a valid speccy file)<br>
<p><blockquote><samp>http://erosita-bhm.mpe.mpg.de/speccy/speccy.html?specfile={URL}</samp></blockquote>&nbsp; (substitute URL of a valid speccy file)<br>
* The cursor (arrow) keys move the template in redshift and normalisation<br>
* To zoom into a region: click and hold the right mouse button at one corner of the region of interest,
then drag the pointer to the opposite corner of the region where you then release the right button
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment