Skip to content

Add magnitude-limited catalog completeness utilities#7

Merged
nikosarcevic merged 10 commits into
mainfrom
feature/lf-catalog-completeness
May 11, 2026
Merged

Add magnitude-limited catalog completeness utilities#7
nikosarcevic merged 10 commits into
mainfrom
feature/lf-catalog-completeness

Conversation

@nikosarcevic
Copy link
Copy Markdown
Contributor

This PR adds utilities for modelling magnitude-limited catalog completeness from luminosity functions.

It introduces functionality to:

  • convert apparent magnitude limits into absolute magnitude limits
  • integrate luminosity functions over observed and missing magnitude ranges
  • compute catalog-completeness and out-of-catalog fractions
  • support both scalar and array redshift inputs
  • validate inputs with clear errors

This is intended to provide the LFKit-side machinery needed for magnitude-limited catalog selection modelling while keeping the implementation science-use-case agnostic.

Changes

  • Adds catalog_completeness photometry utilities.
  • Adds shared typing utilities.
  • Adds validation tests for scalar and array inputs.
  • Adds tests checking completeness and out-of-catalog fractions are bounded between 0 and 1.
  • Adds a fake magnitude-limited demo catalog and generator script.
  • Adds documentation and runnable examples for luminosity-function and catalog-completeness workflows.
  • Updates API docs to expose the new completeness functionality.

Closes #6

  • Scalar and array redshifts work.
  • Apparent magnitude limits can be converted to absolute magnitude limits.
  • LF integrals over observed and missing magnitude ranges are supported.
  • Catalog-completeness and out-of-catalog fractions are returned.
  • Fractions are bounded between 0 and 1.
  • Invalid inputs raise clear errors.
  • Basic tests are included.

Notes

Tabulated/user-supplied luminosity-function arrays are not included in this PR. The current implementation supports analytic/callable LF models, and tabulated LF support can be added later as a separate extension without changing the catalog-completeness interface

@nikosarcevic nikosarcevic merged commit 8503fc8 into main May 11, 2026
3 checks passed
@nikosarcevic nikosarcevic deleted the feature/lf-catalog-completeness branch May 12, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add catalog-completeness utilities

1 participant