Next Previous Up Contents
Next: tskymatch2: Crossmatches 2 tables on sky position
Up: tskymap: Calculates sky density maps
Previous: Usage

### B.46.2 Examples

Here are some examples of using `tskymap`:

    stilts tskymap in=iras_psc.fits lon=RA lat=DEC out=iras_map.csv

  Writes a table representing a density map of IRAS point sources on the sky. The output is a 2-column CSV file: the first column is pixel index, and the second column is the number of rows in the input table whose (RA,DEC) positions fall within that pixel. The default tiling is used (currently level 5 HEALPix, which has 12288 pixels).

    stilts tskymap in=iras_psc.fits lon=RA lat=DEC tiling=hpx6
                   ocmd='healpixmeta -csys C'
                   ofmt=fits-healpix out=iras_map.fits

  This does a similar job to the previous example, but explicitly requests HEALPix level 6 tiling, and outputs to a FITS variant that other applications such as Aladin understand as containing a HEALPix map. The output format is specified with `ofmt=fits-healpix`, which writes a FITS file following the HEALPix-FITS convention. An additional filter "`healpixmeta -csys C`" is also supplied here: this indicates that the HEALPix pixels in the output file are to be considered in the Celestial (=equatorial) sky system. If this is not done, Aladin assumes the coordinate system to be Galactic and will align the results incorrectly on the sky.

    stilts tskymap in=2mpz.fits icmd='addskycoords fk5 galactic ra dec glon glat'
                   lon=glon lat=glat tiling=hpx6
                   cols='jCorr-hCorr hCorr-kCorr jCorr-kCorr' combine=median
                   count=false
                   complete=true
                   out=2mpzColors.fits

  Writes a table with columns giving median J-H, H-K and J-K colours, but no source count column, from the sources in the file 2mpz.fits, aggregated over each tile of a level 6 HEALPix grid. The input table has equatorial coordinates, but the `addskycoords` filter has been used so that the grid is laid on the sky with galactic coordinates. Setting `complete=true` guarantees that a row is written to the output file for every sky pixel, including empty ones. Note in this case that the output format is not specified explicitly, so it will be inferred from the filename, to be "normal" FITS, rather than `healpix-fits`. The output data will still be present, but external applications may not automatically identify the pixel column.

    stilts tskymap in=tgas_source.fits tiling=hpx7 lon=l lat=b count=false
                   cols=phot_g_n_obs combine=sum-per-unit perunit=arcmin2
                   ofmt=fits-healpix ocmd='healpixmeta -csys G'
                   out=obs-density.fits

  Calculates a level-7 HEALPix map where each cell contains the local number of observations per square arcminute, as determined by summing all the `phot_g_n_obs` values from the input table that fall into each tile and applying a suitable scaling factor. The grid coordinate system is explicitly labelled as Galactic.

    stilts tskymap in=gaia_source.colfits tiling=hpx8 lon=l lat=b count=true
                   cols='bp_rp;mean phot_bp_mean_flux;sum phot_rp_mean_flux;sum'
                   out=gaia-stats.fits

  Simultaneously calculates the mean value of the `bp_rp` column and the summed values of the `phot_bp_mean_flux` and `phot_rp_mean_flux` columns for each HEALPix level 8 tile, as well as the source density.

    stilts tskymap in=gums_lmc.fits lon=alpha lat=delta
                   tiling=hpx14 complete=false omode=count

  This prepares a source count map at healpix level 14 (3 billion pixels) from the given input table. Since `complete=false`, only rows for non-empty pixels are included in the output table. Then, since the output mode is `count`, these rows are just counted, discarding the pixels themselves, giving the number of level-14 healpix pixels touched by the sources in this input file. Note this is not necessarily the most efficient way to calculate coverage information.

Next Previous Up Contents
Next: tskymatch2: Crossmatches 2 tables on sky position
Up: tskymap: Calculates sky density maps
Previous: Usage

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk