Selection
Score/value slicing helpers and HEALPix binning used across modes.
Example: compute a histogram and resolve a range for scores:
from hipscatalog_gen.selection import compute_score_histogram_ddf, resolve_value_range
hist, edges, total = compute_score_histogram_ddf(ddf, "__score__", -5, 5, 128)
lo, hi = resolve_value_range(ddf, "__score__", "complete", None, None, 128, compute_score_histogram_ddf, diag_ctx, log_fn, "scores")
Compute cumulative targets per depth and corresponding score edges. |
|
Distribute depth_total across active tiles with optional density bias. |
|
Keep up to k_per_group rows per group, sorted by score then RA/DEC. |
|
Attach __ipix__ for a given depth. |
|
Attach a numeric score column derived from a column or expression. |
|
Generic 1D histogram computation for Dask DataFrames or LSDB catalogs. |
|
Compute a 1D histogram for score-like columns (Dask/LSDB friendly). |
|
Resolve [min, max] for score-like columns with optional histogram peak. |
|
Score-specialized wrapper around select_by_value_slices. |
|
Slice by per-depth value ranges and write tiles. |