Files
aladin-lite/examples/al-displayFITS.html
2025-09-09 17:09:55 +02:00

34 lines
994 B
HTML

<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {cooFrame: "icrs", log: false, backgroundColor: 'rgba(0, 0, 0, 255)'});
aladin.displayFITS(
//'https://fits.gsfc.nasa.gov/samples/FOCx38i0101t_c0f.fits', // url of the fits file
'data/fits/panstarrs-g-m61.fits',
//'https://almascience.eso.org/dataPortal/member.uid___A001_X88f_X297.calibrated_final_cont_Sgr_B1off.pbcor.fits',
{
name: 'm61',
colormap: 'viridis'
}, // no optional params
(ra, dec, fov, _) => {
// ra, dec and fov are centered around the fits image
aladin.gotoRaDec(ra, dec);
aladin.setFoV(fov);
},
);
});
</script>
</body>
</html>