Healpyxel
  • Home
  • Quickstart
  • Source Code
  • Report a Bug
  1. API Reference
  2. HEALPix Finalize
  • Start
  • Examples
    • Quickstart
    • Visualization
    • Visualization : Gaussian PSF - WIP!
    • Accumulation - WIP!
    • Streaming - WIP!
  • API Reference
    • Package Structure
    • HEALPix Sidecar
    • HEALPix Aggregate
    • HEALPix Accumulator
    • HEALPix Finalize
    • Generate HEALPix sidecar
    • Optional Dependencies
    • Geospatial

On this page

  • finalize_statistics
  • densify_healpix_map
  • export_to_geotiff
  • main
  • Usage Example
  • Report an issue

Other Formats

  • CommonMark
  1. API Reference
  2. HEALPix Finalize

HEALPix Finalize


finalize_statistics

 finalize_statistics
                      (state:Dict[int,healpyxel.accumulator.CellAccumulato
                      r], percentiles:Optional[List[float]]=None,
                      min_count:int=1)

*Convert accumulator state to final statistics DataFrame.

Args: state: Accumulator state dictionary {healpix_id: CellAccumulator} percentiles: List of percentiles to compute (e.g., [25, 50, 75]) min_count: Minimum observations required per cell (cells below this are NaN)

Returns: DataFrame indexed by healpix_id with statistics columns: - {col}_n: observation count - {col}_mean: mean value - {col}_std: standard deviation - {col}_min: minimum value - {col}_max: maximum value - {col}_p{N}: percentile (if T-Digest available)*


densify_healpix_map

 densify_healpix_map (sparse_df:pandas.core.frame.DataFrame, nside:int,
                      fill_value:float=nan)

*Create a complete HEALPix grid by filling empty cells with fill_value.

Args: sparse_df: DataFrame with healpix_id index (sparse) nside: HEALPix nside parameter fill_value: Value for empty cells (default: NaN)

Returns: Dense DataFrame with all 12*nside**2 cells*


export_to_geotiff

 export_to_geotiff (df:pandas.core.frame.DataFrame, column:str,
                    output_path:pathlib.Path, nside:int,
                    crs:str='IAU:19900')

*Export a column to GeoTIFF format (requires rasterio and healpy).

Note: This creates an equirectangular projection from HEALPix data.*

Type Default Details
df DataFrame
column str
output_path Path
nside int
crs str IAU:19900 Mercury IAU CRS

main

 main (argv=None)

Usage Example

See the main() function for CLI usage, or import functions directly for programmatic use.

  • Report an issue