hipscatalog_gen.io.output.finalize_write_tiles
- finalize_write_tiles(out_dir, depth, header_line, ra_col, dec_col, counts, selected, order_desc, allsky_collect=False)[source]
Write one TSV per HEALPix cell and build optional Allsky dataframe.
- The function:
Writes a completeness header line.
Writes a single header line per tile.
Writes rows in the same column order as the header.
Uses atomic rename to avoid partial tiles.
- Parameters:
out_dir (Path) – HiPS root output directory.
depth (int) – HiPS order.
header_line (str) – Header line for tiles.
ra_col (str) – RA column name (unused here but kept for interface stability).
dec_col (str) – DEC column name (unused here but kept for interface stability).
counts (ndarray) – Densmap counts for this depth.
selected (DataFrame) – DataFrame with selected rows for this depth.
order_desc (bool) – Whether scores were sorted in descending order (unused here).
allsky_collect (bool) – If True, return a concatenated Allsky dataframe.
- Returns:
written: Mapping ipix -> number of rows written. allsky_df: DataFrame with all rows (if allsky_collect=True), else None.
- Return type:
Tuple (written, allsky_df) where
- Raises:
OSError – If tile files cannot be written or renamed.