hipscatalog_gen.mag_global.pipeline.normalize_mag_global

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

Add __mag__ column and compute selection window without mutating cfg.

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

  • 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_mag, MagGlobalParams).

Raises:
  • ValueError – When magnitude/flux configuration is invalid or missing.

  • KeyError – If configured magnitude/flux columns are not present.

Return type:

tuple[Any, MagGlobalParams]