diff --git a/js/preprocessor.js b/js/preprocessor.js index 5b21bfb..d87af62 100644 --- a/js/preprocessor.js +++ b/js/preprocessor.js @@ -198,7 +198,7 @@ function matchTemplate(index, template, lambda, intensity, variance, weights, in var r = null; for (var i = 0; i < zs.length; i++) { r = matchTemplateAtRedshift(intensity, variance, weights, template.interpolatedSpec, offsets[i], intensityAreaFinder, templateAreaFinder, zs[i]); - result.res.push({gof: r[0]/Math.pow(r[1],2.5), chi2: r[0], z: zs[i], scale: r[2], weight: r[1]}); + result.res.push({gof: r[0]/Math.pow(r[1],2.5), chi2: r[0], z: parseFloat(zs[i].toFixed(5)), scale: r[2], weight: r[1]}); } return result; } diff --git a/js/views.js b/js/views.js index da9fe16..ec1488d 100644 --- a/js/views.js +++ b/js/views.js @@ -483,7 +483,7 @@ InterfaceManager.prototype.getTemplateData = function () { this.detailedSettings.addData('template', false, this.interface.templateColour, r[0].slice(0), r[1].slice(0)); }; InterfaceManager.prototype.clickSpectralLine= function(id) { - this.matchedComparisonActive = false; + this.disableMatchedComparison(); if (this.detailedSettings.waitingForSpectra) { var currentWavelength = this.spectralLines.getFromID(id).wavelength; var desiredWavelength = this.detailedSettings.getFocusWavelength();