hipscatalog_gen.selection.compute_histogram_ddf

compute_histogram_ddf(ddf_like, value_col, value_min, value_max, nbins, *, keep_invalid=False, sentinel=None)[source]

Generic 1D histogram computation for Dask DataFrames or LSDB catalogs.

Parameters:
  • ddf_like (Any) – Dask-like collection or LSDB catalog with the target column.

  • value_col (str) – Column name to histogram.

  • value_min (float) – Lower bound (inclusive).

  • value_max (float) – Upper bound (inclusive).

  • nbins (int) – Number of bins.

  • keep_invalid (bool) – When True, replace NaN/Inf with sentinel instead of dropping.

  • sentinel (float | None) – Sentinel value for invalid entries (used only when keep_invalid is True).

Returns:

  • hist: numpy array with bin counts.

  • edges: numpy array with bin edges.

  • n_total: total number of rows inspected (including invalid rows).

Return type:

Tuple of (hist, edges, n_total) where