hipscatalog_gen.score_global package

Submodules

hipscatalog_gen.score_global.pipeline module

Pipeline steps for score-based selection across all depths.

normalize_score_global(ddf, cfg, diag_ctx, log_fn, persist_ddfs=False, avoid_computes=True)[source]

Add __score__ column and compute score window without mutating cfg.

Parameters:
  • ddf (Any) – Dask-like collection with score columns or expressions.

  • cfg (Any) – Parsed configuration object.

  • diag_ctx – Diagnostics context factory.

  • log_fn – Logging callback.

  • persist_ddfs (bool) – Whether to persist intermediate DDFs.

  • avoid_computes (bool) – Whether to avoid explicit compute() calls when possible.

Returns:

Tuple (ddf_with_score, ScoreGlobalParams).

Raises:

ValueError – If the score expression/configuration is invalid.

Return type:

tuple[Any, ScoreGlobalParams]

prepare_score_global(ddf, cfg, diag_ctx, log_fn, params, persist_ddfs=False, avoid_computes=True)[source]

Restrict to a score window using pre-computed params.

Parameters:
  • ddf (Any) – Dask-like collection with __score__ already attached.

  • cfg (Any) – Parsed configuration object.

  • diag_ctx – Diagnostics context factory.

  • log_fn – Logging callback.

  • params (ScoreGlobalParams) – Resolved score parameters.

  • persist_ddfs (bool) – Whether to persist the filtered DDF.

  • avoid_computes (bool) – Whether to avoid explicit compute() calls when possible.

Returns:

Dask-like collection filtered to the score window.

run_score_global_selection(remainder_ddf, densmaps, keep_cols, ra_col, dec_col, cfg, out_dir, diag_ctx, log_fn, avoid_computes=True, params=None)[source]

Execute the score_global selection path and write tiles.

Parameters:
  • remainder_ddf (Any) – Dask-like collection after pre-filtering.

  • densmaps (Dict[int, ndarray]) – Mapping depth -> densmap counts.

  • keep_cols (List[str]) – Ordered list of columns to keep in tiles.

  • ra_col (str) – Name of the RA column.

  • dec_col (str) – Name of the DEC column.

  • cfg (Any) – Parsed configuration object.

  • out_dir – Output directory for HiPS tiles.

  • diag_ctx – Diagnostics context factory.

  • log_fn – Logging callback.

  • avoid_computes (bool) – Whether to avoid explicit compute() calls when possible.

  • params (ScoreGlobalParams | None) – Optional resolved score parameters (auto-resolved when None).

Return type:

dict[str, dict[str, int]]

Module contents

Score-driven selection mode.

normalize_score_global(ddf, cfg, diag_ctx, log_fn, persist_ddfs=False, avoid_computes=True)[source]

Add __score__ column and compute score window without mutating cfg.

Parameters:
  • ddf (Any) – Dask-like collection with score columns or expressions.

  • cfg (Any) – Parsed configuration object.

  • diag_ctx – Diagnostics context factory.

  • log_fn – Logging callback.

  • persist_ddfs (bool) – Whether to persist intermediate DDFs.

  • avoid_computes (bool) – Whether to avoid explicit compute() calls when possible.

Returns:

Tuple (ddf_with_score, ScoreGlobalParams).

Raises:

ValueError – If the score expression/configuration is invalid.

Return type:

tuple[Any, ScoreGlobalParams]

prepare_score_global(ddf, cfg, diag_ctx, log_fn, params, persist_ddfs=False, avoid_computes=True)[source]

Restrict to a score window using pre-computed params.

Parameters:
  • ddf (Any) – Dask-like collection with __score__ already attached.

  • cfg (Any) – Parsed configuration object.

  • diag_ctx – Diagnostics context factory.

  • log_fn – Logging callback.

  • params (ScoreGlobalParams) – Resolved score parameters.

  • persist_ddfs (bool) – Whether to persist the filtered DDF.

  • avoid_computes (bool) – Whether to avoid explicit compute() calls when possible.

Returns:

Dask-like collection filtered to the score window.

run_score_global_selection(remainder_ddf, densmaps, keep_cols, ra_col, dec_col, cfg, out_dir, diag_ctx, log_fn, avoid_computes=True, params=None)[source]

Execute the score_global selection path and write tiles.

Parameters:
  • remainder_ddf (Any) – Dask-like collection after pre-filtering.

  • densmaps (Dict[int, ndarray]) – Mapping depth -> densmap counts.

  • keep_cols (List[str]) – Ordered list of columns to keep in tiles.

  • ra_col (str) – Name of the RA column.

  • dec_col (str) – Name of the DEC column.

  • cfg (Any) – Parsed configuration object.

  • out_dir – Output directory for HiPS tiles.

  • diag_ctx – Diagnostics context factory.

  • log_fn – Logging callback.

  • avoid_computes (bool) – Whether to avoid explicit compute() calls when possible.

  • params (ScoreGlobalParams | None) – Optional resolved score parameters (auto-resolved when None).

Return type:

dict[str, dict[str, int]]