From 186e634a867620c1c5a4f4b6d9ea301d3f647675 Mon Sep 17 00:00:00 2001 From: Matthieu Baumann Date: Mon, 9 Sep 2024 17:23:16 +0200 Subject: [PATCH] rename ImageHiPS in HiPS, factorize Image/HiPS, zoom for trackpad refined --- examples/al-aas225.html | 2 +- examples/al-adass2022.html | 2 +- examples/al-additive-blend.html | 8 +- examples/al-artifact.html | 2 +- examples/al-event-listeners.html | 4 +- examples/al-init-custom-options.html | 2 +- examples/al-mars.html | 6 + examples/al-polyline.html | 4 - examples/al-save-colormap.html | 5 +- examples/al-v2VSv3.html | 3 +- src/core/src/app.rs | 103 +- src/core/src/camera/viewport.rs | 2 +- src/core/src/downloader/request/mod.rs | 2 - src/core/src/downloader/request/tile.rs | 2 +- src/core/src/healpix/cell.rs | 2 +- src/core/src/lib.rs | 13 +- src/core/src/renderable/hips/mod.rs | 204 +--- src/core/src/renderable/moc/graph.rs | 293 ------ src/core/src/renderable/moc/mod.rs | 3 - src/core/src/renderable/moc/mode/edge.rs | 192 ---- src/core/src/renderable/moc/mode/filled.rs | 193 ---- src/core/src/renderable/moc/mode/mod.rs | 2 - src/core/src/renderable/moc/mode/perimeter.rs | 39 - src/core/src/survey/buffer.rs | 23 +- src/core/src/tile_fetcher.rs | 71 +- src/core/src/time.rs | 8 + src/core/src/utils.rs | 36 + src/js/A.js | 23 +- src/js/Aladin.js | 170 ++-- src/js/ColorCfg.js | 76 +- src/js/DefaultHiPSList.js | 69 +- src/js/HiPS.js | 873 +++++++++++++++++ src/js/HiPSCache.js | 2 +- src/js/HiPSProperties.js | 16 +- src/js/Image.js | 607 ++++++------ src/js/ImageHiPS.js | 878 ------------------ src/js/View.js | 84 +- src/js/gui/Box/HiPSBrowserBox.js | 12 +- src/js/gui/Box/StackBox.js | 2 +- src/js/gui/Box/StatusBarBox.js | 4 +- src/js/gui/Widgets/Tab.js | 12 +- src/js/gui/Widgets/Widget.js | 5 +- 42 files changed, 1585 insertions(+), 2474 deletions(-) delete mode 100644 src/core/src/renderable/moc/graph.rs delete mode 100644 src/core/src/renderable/moc/mode/edge.rs delete mode 100644 src/core/src/renderable/moc/mode/filled.rs delete mode 100644 src/core/src/renderable/moc/mode/mod.rs delete mode 100644 src/core/src/renderable/moc/mode/perimeter.rs create mode 100644 src/js/HiPS.js delete mode 100644 src/js/ImageHiPS.js diff --git a/examples/al-aas225.html b/examples/al-aas225.html index 5d6907a03..df6993b77 100644 --- a/examples/al-aas225.html +++ b/examples/al-aas225.html @@ -9,7 +9,7 @@ let aladin; A.init.then(() => { aladin = A.aladin('#aladin-lite-div', { fov:0.15, target: 'Arp 240', showReticle: false, fullScreen: true }); - aladin.setBaseImageLayer(aladin.newImageSurvey('P/SDSS9/g', {colormap: "rainbow", stretch: "Linear"})); + aladin.setBaseImageLayer(aladin.newImageSurvey('P/SDSS9/g', {colormap: "eosb", stretch: "linear"})); var simbad = A.catalog({name: 'Simbad', sourceSize: 16, color: '#4050F0'}); aladin.addCatalog(simbad); diff --git a/examples/al-adass2022.html b/examples/al-adass2022.html index 48955d59a..47ee230bd 100644 --- a/examples/al-adass2022.html +++ b/examples/al-adass2022.html @@ -10,7 +10,7 @@ import A from '../src/js/A.js'; let aladin; A.init.then(() => { - aladin = A.aladin('#aladin-lite-div', {survey: ["P/PanSTARRS/DR1/color-i-r-g"], showReticle: false, projection: "AIT", cooFrame: 'icrs', target: "stephan's quintet", fov: 1000, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGrid: true, showCooGridControl: false}); + aladin = A.aladin('#aladin-lite-div', {survey: "P/PanSTARRS/DR1/color-z-zg-g", showReticle: false, projection: "AIT", cooFrame: 'icrs', target: "stephan's quintet", fov: 1000, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGrid: true, showCooGridControl: false}); const chft = aladin.createImageSurvey('CFHT', "CFHT deep view of NGC7331 and Stephan's quintet u+g+r", "https://cds.unistra.fr/~derriere/PR_HiPS/2022_Duc/", null, null, {imgFormat: 'png'}); const nircamJWST = aladin.createImageSurvey('Nircam', "Stephans Quintet NIRCam+MIRI", "http://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_NIRCam+MIRI/", null, null, {imgFormat: 'png', colormap: "viridis"}); diff --git a/examples/al-additive-blend.html b/examples/al-additive-blend.html index 38d19dfed..48c78f8c3 100644 --- a/examples/al-additive-blend.html +++ b/examples/al-additive-blend.html @@ -14,11 +14,11 @@ hscGreenSurvey.setColormap("green", { stretch: "asinh" }); hscGreenSurvey.setCuts(-0.2186, 5.30322); - const HSCRedSurvey = aladin.newImageSurvey('CDS/P/HSC/DR2/deep/r', {imgFormat: 'fits', colormap: "red", minCut: 0.34228, maxCut: 2.75785, additive: true, stretch: "asinh"}); - const HSCBlueSurvey = aladin.newImageSurvey('CDS/P/HSC/DR2/deep/z', {imgFormat: 'fits', colormap: "blue", minCut: -0.01218, maxCut: 2.27397, additive: true, stretch: "asinh"}); + const HSCRedSurvey = aladin.newImageSurvey('P/HSC/DR2/deep/r', {imgFormat: 'fits', colormap: "red", minCut: 0.34228, maxCut: 2.75785, additive: true, stretch: "asinh"}); + const HSCBlueSurvey = aladin.newImageSurvey('P/HSC/DR2/deep/z', {imgFormat: 'fits', colormap: "blue", minCut: -0.01218, maxCut: 2.27397, additive: true, stretch: "asinh"}); - aladin.setOverlayImageLayer('CDS/P/HSC/DR2/deep/r', 'hsc red layer'); - aladin.setOverlayImageLayer('CDS/P/HSC/DR2/deep/z', 'hsc blue layer'); + aladin.setOverlayImageLayer('P/HSC/DR2/deep/r', 'hsc red layer'); + aladin.setOverlayImageLayer('P/HSC/DR2/deep/z', 'hsc blue layer'); }); diff --git a/examples/al-artifact.html b/examples/al-artifact.html index 65662fdbd..5f94b5135 100644 --- a/examples/al-artifact.html +++ b/examples/al-artifact.html @@ -4,7 +4,7 @@ -
+