Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Partly updated 5Updated 7/2019 using Aladin prototype v10.1 / based on v10.128 (12/5/2019) and TOPCAT v4.6-3 on MacOS


This includes mapping examples in TOPCAT and Aladin.


Planetary HiPS generation in Aladin

HiPS (Hierarchical progressive survey) are associations of healpix maps at different scales. They provide efficient multiresolution scaling on the fly in Aladin.


(Warning: this tutorial uses undocumented Hipsgen parameter)
P.Fernique - 2nd of July 2019 -

1) You need a cartesian map in JPEG, PNG format covering the whole body (or sky)
   Rq: if you have it in TIFF see 4
2) You need to generate a World Coordinate System (WCS) solution for you map.
   It is a small ASCII file with the same name and the .hhh extension containing the
   WCS solution of your image:
ex: Cartesian hhh file content for a 2880x1440 map
NAXIS1  = 2880          // ImageWidth
NAXIS2  = 1440          // ImageHeight
CRPIX1  = 1440          // ImageWidth/2          => central pixel x coord
CRPIX2  = 720           // ImageHeight/2         => central pixel y coord
CRVAL1  = -0.0625       // -(360/imageWidth)/2   => longitude of the central pixel
CRVAL2  = -0.0625       // -(180/imageHeight)/2  => latitude of the central pixel
CD1_1   = 0.125         //  360/imageWidth       => pixel resolution
CD1_2   = 0
CD2_1   = 0
CD2_2   = 0.125         //  180/ImageHeight       => pixel resolution

   a) you can do that manually via any ASCII editor
   b) Or programmatically thanks to Hipsgen.jar itself. In this last case,
   just launch this kind of command:  
   java -jar Hipsgen.jar -hhh="path/FileName widthxheight"
   ex: java -jar Hipsgen.jar -hhh="path/Titan.jpg 2880x1440"
   Note: if your longitude origin is not localized at the central pixel line of your map, you can add its x coordinate as a third parameter (ex: java -jar Hipsgen.jar -hhh "path/Titan.jpg 2880x1440 0")  
3) After that you can generate your HiPS by this kind of command
    java -jar Hipsgen.jar in=path out=MyHips id="YourAUTH/P/Titan" color=jpg
Rq: you can also do steps 2 and 3 in one unique Hipsgen command
java -jar Hipsgen.jar -hhh="path/Titan.jpg 2880x1440" in=path out=MyHips id="YourAUTH/P/Titan" color=jpg
4) If your original image is really big, and/or in TIFF format, it is preferable to convert and to split it in a collection of small JPEG subimages before launching Hipsgen process. ImageMagick toolkit (free on Linux) does that magically thanks to this command:
convert srcImage.tif -crop widthCellxheightCell +repage TargetDir/GenericName.jpg
It is better to have subimages with the same size (one divisor factor of the source image)
ex :
convert Lunar_LRO_LROC-WAC_Mosaic_global_100m_June2013.tif -crop 10112x10112 +repage SplitImg/Moon.jpg

And thus, launch Hipsgen.jar with -hhh parameter with one additional parameter as size of subimages
java -jar Hipsgen.jar -hhh="SplitImg/Moon.jpg 92160x40448 10112x10112"

or in one Hipsgen command like this:
java -jar Hipsgen.jar hhh="SplitImg/Moon.jpg 92160x40448 10112x10112" in="SplitImg" creator_did="XXX/P/Moon/LROC-WA-GLD100-118m" -f color=jpg

MOC use case in Aladin

(updated May 2019)

MOC (Multi-Order Coverages) 5) in order to get the longitude direction right in Aladin, you may have to edit the generated index.html and change the following line :

aladin.setImageSurvey(aladin.createImageSurvey('2019-0712-1456', '2019-0712-1456', hipsDir, 'equatorial', 3, {imgFormat: 'png'}));
aladin.setImageSurvey(aladin.createImageSurvey('2019-0712-1456', '2019-0712-1456', hipsDir, 'equatorial', 3, {imgFormat: 'png' ,longitudeReversed: true}));

You can alternatively set hips_frame to planet name (will change coord.sys). In Aladin Desktop you can also set properties to .longitude = ascending

MOC use case in Aladin

(updated May 2019)

MOC (Multi-Order Coverages) are footprints defined in terms of a healpix cells list mixing various resolutions. They provide immediate location information e.g. about intersections, and can accommodate footprints of arbitrary complexity (hollowed, non-connex, etc…). There is no explicit contour associated, so the usage is different from the s_region parameter.

  •  Should also retain info about original file coverages, for callback purpose .- TBC

- Load previous Mars MOLA HiPS in Aladin

- Select two large craters in Mars Craters service from VESPA client

- send as s_region from VESPA client (to Aladin) — (s_region was then provided in this service with W longitudes, so this projected correctly)

- select them in Aladin with pointer

- Generate common MOC for these 2 craters (Coverage > Generate a MOC based on… > selected drawing objects)

- You can save it from File > Export Planes (save preferably as fits for reuse)

This is straightforward and very quick.
This is not a direct alternative to s_region however: the result is a list of healpix cells which is much larger than a contour, and can't be included in a table. But we can either have precomputed MOC stored somewhere (for complete datasets? Especially with time direction added), or compute them on the fly when required.

• Next step: test intersections with something else - see example in the next pages