Files
aladin-lite/examples/al-adass2022.html
2024-10-11 13:45:04 +02:00

57 lines
2.1 KiB
HTML

<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
let startFov = 1000;
aladin = A.aladin('#aladin-lite-div', {showSettingsControl: true, survey: "P/PanSTARRS/DR1/color-z-zg-g", showReticle: false, projection: "AIT", cooFrame: 'icrs', target: "stephan's quintet", fov: startFov, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: 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"});
aladin.setOverlayImageLayer("CFHT", "CFHT");
aladin.setOverlayImageLayer("Nircam", "Nircam");
aladin.getOverlayImageLayer("CFHT").toggle();
aladin.getOverlayImageLayer("Nircam").toggle();
let fov = startFov;
let rotation = 0;
setInterval(function zoom() {
if (fov > 0.07) {
fov *= 0.997;
rotation += 0.07;
aladin.setViewCenter2NorthPoleAngle(rotation)
aladin.setFoV(fov);
if (fov < 3 && fov > 0.5) {
let opacity = 1.0 - (fov - 0.5)/(3 - 0.5);
aladin.getOverlayImageLayer("CFHT").setOpacity(opacity);
}
if (fov < 0.5 && fov > 0.1) {
let opacity = 1.0 - (fov - 0.1)/(0.5 - 0.1);
aladin.getOverlayImageLayer("Nircam").setOpacity(opacity);
}
}
}, 10);
setInterval(function () {
const t = Date.now() / 1000;
let lambda = Math.sin(t) * 0.5 + 0.5;
})
});
</script>
</body>
</html>