hipscatalog_gen.io.output.write_moc

write_moc(out_dir, moc_order, dens_counts)[source]

Build and write MOC from densmap counts.

Outputs both FITS (Moc.fits) and JSON (Moc.json) representations.

Parameters:
  • out_dir (Path) – HiPS root output directory.

  • moc_order (int) – HEALPix order used for the MOC.

  • dens_counts (ndarray) – Densmap counts at the MOC order.

Raises:

RuntimeError – If MOC construction fails for all attempted mocpy builders.

Return type:

None