hats.io.skymap#
Functions#
|
Read the object spatial distribution information from a healpix skymap FITS file. |
|
Write the object spatial distribution information to a healpix SKYMAP FITS file. |
Module Contents#
- read_skymap(catalog, order)[source]#
Read the object spatial distribution information from a healpix skymap FITS file.
- Parameters:
- catalogCatalog
Catalog object corresponding to an on-disk catalog.
- orderint
healpix order to read the skymap at. If None, the order of the default skymap will be used. We will try to load from alternative skymap orders, where appropriate.
- Returns:
- np.ndarray
one-dimensional numpy array of long integers where the value at each index corresponds to the number of objects found at the healpix pixel.
- write_skymap(histogram: numpy.ndarray, catalog_dir: str | pathlib.Path | upath.UPath, orders: list | int | None = None)[source]#
Write the object spatial distribution information to a healpix SKYMAP FITS file.
- Parameters:
- histogramnp.ndarray
one-dimensional numpy array of long integers where the value at each index corresponds to the number of objects found at the healpix pixel.
- catalog_dirstr | Path | UPath
base directory of the catalog in which to write the skymap file(s)
- orderslist | int | None
list of orders to write additional skymap files. if provided and not empty, we will write a skymap.K.fits for each integer K in the list. if empty or None, we will not write additional files.