py-lfkit 0.2.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/.gitignore +16 -10
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/CITATION.cff +2 -2
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/PKG-INFO +1 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/about/index.rst +4 -4
- py_lfkit-0.4.0/docs/about/photometry_overview.rst +421 -0
- py_lfkit-0.4.0/docs/api/index.rst +8 -0
- py_lfkit-0.4.0/docs/citation.rst +46 -0
- py_lfkit-0.4.0/docs/contributing.rst +128 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/examples/catalog_completeness.rst +49 -34
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/examples/conditional_luminosity_function.rst +271 -186
- py_lfkit-0.4.0/docs/examples/index.rst +624 -0
- py_lfkit-0.4.0/docs/examples/lf_models/composite_models.rst +171 -0
- py_lfkit-0.4.0/docs/examples/lf_models/gaussian_models.rst +130 -0
- py_lfkit-0.4.0/docs/examples/lf_models/index.rst +33 -0
- {py_lfkit-0.2.0/docs/examples → py_lfkit-0.4.0/docs/examples/lf_models}/model_registry.rst +1 -1
- py_lfkit-0.4.0/docs/examples/lf_models/power_law_models.rst +205 -0
- py_lfkit-0.4.0/docs/examples/lf_models/schechter_models.rst +264 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/examples/magnitude_integrals.rst +134 -46
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/examples/magnitudes_and_luminosities.rst +13 -8
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/examples/redshift_density.rst +13 -11
- py_lfkit-0.4.0/docs/index.rst +61 -0
- py_lfkit-0.4.0/docs/installation.rst +47 -0
- py_lfkit-0.4.0/docs/license.rst +11 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/pyproject.toml +15 -27
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/_version.py +3 -3
- py_lfkit-0.4.0/src/lfkit/api/_namespaces.py +182 -0
- py_lfkit-0.4.0/src/lfkit/api/conditional_luminosity_function.py +191 -0
- py_lfkit-0.4.0/src/lfkit/api/luminosity_function.py +422 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/cosmo/cosmology.py +1 -1
- py_lfkit-0.4.0/src/lfkit/luminosity_functions/_discovery.py +40 -0
- py_lfkit-0.2.0/src/lfkit/photometry/catalog_completeness.py → py_lfkit-0.4.0/src/lfkit/luminosity_functions/completeness.py +14 -14
- py_lfkit-0.2.0/src/lfkit/photometry/conditional_lf_integrals.py → py_lfkit-0.4.0/src/lfkit/luminosity_functions/conditional_integrals.py +8 -8
- py_lfkit-0.4.0/src/lfkit/luminosity_functions/conditional_models.py +114 -0
- py_lfkit-0.2.0/src/lfkit/photometry/lf_integrals.py → py_lfkit-0.4.0/src/lfkit/luminosity_functions/integrals.py +391 -36
- py_lfkit-0.4.0/src/lfkit/luminosity_functions/models/composite.py +178 -0
- py_lfkit-0.4.0/src/lfkit/luminosity_functions/models/gamma.py +145 -0
- py_lfkit-0.4.0/src/lfkit/luminosity_functions/models/gaussian.py +167 -0
- py_lfkit-0.4.0/src/lfkit/luminosity_functions/models/modifiers.py +72 -0
- py_lfkit-0.4.0/src/lfkit/luminosity_functions/models/non_parametric.py +718 -0
- py_lfkit-0.4.0/src/lfkit/luminosity_functions/models/power_law.py +242 -0
- py_lfkit-0.4.0/src/lfkit/luminosity_functions/models/saunders.py +230 -0
- py_lfkit-0.2.0/src/lfkit/photometry/luminosity_function.py → py_lfkit-0.4.0/src/lfkit/luminosity_functions/models/schechter.py +136 -46
- py_lfkit-0.2.0/src/lfkit/photometry/lf_parameter_models.py → py_lfkit-0.4.0/src/lfkit/luminosity_functions/parameter_models.py +82 -52
- py_lfkit-0.2.0/src/lfkit/photometry/lf_redshift_density.py → py_lfkit-0.4.0/src/lfkit/luminosity_functions/redshift_density.py +46 -15
- py_lfkit-0.4.0/src/lfkit/luminosity_functions/registry.py +303 -0
- py_lfkit-0.4.0/src/lfkit/photometry/__init__.py +0 -0
- py_lfkit-0.4.0/src/lfkit/photometry/luminosities.py +182 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/photometry/magnitudes.py +8 -0
- py_lfkit-0.4.0/src/lfkit/utils/__init__.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/utils/integrators.py +14 -1
- py_lfkit-0.4.0/src/lfkit/utils/validators.py +241 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/py_lfkit.egg-info/PKG-INFO +1 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/py_lfkit.egg-info/SOURCES.txt +50 -62
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/benchmarks/test_cacciato_clf_reference.py +23 -8
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/benchmarks/test_cacciato_hod_reference.py +22 -10
- py_lfkit-0.4.0/tests/test_api_conditional_luminosity_function.py +230 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_api_corrections.py +1 -1
- py_lfkit-0.4.0/tests/test_api_luminosity_function.py +900 -0
- py_lfkit-0.4.0/tests/test_api_namespaces.py +282 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_corrections_color_anchors.py +1 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_corrections_filters.py +1 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_corrections_kcorrect_backend.py +1 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_corrections_kcorrect_from_color.py +1 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_corrections_kcorrrect_grids.py +1 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_corrections_poggianti1997.py +1 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_corrections_responses.py +1 -1
- py_lfkit-0.4.0/tests/test_cosmo_cosmology.py +182 -0
- py_lfkit-0.2.0/tests/test_photometry_completeness.py → py_lfkit-0.4.0/tests/test_lumfuncs_completeness.py +18 -7
- py_lfkit-0.2.0/tests/test_photometry_completeness_fake_catalog.py → py_lfkit-0.4.0/tests/test_lumfuncs_completeness_fake_catalog.py +52 -9
- py_lfkit-0.2.0/tests/test_photometry_conditional_lf_integrals.py → py_lfkit-0.4.0/tests/test_lumfuncs_conditional_integrals.py +89 -2
- py_lfkit-0.2.0/tests/test_photometry_conditional_lf_models.py → py_lfkit-0.4.0/tests/test_lumfuncs_conditional_models.py +152 -177
- py_lfkit-0.4.0/tests/test_lumfuncs_discovery.py +220 -0
- py_lfkit-0.2.0/tests/test_photometry_lf_integrals.py → py_lfkit-0.4.0/tests/test_lumfuncs_integrals.py +316 -5
- py_lfkit-0.4.0/tests/test_lumfuncs_models_composite.py +367 -0
- py_lfkit-0.4.0/tests/test_lumfuncs_models_gamma.py +387 -0
- py_lfkit-0.4.0/tests/test_lumfuncs_models_gaussian.py +420 -0
- py_lfkit-0.4.0/tests/test_lumfuncs_models_modifiers.py +193 -0
- py_lfkit-0.4.0/tests/test_lumfuncs_models_non_parametric.py +515 -0
- py_lfkit-0.4.0/tests/test_lumfuncs_models_power_law.py +417 -0
- py_lfkit-0.4.0/tests/test_lumfuncs_models_saunders.py +505 -0
- py_lfkit-0.4.0/tests/test_lumfuncs_models_schechter.py +815 -0
- py_lfkit-0.2.0/tests/test_photometry_lf_parameter_models.py → py_lfkit-0.4.0/tests/test_lumfuncs_parameter_models.py +45 -2
- py_lfkit-0.2.0/tests/test_photometry_lf_redshift_density.py → py_lfkit-0.4.0/tests/test_lumfuncs_redshift_density.py +73 -6
- py_lfkit-0.4.0/tests/test_lumfuncs_registry.py +463 -0
- py_lfkit-0.4.0/tests/test_photometry_luminosities.py +274 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_photometry_magnitudes.py +130 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_utils_download_pogg97_data.py +1 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_utils_evaluators.py +176 -1
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/tests/test_utils_integrators.py +191 -1
- py_lfkit-0.4.0/tests/test_utils_interpolation.py +360 -0
- py_lfkit-0.4.0/tests/test_utils_io.py +347 -0
- py_lfkit-0.4.0/tests/test_utils_types.py +75 -0
- py_lfkit-0.4.0/tests/test_utils_units.py +199 -0
- py_lfkit-0.4.0/tests/test_utils_validators.py +663 -0
- py_lfkit-0.2.0/docs/about/lf_overview.rst +0 -541
- py_lfkit-0.2.0/docs/api/index.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.api.conditional_luminosity_function.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.api.corrections.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.api.luminosity_function.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.api.rst +0 -20
- py_lfkit-0.2.0/docs/api/lfkit.corrections.color_anchors.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.corrections.filters.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.corrections.kcorrect_backend.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.corrections.kcorrect_from_color.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.corrections.kcorrect_grids.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.corrections.poggianti1997.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.corrections.responses.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.corrections.rst +0 -24
- py_lfkit-0.2.0/docs/api/lfkit.cosmo.cosmology.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.cosmo.rst +0 -18
- py_lfkit-0.2.0/docs/api/lfkit.photometry.catalog_completeness.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.photometry.conditional_lf_integrals.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.photometry.conditional_lf_models.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.photometry.lf_integrals.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.photometry.lf_parameter_models.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.photometry.lf_redshift_density.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.photometry.luminosities.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.photometry.luminosity_function.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.photometry.magnitudes.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.photometry.rst +0 -26
- py_lfkit-0.2.0/docs/api/lfkit.rst +0 -22
- py_lfkit-0.2.0/docs/api/lfkit.utils.download_poggianti97_data.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.utils.evaluators.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.utils.integrators.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.utils.interpolation.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.utils.io.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.utils.rst +0 -25
- py_lfkit-0.2.0/docs/api/lfkit.utils.types.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.utils.units.rst +0 -7
- py_lfkit-0.2.0/docs/api/lfkit.utils.validators.rst +0 -7
- py_lfkit-0.2.0/docs/examples/api_overview.rst +0 -553
- py_lfkit-0.2.0/docs/examples/index.rst +0 -23
- py_lfkit-0.2.0/docs/examples/luminosity_function_models.rst +0 -626
- py_lfkit-0.2.0/docs/index.rst +0 -64
- py_lfkit-0.2.0/src/lfkit/api/_clf_models.py +0 -23
- py_lfkit-0.2.0/src/lfkit/api/_completeness.py +0 -51
- py_lfkit-0.2.0/src/lfkit/api/_expose.py +0 -45
- py_lfkit-0.2.0/src/lfkit/api/_integrals.py +0 -53
- py_lfkit-0.2.0/src/lfkit/api/_lf_param_models.py +0 -77
- py_lfkit-0.2.0/src/lfkit/api/_luminosities.py +0 -36
- py_lfkit-0.2.0/src/lfkit/api/_magnitudes.py +0 -27
- py_lfkit-0.2.0/src/lfkit/api/_redshift_density.py +0 -39
- py_lfkit-0.2.0/src/lfkit/api/conditional_luminosity_function.py +0 -161
- py_lfkit-0.2.0/src/lfkit/api/luminosity_function.py +0 -370
- py_lfkit-0.2.0/src/lfkit/photometry/conditional_lf_models.py +0 -424
- py_lfkit-0.2.0/src/lfkit/photometry/luminosities.py +0 -426
- py_lfkit-0.2.0/src/lfkit/utils/validators.py +0 -63
- py_lfkit-0.2.0/tests/test_api_conditional_luminosity_function.py +0 -192
- py_lfkit-0.2.0/tests/test_api_luminosity_function.py +0 -421
- py_lfkit-0.2.0/tests/test_cosmo_cosmology.py +0 -74
- py_lfkit-0.2.0/tests/test_photometry_luminosities.py +0 -377
- py_lfkit-0.2.0/tests/test_photometry_luminosity_function.py +0 -254
- py_lfkit-0.2.0/tests/test_utils_interpolation.py +0 -131
- py_lfkit-0.2.0/tests/test_utils_io.py +0 -128
- py_lfkit-0.2.0/tests/test_utils_units.py +0 -90
- py_lfkit-0.2.0/tests/test_utils_validators.py +0 -184
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/.github/workflows/ci.yml +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/.github/workflows/docs.yml +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/.github/workflows/publish.yml +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/LICENSE +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/MANIFEST.in +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/README.md +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/Makefile +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/_static/custom.css +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/_static/logos/lfkit_logo-icon.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/_static/logos/lfkit_logo.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/_static/logos/lfkit_logo.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/_static/logos/lfkit_logo.svg +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/_templates/pages_redirect.html +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/_templates/sidebar/brand.html +0 -0
- /py_lfkit-0.2.0/docs/about/corr_overview.rst → /py_lfkit-0.4.0/docs/about/corrections_overview.rst +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/conf.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/examples/kcorrect_examples.rst +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/examples/poggianti_examples.rst +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/docs/make.bat +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/logo/lfkit_github_banner.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/logo/lfkit_logo-icon.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/logo/lfkit_logo.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/logo/lfkit_logo.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/logo/lfkit_logo.svg +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/logo/make_gh_banner.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/logo/make_logo.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-g__blue-red__surveys-native-gr.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-g__blue-red__surveys-native-gr.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-i__blue-red__surveys-native-gr.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-i__blue-red__surveys-native-gr.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-r__blue-red__surveys-native-gr.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-r__blue-red__surveys-native-gr.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-u__blue-red__surveys-native-gr.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-u__blue-red__surveys-native-gr.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-z__blue-red__surveys-native-gr.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-z__blue-red__surveys-native-gr.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/bessell/Kcurves__system-bessell__band-B__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/bessell/Kcurves__system-bessell__band-B__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/bessell/Kcurves__system-bessell__band-I__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/bessell/Kcurves__system-bessell__band-I__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/bessell/Kcurves__system-bessell__band-R__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/bessell/Kcurves__system-bessell__band-R__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/bessell/Kcurves__system-bessell__band-U__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/bessell/Kcurves__system-bessell__band-U__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/bessell/Kcurves__system-bessell__band-V__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/bessell/Kcurves__system-bessell__band-V__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/sdss/Kcurves__system-sdss__band-g__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/sdss/Kcurves__system-sdss__band-g__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/sdss/Kcurves__system-sdss__band-i__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/sdss/Kcurves__system-sdss__band-i__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/sdss/Kcurves__system-sdss__band-r__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/compare_poggianti_to_kcorrect/sdss/Kcurves__system-sdss__band-r__zmax-3.5__nz-401__pchip__extrap-1__anchorz0-1.png +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone/K__band_bessell_B.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone/K__band_bessell_I.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone/K__band_bessell_R.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone/K__band_bessell_U.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone/K__band_bessell_V.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_Y.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_g.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_i.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_r.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_u.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_z.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone/K__band_sdss_g0.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone/K__band_sdss_i0.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone/K__band_sdss_r0.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone/K__band_sdss_u0.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone/K__band_sdss_z0.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_B.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_Ic.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_Rc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_V.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_g.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_i.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_r.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_z.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_E2.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_Sa.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_E2.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_Sa.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_E2.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_Sa.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_Ic_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_Ic_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_E2.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_Sa.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_E2.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_Sa.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_E2.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_Sa.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_Rc_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_Rc_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_E2.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_Sa.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_E2.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_Sa.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_E.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_E2.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_Sa.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_Sc.pdf +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/scripts/compare_kcorr_surveys.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/scripts/compare_poggianti_to_kcorrect.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/scripts/make_fake_magnitude_limited_catalog.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/scripts/plot_poggianti1997_corrections.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/setup.cfg +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/__init__.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/api/__init__.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/api/corrections.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/corrections/__init__.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/corrections/color_anchors.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/corrections/filters.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/corrections/kcorrect_backend.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/corrections/kcorrect_from_color.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/corrections/kcorrect_grids.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/corrections/poggianti1997.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/corrections/responses.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/cosmo/__init__.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/demo_catalogs/fake_magnitude_limited_catalog.csv +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/kcorrect/grids/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone.npz +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/kcorrect/grids/kcorrect__decam__z0.0000_4.0__Nz801__bsnone.npz +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/kcorrect/grids/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone.npz +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/kcorrect/grids/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone.npz +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/poggianti1997/__init__.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/poggianti1997/ecorr.csv +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/poggianti1997/filters.csv +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/poggianti1997/kcorr.csv +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/poggianti1997/kcorrv.csv +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/data/poggianti1997/sed.csv +0 -0
- {py_lfkit-0.2.0/src/lfkit/photometry → py_lfkit-0.4.0/src/lfkit/luminosity_functions}/__init__.py +0 -0
- {py_lfkit-0.2.0/src/lfkit/utils → py_lfkit-0.4.0/src/lfkit/luminosity_functions/models}/__init__.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/utils/download_poggianti97_data.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/utils/evaluators.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/utils/interpolation.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/utils/io.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/utils/types.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/lfkit/utils/units.py +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/py_lfkit.egg-info/dependency_links.txt +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/py_lfkit.egg-info/requires.txt +0 -0
- {py_lfkit-0.2.0 → py_lfkit-0.4.0}/src/py_lfkit.egg-info/top_level.txt +0 -0
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
.idea
|
|
2
|
-
|
|
1
|
+
.idea/
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
3
4
|
logs/
|
|
4
5
|
plots_tests/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
venv/
|
|
7
|
+
.tox/
|
|
8
|
+
.cache/
|
|
9
|
+
|
|
10
|
+
docs/_build/
|
|
11
|
+
docs/_generated/
|
|
12
|
+
|
|
13
|
+
*.egg-info/
|
|
14
|
+
.eggs/
|
|
15
|
+
build/
|
|
16
|
+
dist/
|
|
12
17
|
|
|
13
18
|
# Notebooks
|
|
14
19
|
*.ipynb
|
|
@@ -17,6 +22,7 @@ notebooks/
|
|
|
17
22
|
notebooks/plots/*.png
|
|
18
23
|
notebooks/plots/*.pdf
|
|
19
24
|
notebooks/logs/
|
|
20
|
-
|
|
25
|
+
|
|
21
26
|
unused/
|
|
22
27
|
src/lfkit/_version.py
|
|
28
|
+
.DS_Store
|
|
@@ -10,8 +10,8 @@ authors:
|
|
|
10
10
|
email: "nikolina.sarcevic@gmail.com"
|
|
11
11
|
orcid: "https://orcid.org/0000-0001-7301-6415"
|
|
12
12
|
|
|
13
|
-
version: "0.
|
|
14
|
-
date-released: 2026-
|
|
13
|
+
version: "0.2.0"
|
|
14
|
+
date-released: 2026-05-15
|
|
15
15
|
|
|
16
16
|
repository-code: "https://github.com/cosmo-hub/lfkit"
|
|
17
17
|
url: "https://github.com/cosmo-hub/lfkit"
|
|
@@ -21,7 +21,7 @@ Core components
|
|
|
21
21
|
:gutter: 3
|
|
22
22
|
|
|
23
23
|
.. grid-item-card::
|
|
24
|
-
:link:
|
|
24
|
+
:link: corrections_overview
|
|
25
25
|
:link-type: doc
|
|
26
26
|
:shadow: md
|
|
27
27
|
|
|
@@ -33,7 +33,7 @@ Core components
|
|
|
33
33
|
filter response curves and spectral energy distributions (SEDs).
|
|
34
34
|
|
|
35
35
|
.. grid-item-card::
|
|
36
|
-
:link:
|
|
36
|
+
:link: photometry_overview
|
|
37
37
|
:link-type: doc
|
|
38
38
|
:shadow: md
|
|
39
39
|
|
|
@@ -49,5 +49,5 @@ Core components
|
|
|
49
49
|
:maxdepth: 1
|
|
50
50
|
:hidden:
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
corrections_overview
|
|
53
|
+
photometry_overview
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
.. |lfkitlogo| image:: /_static/logos/lfkit_logo.png
|
|
2
|
+
:alt: LFKit logo black
|
|
3
|
+
:width: 50px
|
|
4
|
+
|
|
5
|
+
|lfkitlogo| Photometry Overview
|
|
6
|
+
===============================
|
|
7
|
+
|
|
8
|
+
A luminosity function describes the abundance of galaxies as a function of
|
|
9
|
+
intrinsic brightness. It is a number-density distribution: it tells us how many
|
|
10
|
+
galaxies exist per unit volume and per luminosity or magnitude interval. If it
|
|
11
|
+
is normalized by the total number density, it can also be interpreted as a
|
|
12
|
+
probability density over luminosity or magnitude.
|
|
13
|
+
|
|
14
|
+
In luminosity units, the luminosity function is often written as
|
|
15
|
+
:math:`\Phi(L, z)`, where :math:`L` is luminosity and :math:`z` is redshift.
|
|
16
|
+
The quantity
|
|
17
|
+
|
|
18
|
+
.. math::
|
|
19
|
+
|
|
20
|
+
\Phi(L, z)\,\mathrm{d}L
|
|
21
|
+
|
|
22
|
+
is the comoving number density of galaxies with luminosities between
|
|
23
|
+
:math:`L` and :math:`L+\mathrm{d}L` at redshift :math:`z`.
|
|
24
|
+
|
|
25
|
+
Equivalently, in absolute magnitude space, the luminosity function is written as
|
|
26
|
+
:math:`\Phi(M, z)`, where :math:`M` is absolute magnitude. In this case,
|
|
27
|
+
|
|
28
|
+
.. math::
|
|
29
|
+
|
|
30
|
+
\Phi(M, z)\,\mathrm{d}M
|
|
31
|
+
|
|
32
|
+
is the comoving number density of galaxies with absolute magnitudes between
|
|
33
|
+
:math:`M` and :math:`M+\mathrm{d}M`.
|
|
34
|
+
|
|
35
|
+
Luminosity and absolute magnitude are intrinsic quantities. Surveys instead
|
|
36
|
+
measure fluxes, which are usually reported as apparent magnitudes :math:`m`.
|
|
37
|
+
Therefore, using a luminosity function with observed data usually requires
|
|
38
|
+
converting between apparent magnitude and absolute magnitude using a luminosity
|
|
39
|
+
distance, and sometimes additional photometric corrections.
|
|
40
|
+
|
|
41
|
+
For worked examples of the LFKit public API, see the dedicated example pages:
|
|
42
|
+
|
|
43
|
+
- :doc:`../examples/lf_models/index`
|
|
44
|
+
- :doc:`../examples/magnitudes_and_luminosities`
|
|
45
|
+
- :doc:`../examples/magnitude_integrals`
|
|
46
|
+
- :doc:`../examples/redshift_density`
|
|
47
|
+
- :doc:`../examples/catalog_completeness`
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
Luminosity and magnitude
|
|
51
|
+
------------------------
|
|
52
|
+
|
|
53
|
+
Luminosity :math:`L` is the total energy emitted by a galaxy per unit time.
|
|
54
|
+
Flux :math:`F` is the energy received by an observer per unit area and per unit
|
|
55
|
+
time. The two are related by the luminosity distance :math:`d_L`:
|
|
56
|
+
|
|
57
|
+
.. math::
|
|
58
|
+
|
|
59
|
+
F = \frac{L}{4\pi d_L^2}.
|
|
60
|
+
|
|
61
|
+
This is why luminosity is not directly observed. It is inferred from the
|
|
62
|
+
measured flux once a distance has been specified.
|
|
63
|
+
|
|
64
|
+
Astronomy often uses magnitudes instead of luminosities. Apparent magnitude
|
|
65
|
+
:math:`m` describes how bright an object appears to the observer. Absolute
|
|
66
|
+
magnitude :math:`M` describes the intrinsic brightness of the object, defined as
|
|
67
|
+
the apparent magnitude it would have at a standard reference distance.
|
|
68
|
+
|
|
69
|
+
By convention, more negative magnitudes are brighter. A galaxy with
|
|
70
|
+
:math:`M=-22` is brighter than a galaxy with :math:`M=-18`.
|
|
71
|
+
|
|
72
|
+
Luminosity and absolute magnitude are related logarithmically. Relative to a
|
|
73
|
+
reference luminosity :math:`L_0`, the absolute magnitude can be written as
|
|
74
|
+
|
|
75
|
+
.. math::
|
|
76
|
+
|
|
77
|
+
M = M_0 - 2.5 \log_{10}\left(\frac{L}{L_0}\right),
|
|
78
|
+
|
|
79
|
+
or equivalently,
|
|
80
|
+
|
|
81
|
+
.. math::
|
|
82
|
+
|
|
83
|
+
\frac{L}{L_0}
|
|
84
|
+
=
|
|
85
|
+
10^{-0.4(M - M_0)}.
|
|
86
|
+
|
|
87
|
+
Here :math:`M_0` is the magnitude corresponding to the reference luminosity
|
|
88
|
+
:math:`L_0`. This relation is why brighter objects have smaller, more negative
|
|
89
|
+
magnitudes.
|
|
90
|
+
|
|
91
|
+
The conversion between apparent and absolute magnitude can be written as
|
|
92
|
+
|
|
93
|
+
.. math::
|
|
94
|
+
|
|
95
|
+
M = m - \mu(z) - K(z) + E(z),
|
|
96
|
+
|
|
97
|
+
where:
|
|
98
|
+
|
|
99
|
+
- :math:`M` is absolute magnitude,
|
|
100
|
+
- :math:`m` is apparent magnitude,
|
|
101
|
+
- :math:`\mu(z)` is the distance modulus,
|
|
102
|
+
- :math:`K(z)` is the k-correction,
|
|
103
|
+
- :math:`E(z)` is the evolution correction,
|
|
104
|
+
- :math:`z` is redshift.
|
|
105
|
+
|
|
106
|
+
The distance modulus encodes the effect of distance. The k-correction accounts
|
|
107
|
+
for observing a redshifted galaxy spectrum through a fixed bandpass. The
|
|
108
|
+
evolution correction accounts for intrinsic luminosity evolution of the galaxy
|
|
109
|
+
population, depending on the convention adopted in the analysis.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
Magnitude-space luminosity functions
|
|
113
|
+
------------------------------------
|
|
114
|
+
|
|
115
|
+
LFKit works primarily in rest-frame absolute magnitude space. This is a natural
|
|
116
|
+
choice for galaxy luminosity functions because absolute magnitude is an
|
|
117
|
+
intrinsic brightness variable.
|
|
118
|
+
|
|
119
|
+
A magnitude-space luminosity function :math:`\Phi(M, z)` gives the number
|
|
120
|
+
density of galaxies per unit magnitude. If :math:`\Phi(M, z)` has units of
|
|
121
|
+
:math:`{\rm Mpc}^{-3}\,{\rm mag}^{-1}`, then integrating it over a finite
|
|
122
|
+
absolute magnitude interval gives a number density in
|
|
123
|
+
:math:`{\rm Mpc}^{-3}`:
|
|
124
|
+
|
|
125
|
+
.. math::
|
|
126
|
+
|
|
127
|
+
n(z) =
|
|
128
|
+
\int_{M_{\rm bright}}^{M_{\rm faint}}
|
|
129
|
+
\Phi(M, z)\,\mathrm{d}M.
|
|
130
|
+
|
|
131
|
+
Here:
|
|
132
|
+
|
|
133
|
+
- :math:`n(z)` is the integrated number density at redshift :math:`z`,
|
|
134
|
+
- :math:`M_{\rm bright}` is the bright absolute magnitude limit,
|
|
135
|
+
- :math:`M_{\rm faint}` is the faint absolute magnitude limit,
|
|
136
|
+
- :math:`\Phi(M, z)` is the luminosity function per unit magnitude.
|
|
137
|
+
|
|
138
|
+
Because brighter galaxies have more negative magnitudes,
|
|
139
|
+
:math:`M_{\rm bright}` is usually more negative than :math:`M_{\rm faint}`.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
The Schechter luminosity function
|
|
143
|
+
---------------------------------
|
|
144
|
+
|
|
145
|
+
A common model for galaxy luminosity functions is the Schechter function. In
|
|
146
|
+
luminosity space, it is usually written as
|
|
147
|
+
|
|
148
|
+
.. math::
|
|
149
|
+
|
|
150
|
+
\Phi(L)\,\mathrm{d}L =
|
|
151
|
+
\phi_\star
|
|
152
|
+
\left(\frac{L}{L_\star}\right)^\alpha
|
|
153
|
+
\exp\left(-\frac{L}{L_\star}\right)
|
|
154
|
+
\frac{\mathrm{d}L}{L_\star}.
|
|
155
|
+
|
|
156
|
+
Here:
|
|
157
|
+
|
|
158
|
+
- :math:`L` is galaxy luminosity,
|
|
159
|
+
- :math:`L_\star` is the characteristic luminosity,
|
|
160
|
+
- :math:`\phi_\star` is the normalization,
|
|
161
|
+
- :math:`\alpha` is the faint-end slope.
|
|
162
|
+
|
|
163
|
+
The Schechter form combines two behaviours. At low luminosities, the model is
|
|
164
|
+
approximately a power law controlled by :math:`\alpha`. At high luminosities,
|
|
165
|
+
the exponential term suppresses the abundance of very bright galaxies.
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
Schechter function in magnitude space
|
|
169
|
+
-------------------------------------
|
|
170
|
+
|
|
171
|
+
The magnitude-space form follows from the luminosity-space form by using the
|
|
172
|
+
luminosity ratio
|
|
173
|
+
|
|
174
|
+
.. math::
|
|
175
|
+
|
|
176
|
+
\frac{L}{L_\star}
|
|
177
|
+
=
|
|
178
|
+
10^{-0.4(M - M_\star)}.
|
|
179
|
+
|
|
180
|
+
The change of variables from luminosity to magnitude also introduces the factor
|
|
181
|
+
:math:`0.4\ln(10)`.
|
|
182
|
+
|
|
183
|
+
In absolute magnitude space, the Schechter luminosity function can be written as
|
|
184
|
+
|
|
185
|
+
.. math::
|
|
186
|
+
|
|
187
|
+
\Phi(M) =
|
|
188
|
+
0.4 \ln(10) \, \phi_\star \,
|
|
189
|
+
x^{\alpha + 1} \exp(-x),
|
|
190
|
+
|
|
191
|
+
with
|
|
192
|
+
|
|
193
|
+
.. math::
|
|
194
|
+
|
|
195
|
+
x = 10^{-0.4(M - M_\star)}.
|
|
196
|
+
|
|
197
|
+
Here:
|
|
198
|
+
|
|
199
|
+
- :math:`M` is absolute magnitude,
|
|
200
|
+
- :math:`M_\star` is the characteristic absolute magnitude,
|
|
201
|
+
- :math:`\phi_\star` is the normalization,
|
|
202
|
+
- :math:`\alpha` is the faint-end slope,
|
|
203
|
+
- :math:`x` is the luminosity ratio :math:`L/L_\star` written in magnitude form.
|
|
204
|
+
|
|
205
|
+
The parameter :math:`M_\star` marks the transition between the power law part of
|
|
206
|
+
the luminosity function and the exponential bright-end cutoff. The parameter
|
|
207
|
+
:math:`\alpha` controls how rapidly the abundance rises toward fainter
|
|
208
|
+
magnitudes. More negative values of :math:`\alpha` produce a steeper faint end.
|
|
209
|
+
|
|
210
|
+
The normalization :math:`\phi_\star` sets the overall abundance scale. If
|
|
211
|
+
:math:`\phi_\star` is supplied in :math:`{\rm Mpc}^{-3}`, then
|
|
212
|
+
:math:`\Phi(M)` is usually interpreted as a number density per magnitude,
|
|
213
|
+
:math:`{\rm Mpc}^{-3}\,{\rm mag}^{-1}`.
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
Redshift evolution
|
|
217
|
+
------------------
|
|
218
|
+
|
|
219
|
+
Galaxy populations evolve with redshift, so luminosity function parameters are
|
|
220
|
+
often allowed to depend on :math:`z`. A redshift-dependent Schechter model can
|
|
221
|
+
be written schematically as
|
|
222
|
+
|
|
223
|
+
.. math::
|
|
224
|
+
|
|
225
|
+
\Phi(M, z) =
|
|
226
|
+
\Phi\left(M \mid \phi_\star(z), M_\star(z), \alpha(z)\right).
|
|
227
|
+
|
|
228
|
+
Here:
|
|
229
|
+
|
|
230
|
+
- :math:`\phi_\star(z)` describes evolution in the overall normalization,
|
|
231
|
+
- :math:`M_\star(z)` describes evolution in the characteristic magnitude,
|
|
232
|
+
- :math:`\alpha(z)` describes evolution in the faint-end slope.
|
|
233
|
+
|
|
234
|
+
Changing :math:`\phi_\star(z)` changes the total abundance scale. Changing
|
|
235
|
+
:math:`M_\star(z)` shifts the characteristic magnitude where the luminosity
|
|
236
|
+
function turns over. Changing :math:`\alpha(z)` mainly changes the relative
|
|
237
|
+
abundance of faint galaxies.
|
|
238
|
+
|
|
239
|
+
Different analyses use different parameterizations for this evolution. For
|
|
240
|
+
example, one may use a constant parameter, a linear trend with redshift, or a
|
|
241
|
+
survey-specific empirical model. The important point is that the luminosity
|
|
242
|
+
function model and the photometric evolution correction should be defined
|
|
243
|
+
consistently.
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
Apparent magnitude limits
|
|
247
|
+
-------------------------
|
|
248
|
+
|
|
249
|
+
Observed catalogs are often selected by an apparent magnitude limit
|
|
250
|
+
:math:`m_{\rm lim}`. A luminosity function, however, is usually evaluated in
|
|
251
|
+
absolute magnitude space. The corresponding absolute magnitude limit is
|
|
252
|
+
|
|
253
|
+
.. math::
|
|
254
|
+
|
|
255
|
+
M_{\rm lim}(z)
|
|
256
|
+
=
|
|
257
|
+
m_{\rm lim} - \mu(z) - K(z) + E(z).
|
|
258
|
+
|
|
259
|
+
Here:
|
|
260
|
+
|
|
261
|
+
- :math:`M_{\rm lim}(z)` is the redshift-dependent absolute magnitude limit,
|
|
262
|
+
- :math:`m_{\rm lim}` is the apparent magnitude limit of the catalog,
|
|
263
|
+
- :math:`\mu(z)` is the distance modulus,
|
|
264
|
+
- :math:`K(z)` is the k-correction,
|
|
265
|
+
- :math:`E(z)` is the evolution correction.
|
|
266
|
+
|
|
267
|
+
The dependence on :math:`z` is important. The same apparent magnitude limit
|
|
268
|
+
corresponds to different intrinsic luminosities at different redshifts. At
|
|
269
|
+
higher redshift, a fixed apparent magnitude cut usually selects only brighter
|
|
270
|
+
galaxies.
|
|
271
|
+
|
|
272
|
+
This is the basic reason magnitude-limited samples become increasingly
|
|
273
|
+
incomplete for faint galaxies at larger distances.
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
Number-density integrals
|
|
277
|
+
------------------------
|
|
278
|
+
|
|
279
|
+
Integrating a luminosity function over magnitude gives the number density of
|
|
280
|
+
galaxies inside a chosen magnitude range:
|
|
281
|
+
|
|
282
|
+
.. math::
|
|
283
|
+
|
|
284
|
+
n(z) =
|
|
285
|
+
\int_{M_{\rm bright}}^{M_{\rm faint}}
|
|
286
|
+
\Phi(M, z)\,\mathrm{d}M.
|
|
287
|
+
|
|
288
|
+
This quantity is useful when the luminosity function is used to predict the
|
|
289
|
+
abundance of a galaxy sample. Changing the integration limits changes the
|
|
290
|
+
population being counted. A brighter cut selects only luminous galaxies, while a
|
|
291
|
+
fainter cut includes more of the faint galaxy population.
|
|
292
|
+
|
|
293
|
+
For a magnitude-limited catalog, the observed number density can be written as
|
|
294
|
+
|
|
295
|
+
.. math::
|
|
296
|
+
|
|
297
|
+
n_{\rm obs}(z) =
|
|
298
|
+
\int_{M_{\rm bright}}^{\min[M_{\rm lim}(z), M_{\rm faint}]}
|
|
299
|
+
\Phi(M, z)\,\mathrm{d}M.
|
|
300
|
+
|
|
301
|
+
The missing, or out-of-catalog, number density can be written as
|
|
302
|
+
|
|
303
|
+
.. math::
|
|
304
|
+
|
|
305
|
+
n_{\rm miss}(z) =
|
|
306
|
+
\int_{\max[M_{\rm lim}(z), M_{\rm bright}]}^{M_{\rm faint}}
|
|
307
|
+
\Phi(M, z)\,\mathrm{d}M.
|
|
308
|
+
|
|
309
|
+
Here:
|
|
310
|
+
|
|
311
|
+
- :math:`n_{\rm obs}(z)` is the number density above the catalog selection,
|
|
312
|
+
- :math:`n_{\rm miss}(z)` is the number density below the catalog selection,
|
|
313
|
+
- :math:`M_{\rm lim}(z)` is the absolute magnitude limit implied by the apparent
|
|
314
|
+
magnitude cut.
|
|
315
|
+
|
|
316
|
+
These definitions split the same reference luminosity function into the part
|
|
317
|
+
that is observable and the part that is missed by the magnitude limit.
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
Completeness fractions
|
|
321
|
+
----------------------
|
|
322
|
+
|
|
323
|
+
The catalog completeness fraction is the fraction of the reference population
|
|
324
|
+
that is retained by the magnitude limit:
|
|
325
|
+
|
|
326
|
+
.. math::
|
|
327
|
+
|
|
328
|
+
f_{\rm obs}(z) =
|
|
329
|
+
\frac{n_{\rm obs}(z)}
|
|
330
|
+
{n_{\rm obs}(z) + n_{\rm miss}(z)}.
|
|
331
|
+
|
|
332
|
+
The missing fraction is
|
|
333
|
+
|
|
334
|
+
.. math::
|
|
335
|
+
|
|
336
|
+
f_{\rm miss}(z) = 1 - f_{\rm obs}(z).
|
|
337
|
+
|
|
338
|
+
Here:
|
|
339
|
+
|
|
340
|
+
- :math:`f_{\rm obs}(z)` is the observed or in-catalog fraction,
|
|
341
|
+
- :math:`f_{\rm miss}(z)` is the missing or out-of-catalog fraction.
|
|
342
|
+
|
|
343
|
+
These fractions only describe the selection caused by the apparent magnitude
|
|
344
|
+
limit. Other survey effects, such as masks, blending, targeting, color cuts, or
|
|
345
|
+
spectroscopic failures, are separate selection effects and should be modeled
|
|
346
|
+
elsewhere.
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
LF-weighted redshift trends
|
|
350
|
+
---------------------------
|
|
351
|
+
|
|
352
|
+
A luminosity function can also be used to build a redshift-dependent selection
|
|
353
|
+
trend. For a magnitude-limited sample, one common ingredient is the
|
|
354
|
+
magnitude-integrated luminosity function as a function of redshift:
|
|
355
|
+
|
|
356
|
+
.. math::
|
|
357
|
+
|
|
358
|
+
S(z) =
|
|
359
|
+
\int_{M_{\rm bright}}^{M_{\rm lim}(z)}
|
|
360
|
+
\Phi(M, z)\,\mathrm{d}M.
|
|
361
|
+
|
|
362
|
+
Here:
|
|
363
|
+
|
|
364
|
+
- :math:`S(z)` is the luminosity function selection factor,
|
|
365
|
+
- :math:`M_{\rm bright}` is the bright integration limit,
|
|
366
|
+
- :math:`M_{\rm lim}(z)` is the redshift-dependent faint limit implied by the
|
|
367
|
+
apparent magnitude cut.
|
|
368
|
+
|
|
369
|
+
This selection factor describes how much of the luminosity function is retained
|
|
370
|
+
at each redshift. It is not by itself a full survey redshift distribution. To
|
|
371
|
+
build a redshift distribution, it is often combined with a volume factor or
|
|
372
|
+
another redshift-dependent weight:
|
|
373
|
+
|
|
374
|
+
.. math::
|
|
375
|
+
|
|
376
|
+
n(z) \propto S(z)\,W(z),
|
|
377
|
+
|
|
378
|
+
where :math:`W(z)` is a chosen redshift or volume weight.
|
|
379
|
+
|
|
380
|
+
The exact form of :math:`W(z)` depends on the analysis. For example, it may
|
|
381
|
+
represent the comoving volume element, an input parent population, or another
|
|
382
|
+
survey-specific weighting function.
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
Luminosity evolution and double counting
|
|
386
|
+
----------------------------------------
|
|
387
|
+
|
|
388
|
+
Luminosity evolution can enter an analysis in more than one place. It may appear
|
|
389
|
+
in the photometric conversion through an evolution correction :math:`E(z)`, or
|
|
390
|
+
it may appear directly in the luminosity function through a redshift-dependent
|
|
391
|
+
parameter such as :math:`M_\star(z)`.
|
|
392
|
+
|
|
393
|
+
These two choices are not automatically equivalent. Using both at the same time
|
|
394
|
+
can be correct if the conventions are defined carefully, but it can also double
|
|
395
|
+
count evolution if both terms describe the same physical effect.
|
|
396
|
+
|
|
397
|
+
A useful rule is to keep the roles separate:
|
|
398
|
+
|
|
399
|
+
- :math:`E(z)` belongs to the apparent-to-absolute magnitude conversion,
|
|
400
|
+
- :math:`M_\star(z)`, :math:`\phi_\star(z)`, and :math:`\alpha(z)` belong to the
|
|
401
|
+
luminosity function model.
|
|
402
|
+
|
|
403
|
+
The analysis should define which part of the evolution is handled by the
|
|
404
|
+
photometric correction and which part is handled by the luminosity function
|
|
405
|
+
parameterization.
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
What LFKit models
|
|
409
|
+
-----------------
|
|
410
|
+
|
|
411
|
+
LFKit focuses on the luminosity function side of these calculations. In this
|
|
412
|
+
layer, the relevant ingredients are intrinsic luminosity or magnitude,
|
|
413
|
+
redshift-dependent luminosity function parameters, apparent-to-absolute
|
|
414
|
+
magnitude conversions, and number-density integrals.
|
|
415
|
+
|
|
416
|
+
LFKit does not model every survey selection effect. Angular masks, survey area,
|
|
417
|
+
blending, targeting, spectroscopic success rates, and other catalog-level
|
|
418
|
+
effects should be handled by the calling analysis code.
|
|
419
|
+
|
|
420
|
+
The theory described here is implemented in the public LFKit interface and shown
|
|
421
|
+
with executable examples in the example pages.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.. |lfkitlogo| image:: /_static/logos/lfkit_logo.png
|
|
2
|
+
:alt: LFKit logo black
|
|
3
|
+
:width: 50px
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|lfkitlogo| Citation
|
|
7
|
+
====================
|
|
8
|
+
|
|
9
|
+
If you use LFKit in your work, please cite it using the citation metadata
|
|
10
|
+
provided with the repository.
|
|
11
|
+
|
|
12
|
+
How to cite LFKit
|
|
13
|
+
-----------------
|
|
14
|
+
|
|
15
|
+
The recommended citation is stored in the project repository as
|
|
16
|
+
``CITATION.cff``. GitHub uses this file to generate citation information
|
|
17
|
+
automatically.
|
|
18
|
+
|
|
19
|
+
Current citation metadata:
|
|
20
|
+
|
|
21
|
+
.. code-block:: yaml
|
|
22
|
+
|
|
23
|
+
cff-version: 1.2.0
|
|
24
|
+
message: >
|
|
25
|
+
If you use LFKit in your research, cite it using the metadata below.
|
|
26
|
+
|
|
27
|
+
title: "LFKit: Luminosity functions and photometric corrections toolkit"
|
|
28
|
+
|
|
29
|
+
authors:
|
|
30
|
+
- family-names: "Šarčević"
|
|
31
|
+
given-names: "Nikolina"
|
|
32
|
+
email: "nikolina.sarcevic@gmail.com"
|
|
33
|
+
orcid: "https://orcid.org/0000-0001-7301-6415"
|
|
34
|
+
|
|
35
|
+
version: "0.2.0"
|
|
36
|
+
date-released: 2026-05-15
|
|
37
|
+
|
|
38
|
+
repository-code: "https://github.com/cosmology-kit/lfkit"
|
|
39
|
+
url: "https://github.com/cosmology-kit/lfkit"
|
|
40
|
+
|
|
41
|
+
license: MIT
|
|
42
|
+
|
|
43
|
+
abstract: >
|
|
44
|
+
LFKit is a modular Python toolkit for luminosity function modeling,
|
|
45
|
+
k-corrections, e-corrections, and photometric response handling,
|
|
46
|
+
designed for cosmological analyses.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
.. _contributing:
|
|
2
|
+
|
|
3
|
+
.. |lfkitlogo| image:: /_static/logos/lfkit_logo.png
|
|
4
|
+
:alt: LFKit logo black
|
|
5
|
+
:width: 50px
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|lfkitlogo| Contributing
|
|
9
|
+
========================
|
|
10
|
+
|
|
11
|
+
Contributions in any shape or form are appreciated.
|
|
12
|
+
Below are some minimal guidelines to get started.
|
|
13
|
+
|
|
14
|
+
Development of ``lfkit`` is organised around `the Github repository <https://github.com/cosmology-kit/lfkit>`__.
|
|
15
|
+
Contributing usually requires `setting up an account <https://github.com/signup>`__ on Github.
|
|
16
|
+
No worries, it is free of charge!
|
|
17
|
+
|
|
18
|
+
When submitting contributions, please write in clear and correct English using full sentences.
|
|
19
|
+
Be concise and avoid unnecessarily formulaic descriptions.
|
|
20
|
+
|
|
21
|
+
***********************
|
|
22
|
+
Submitting bugs or code
|
|
23
|
+
***********************
|
|
24
|
+
|
|
25
|
+
Submitting a bug report or feature request can be done by `opening an issue on Github <https://github.com/cosmology-kit/lfkit/issues/new/choose>`__.
|
|
26
|
+
In the case of a bug report please make sure to
|
|
27
|
+
|
|
28
|
+
- describe the expected behaviour,
|
|
29
|
+
- describe the actual behaviour,
|
|
30
|
+
- the version(s) of ``lfkit`` that produce the bug,
|
|
31
|
+
- any specific environment details.
|
|
32
|
+
|
|
33
|
+
In the case of a feature request, please make sure to
|
|
34
|
+
|
|
35
|
+
- describe the feature,
|
|
36
|
+
- describe why the feature is useful.
|
|
37
|
+
|
|
38
|
+
Submitting a code contribution can be done by `opening a pull request on Github <https://github.com/cosmology-kit/lfkit/compare>`__.
|
|
39
|
+
In the pull request, please make sure of the following:
|
|
40
|
+
|
|
41
|
+
- The description of the pull request contains a high-level overview of what is implemented in the contribution.
|
|
42
|
+
- The description describes the reason for the addition.
|
|
43
|
+
Specifically, it describes what problem it is supposed to solve.
|
|
44
|
+
If the pull request resolves a bug or implements a feature for which an issue exists, make sure to refer to this.
|
|
45
|
+
- The ``lfkit`` workflows complete successfully.
|
|
46
|
+
The workflows will activate when a pull request is created, but can also be run locally on your computer as described below.
|
|
47
|
+
|
|
48
|
+
***************************
|
|
49
|
+
Running ``lfkit`` workflows
|
|
50
|
+
***************************
|
|
51
|
+
|
|
52
|
+
``lfkit`` uses `tox <https://tox.wiki>`__ to run its workflows.
|
|
53
|
+
For development, clone the repository and install the development dependencies::
|
|
54
|
+
|
|
55
|
+
git clone https://github.com/cosmology-kit/lfkit.git
|
|
56
|
+
cd lfkit
|
|
57
|
+
pip install -e ".[dev]"
|
|
58
|
+
|
|
59
|
+
All workflows can be run consecutively by calling tox from the project root directory::
|
|
60
|
+
|
|
61
|
+
tox
|
|
62
|
+
|
|
63
|
+
Specific workflows can also be run in isolation.
|
|
64
|
+
The following workflows are provided:
|
|
65
|
+
|
|
66
|
+
=======
|
|
67
|
+
Linting
|
|
68
|
+
=======
|
|
69
|
+
|
|
70
|
+
Code for ``lfkit`` must comply with `PEP-8 <https://peps.python.org/pep-0008/>`__.
|
|
71
|
+
Comments and docstrings must be compatible with `Google-style comments and docstrings <https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings>`__.
|
|
72
|
+
|
|
73
|
+
The linting workflow can be run using::
|
|
74
|
+
|
|
75
|
+
tox -e lint
|
|
76
|
+
|
|
77
|
+
Note that tox uses `ruff <https://docs.astral.sh/ruff/>`__ as the actual linter.
|
|
78
|
+
Options can be passed to `ruff check` by supplying them as command-line arguments to tox.
|
|
79
|
+
For example, to address fixable linting errors, use::
|
|
80
|
+
|
|
81
|
+
tox -e lint -- --fix
|
|
82
|
+
|
|
83
|
+
=============
|
|
84
|
+
Documentation
|
|
85
|
+
=============
|
|
86
|
+
|
|
87
|
+
Documentation is written in `reStructuredText <https://docutils.sourceforge.io/rst.html>`__.
|
|
88
|
+
Code documentation is generated from docstrings, and the documentation can be built locally with::
|
|
89
|
+
|
|
90
|
+
tox -e docs
|
|
91
|
+
|
|
92
|
+
The new documentation will be placed in the ``docs/_build`` directory.
|
|
93
|
+
Newly created rST files may need to be added to the appropriate table of contents files by hand.
|
|
94
|
+
|
|
95
|
+
Note that ``tox -e docs`` will use the ``html`` builder of sphinx-build.
|
|
96
|
+
A different builder can be selected by passing it as a command-line argument to tox.
|
|
97
|
+
For example, to run the doctest build::
|
|
98
|
+
|
|
99
|
+
tox -e docs -- doctest
|
|
100
|
+
|
|
101
|
+
A list of supported options can be found on the `Builders <https://www.sphinx-doc.org/en/master/usage/builders/index.html#builders>`__ page of Sphinx.
|
|
102
|
+
|
|
103
|
+
The entire documentation for the head of the main branch and all release tags can be generated using::
|
|
104
|
+
|
|
105
|
+
tox -e docs-releases
|
|
106
|
+
|
|
107
|
+
=======
|
|
108
|
+
Testing
|
|
109
|
+
=======
|
|
110
|
+
|
|
111
|
+
Contributions that contain new code must include tests in the appropriate files in the ``tests`` directory.
|
|
112
|
+
The test suite can be run locally with::
|
|
113
|
+
|
|
114
|
+
tox -m test
|
|
115
|
+
|
|
116
|
+
Note that this will attempt to run the test suite for all supported Python versions.
|
|
117
|
+
It will automatically skip versions which are not locally available.
|
|
118
|
+
|
|
119
|
+
If the test suite must be run for a specific version of Python, that specific environment can be called.
|
|
120
|
+
For example, to test against Python 3.13::
|
|
121
|
+
|
|
122
|
+
tox -e py313
|
|
123
|
+
|
|
124
|
+
For development it is sometimes useful to run a single test, as this is much faster than running the entire test suite.
|
|
125
|
+
To do so, add it as a command-line argument separated from the ``tox`` invocation by a ``--``.
|
|
126
|
+
For example::
|
|
127
|
+
|
|
128
|
+
tox -m test -- tests/test_luminosity_function.py
|