Commit b5aa809f authored by Caillat Michel's avatar Caillat Michel
Browse files

Code cleanup and improvements in the display of contours measurements

parent 17f1de66
......@@ -345,7 +345,7 @@ function SliceViewer ( relFITSFilePath, width, height, RADECRangeInDegrees, FITS
var pixelAtPosition = ctx.getImageData(olc[0], height - olc[1], 1, 1).data;
if ( pixelAtPosition ) {
var data_steps_index = pixelAtPosition.slice(0,3).join('_');
result = 'RA='+_raLabelFormatter.format(olc[0])+' DEC='+_decLabelFormatter.format(olc[1])+' - Flux density : '+_data_steps_1[data_steps_index].toExponential(4)+' Jy/beam';
result = 'iRA='+Math.round(olc[0])+' iDEC='+ Math.round(olc[1]) + ' RA='+_raLabelFormatter.format(olc[0])+' DEC='+_decLabelFormatter.format(olc[1])+' - Flux density : '+_data_steps_1[data_steps_index].toExponential(4)+' Jy/beam';
}
else {
result = "???";
......@@ -355,7 +355,7 @@ function SliceViewer ( relFITSFilePath, width, height, RADECRangeInDegrees, FITS
this.reset = function() {
_map_1.getView().setCenter(ol.extent.getCenter(_extent));
_map_1.getView().setResolution(_width / 512);
_map_1.getView().setResolution(1);
}
this.getFluxDensity = function (pixelCoordinate) {
......@@ -403,7 +403,8 @@ function SliceViewer ( relFITSFilePath, width, height, RADECRangeInDegrees, FITS
view: new ol.View({
projection: _projection_1,
center: ol.extent.getCenter(_extent),
resolution: hidden_canvas_1.width / 512
resolution : 1
//resolution: hidden_canvas_1.width / 512
})
<%if(useSAMP){%>
,
......
......@@ -90,7 +90,7 @@ class ContoursViewer {
}
feature.setStyle(this.highlightStyle);
this.box(feature);
this.grid(feature);
//this.grid(feature);
this.lastSelectedContour = feature;
console.log("highlight : exiting");
}
......@@ -128,7 +128,9 @@ class ContoursViewer {
this.clear();
var features = new Array();
yAFITSContours.forEach((contour) => {
features.push(new ol.Feature( { geometry : new ol.geom.LineString(contour["coordinates"]),
let coordinates = contour["coordinates"];
coordinates.push(coordinates[0]);
features.push(new ol.Feature( { geometry : new ol.geom.LineString(coordinates),
properties : contour["properties"]}))});
console.log("Number of features " + features.length);
this.source.addFeatures(features);
......
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