Files
aladin-lite/examples/al-displayFITS.html
2025-03-24 17:46:15 +01:00

33 lines
852 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: 'red'});
aladin.displayFITS(
//'https://fits.gsfc.nasa.gov/samples/FOCx38i0101t_c0f.fits', // url of the fits file
'data/fits/panstarrs-g-m61.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>