binny.tomography.predefined module#
Tomography from externally supplied redshift distributions.
- binny.tomography.predefined.build_predefined_tomography(z: Any, bins: Mapping[int, Any], *, nz: Any | None = None, normalize_bins: bool = False, norm_method: Literal['trapezoid', 'simpson'] = 'trapezoid', include_metadata: bool = False) Tomography#
Build tomography directly from supplied bin distributions.
The parent n(z) is the sum of the raw bins unless explicitly provided. Optional normalization affects the returned bins, not the parent.
- binny.tomography.predefined.load_predefined_bins(path: str | Path, *, z_col: int | str = 'z', bin_cols: Mapping[int, int | str] | None = None) tuple[NDArray[float64], dict[int, NDArray[float64]]]#
Load predefined bins from a text file.
Supports named columns or zero-based integer column positions. Named columns matching
bin_<integer>are detected automatically.