Commit fe462e14 authored by lerma artemix's avatar lerma artemix
Browse files

Fixes DL value calculation

parent e4fee36f
......@@ -522,7 +522,7 @@ class SourceTable {
row.appendChild(this._getDataCell("N/A"));
}
let dl = parseFloat(distances["distance_Mpc"].toFixed(3));
let dl = parseFloat(distances["luminosity_distance_Mpc"].toFixed(3));
if(data["z"] < 0.1){
dl = null;
}
......
......@@ -58,7 +58,7 @@ DOMAccessor.getVelocityField().addEventListener("input", function(event) {
const quantities = computeDistanceQuantities(spectroUI.getHubbleCst(),
spectroUI.getMassDensity(),
z);
spectroUI.setDl(quantities["distance_Mpc"]);
spectroUI.setDl(quantities["luminosity_distance_Mpc"]);
}catch(e){
console.log(e);
alert(e);
......@@ -89,7 +89,7 @@ DOMAccessor.getRedshiftField().addEventListener("input", function() {
const quantities = computeDistanceQuantities(spectroUI.getHubbleCst(),
spectroUI.getMassDensity(),
z);
spectroUI.setDl(quantities["distance_Mpc"]);
spectroUI.setDl(quantities["luminosity_distance_Mpc"]);
}catch(e){
alert(e);
return;
......@@ -312,11 +312,8 @@ $(document).ready(function() {
"sessionID": 0
}).done(function(resp) {
console.log('$.post("", {"method": "RADECRangeInDegrees", "relFITSFilePath": dataPaths.relFITSFilePath}).done(function (resp) { : entering');
console.log("TEST A");
sourceTable = new SourceTable('ned-data', 'ned-modal-title', spectroUI);
console.log("TEST B");
spectrumViewer = getSingleSpectrum1D(spectroUI, sourceTable);
console.log("TEST C");
console.log('$.post("", {"method": "RADECRangeInDegrees", "relFITSFilePath": dataPaths.relFITSFilePath}).done(function(resp) {: exiting');
});
console.log("$( document ).ready(function() {: exiting");
......
......@@ -64,7 +64,7 @@ DOMAccessor.getVelocityField().addEventListener("input", function(event) {
const quantities = computeDistanceQuantities(spectroUI.getHubbleCst(),
spectroUI.getMassDensity(),
z);
spectroUI.setDl(quantities["distance_Mpc"]);
spectroUI.setDl(quantities["luminosity_distance_Mpc"]);
}catch(e){
console.log(e);
alert(e);
......@@ -95,7 +95,7 @@ DOMAccessor.getRedshiftField().addEventListener("input", function() {
const quantities = computeDistanceQuantities(spectroUI.getHubbleCst(),
spectroUI.getMassDensity(),
z);
spectroUI.setDl(quantities["distance_Mpc"]);
spectroUI.setDl(quantities["luminosity_distance_Mpc"]);
}catch(e){
alert(e);
return;
......
Supports Markdown
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