Expand description
FITS file reading and data extraction.
This module provides functions for reading HEALPix astronomical data from FITS files. It supports both:
- Dense maps: Complete sky coverage (standard NSIDE² pixels)
- Sparse maps: Partial sky coverage with explicit PIXEL column indexing
§FITS Format Support
- Binary table format (.fits files)
- HEALPix RING or NEST pixel ordering
- Sparse maps with IMPLICIT or EXPLICIT indexing schemes via the INDXSCHM keyword
§Sparse Map Handling
For sparse maps with EXPLICIT indexing, this module automatically expands the data to a full dense array with UNSEEN values for omitted pixels.
Tier 4.2b Optimization: Sparse map column extraction is parallelized via rayon for efficient multi-core processing of large sparse catalogs.
§Examples
ⓘ
use map2fig::read_healpix_column;
let data = read_healpix_column("map.fits", 0);
println!("Loaded {} pixels", data.len());Functions§
- read_
healpix_ column - Read a HEALPix column from a FITS binary table.
- read_
healpix_ column_ cached - Read a HEALPix column with caching support (Tier 5.2.1 optimization)
- read_
healpix_ meta_ cached - Read FITS metadata with caching support This function attempts to use cached metadata to avoid expensive header parsing When MAP2FIG_PROFILE environment variable is set, outputs diagnostic timing info