py-lfkit 0.4.0__tar.gz → 0.5.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.4.0 → py_lfkit-0.5.0}/PKG-INFO +1 -1
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/conditional_luminosity_function.rst +3 -1
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/_version.py +3 -3
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/api/conditional_luminosity_function.py +36 -18
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/conditional_integrals.py +59 -40
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/conditional_models.py +34 -12
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/schechter.py +6 -6
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/py_lfkit.egg-info/PKG-INFO +1 -1
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_api_conditional_luminosity_function.py +139 -62
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_conditional_integrals.py +42 -42
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_conditional_models.py +43 -44
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_schechter.py +5 -5
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/.github/workflows/ci.yml +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/.github/workflows/docs.yml +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/.github/workflows/publish.yml +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/.gitignore +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/CITATION.cff +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/LICENSE +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/MANIFEST.in +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/README.md +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/Makefile +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_static/custom.css +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_static/logos/lfkit_logo-icon.png +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_static/logos/lfkit_logo.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_static/logos/lfkit_logo.png +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_static/logos/lfkit_logo.svg +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_templates/pages_redirect.html +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_templates/sidebar/brand.html +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/about/corrections_overview.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/about/index.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/about/photometry_overview.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/api/index.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/citation.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/conf.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/contributing.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/catalog_completeness.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/index.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/kcorrect_examples.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/composite_models.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/gaussian_models.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/index.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/model_registry.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/power_law_models.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/schechter_models.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/magnitude_integrals.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/magnitudes_and_luminosities.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/poggianti_examples.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/redshift_density.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/index.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/installation.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/license.rst +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/make.bat +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/lfkit_github_banner.png +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/lfkit_logo-icon.png +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/lfkit_logo.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/lfkit_logo.png +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/lfkit_logo.svg +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/make_gh_banner.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/make_logo.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-g__blue-red__surveys-native-gr.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-g__blue-red__surveys-native-gr.png +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-i__blue-red__surveys-native-gr.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-i__blue-red__surveys-native-gr.png +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-r__blue-red__surveys-native-gr.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-r__blue-red__surveys-native-gr.png +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-u__blue-red__surveys-native-gr.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-u__blue-red__surveys-native-gr.png +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-z__blue-red__surveys-native-gr.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/compare_kcorrect_surveys_color_split/kcorr__band-z__blue-red__surveys-native-gr.png +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.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.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone/K__band_bessell_B.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone/K__band_bessell_I.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone/K__band_bessell_R.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone/K__band_bessell_U.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone/K__band_bessell_V.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_Y.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_g.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_i.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_r.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_u.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__decam__z0.0000_4.0__Nz801__bsnone/K__band_decam_z.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone/K__band_sdss_g0.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone/K__band_sdss_i0.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone/K__band_sdss_r0.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone/K__band_sdss_u0.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone/K__band_sdss_z0.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_B.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_Ic.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_Rc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_V.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_g.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_i.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_r.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/kcorrect/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone/K__band_subaru_suprimecam_z.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_E2.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_Sa.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_E2.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_Sa.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_E2.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_Sa.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_Ic_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_Ic_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_E2.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_Sa.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_E2.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_Sa.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_E2.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_Sa.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_Rc_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_Rc_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_E2.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_Sa.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_E2.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_Sa.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_E.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_E2.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_Sa.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_Sc.pdf +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/pyproject.toml +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/scripts/compare_kcorr_surveys.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/scripts/compare_poggianti_to_kcorrect.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/scripts/make_fake_magnitude_limited_catalog.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/scripts/plot_poggianti1997_corrections.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/setup.cfg +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/__init__.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/api/__init__.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/api/_namespaces.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/api/corrections.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/api/luminosity_function.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/__init__.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/color_anchors.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/filters.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/kcorrect_backend.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/kcorrect_from_color.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/kcorrect_grids.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/poggianti1997.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/responses.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/cosmo/__init__.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/cosmo/cosmology.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/demo_catalogs/fake_magnitude_limited_catalog.csv +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/kcorrect/grids/kcorrect__bessell__z0.0000_4.0__Nz801__bsnone.npz +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/kcorrect/grids/kcorrect__decam__z0.0000_4.0__Nz801__bsnone.npz +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/kcorrect/grids/kcorrect__sdss__z0.0000_4.0__Nz801__bsnone.npz +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/kcorrect/grids/kcorrect__subaru_suprimecam__z0.0000_4.0__Nz801__bsnone.npz +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/__init__.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/ecorr.csv +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/filters.csv +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/kcorr.csv +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/kcorrv.csv +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/sed.csv +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/__init__.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/_discovery.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/completeness.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/integrals.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/__init__.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/composite.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/gamma.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/gaussian.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/modifiers.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/non_parametric.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/power_law.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/saunders.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/parameter_models.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/redshift_density.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/registry.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/photometry/__init__.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/photometry/luminosities.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/photometry/magnitudes.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/__init__.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/download_poggianti97_data.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/evaluators.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/integrators.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/interpolation.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/io.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/types.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/units.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/validators.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/py_lfkit.egg-info/SOURCES.txt +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/py_lfkit.egg-info/dependency_links.txt +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/py_lfkit.egg-info/requires.txt +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/py_lfkit.egg-info/top_level.txt +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/benchmarks/test_cacciato_clf_reference.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/benchmarks/test_cacciato_hod_reference.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_api_corrections.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_api_luminosity_function.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_api_namespaces.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_color_anchors.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_filters.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_kcorrect_backend.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_kcorrect_from_color.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_kcorrrect_grids.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_poggianti1997.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_responses.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_cosmo_cosmology.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_completeness.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_completeness_fake_catalog.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_discovery.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_integrals.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_composite.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_gamma.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_gaussian.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_modifiers.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_non_parametric.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_power_law.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_saunders.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_parameter_models.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_redshift_density.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_registry.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_photometry_luminosities.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_photometry_magnitudes.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_download_pogg97_data.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_evaluators.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_integrators.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_interpolation.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_io.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_types.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_units.py +0 -0
- {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_validators.py +0 -0
|
@@ -387,10 +387,12 @@ The model therefore changes both in amplitude and in shape.
|
|
|
387
387
|
cmap_range=(0.0, 0.2),
|
|
388
388
|
)
|
|
389
389
|
|
|
390
|
-
lf = ConditionalLuminosityFunction.
|
|
390
|
+
lf = ConditionalLuminosityFunction.double_schechter(
|
|
391
391
|
phi_star=lambda z: 1.2e-3 * (1.0 + z) ** 0.5,
|
|
392
392
|
m_star=lambda z: -20.3 - 0.5 * (z - 0.1),
|
|
393
393
|
alpha=lambda z: -1.15 - 0.10 * z,
|
|
394
|
+
beta=lambda z: -0.45 - 0.05 * z,
|
|
395
|
+
m_transition=lambda z: -19.0 - 0.3 * (z - 0.1),
|
|
394
396
|
)
|
|
395
397
|
|
|
396
398
|
fig, ax = plt.subplots(figsize=(7.0, 5.0))
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0,
|
|
21
|
+
__version__ = version = '0.5.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 5, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g8dbb26ee5'
|
|
@@ -21,10 +21,10 @@ __all__ = ["ConditionalLuminosityFunction"]
|
|
|
21
21
|
class ConditionalLuminosityFunction(LuminosityFunction):
|
|
22
22
|
"""User-facing wrapper for conditional luminosity function models.
|
|
23
23
|
|
|
24
|
-
A conditional luminosity function evaluates ``Phi(M |
|
|
25
|
-
absolute magnitude and ``
|
|
26
|
-
redshift, halo mass, environment, richness, stellar mass,
|
|
27
|
-
model-specific
|
|
24
|
+
A conditional luminosity function evaluates ``Phi(M | x_1, x_2, ...)``,
|
|
25
|
+
where ``M`` is absolute magnitude and the ``x_i`` are external conditioning
|
|
26
|
+
variables such as redshift, halo mass, environment, richness, stellar mass,
|
|
27
|
+
or other model-specific quantities.
|
|
28
28
|
|
|
29
29
|
Instances can be created either with the generic constructor or with
|
|
30
30
|
automatically generated model constructors.
|
|
@@ -33,34 +33,39 @@ class ConditionalLuminosityFunction(LuminosityFunction):
|
|
|
33
33
|
def phi(
|
|
34
34
|
self,
|
|
35
35
|
absolute_mag: FloatInput,
|
|
36
|
-
|
|
36
|
+
*conditions: FloatInput,
|
|
37
37
|
) -> FloatArray:
|
|
38
38
|
"""Evaluate the conditional luminosity function.
|
|
39
39
|
|
|
40
40
|
Args:
|
|
41
41
|
absolute_mag: Absolute magnitude value or array.
|
|
42
|
-
|
|
43
|
-
variable depends on the selected conditional
|
|
42
|
+
*conditions: One or more conditioning variable values or arrays. The
|
|
43
|
+
meaning of each variable depends on the selected conditional
|
|
44
|
+
luminosity function model.
|
|
44
45
|
|
|
45
46
|
Returns:
|
|
46
47
|
Conditional luminosity function evaluated at ``absolute_mag`` and
|
|
47
|
-
|
|
48
|
+
the supplied conditioning variables.
|
|
48
49
|
|
|
49
50
|
Raises:
|
|
50
|
-
ValueError: If
|
|
51
|
-
as a conditional luminosity function.
|
|
51
|
+
ValueError: If no conditioning variables are provided, or if the
|
|
52
|
+
model is not registered as a conditional luminosity function.
|
|
52
53
|
"""
|
|
53
54
|
model_spec = get_conditional_lf_model(self.model)
|
|
54
55
|
|
|
55
|
-
if
|
|
56
|
+
if not conditions:
|
|
56
57
|
raise ValueError(
|
|
57
|
-
f"
|
|
58
|
-
f"model '{self.model}'."
|
|
58
|
+
f"At least one conditioning variable is required for conditional "
|
|
59
|
+
f"luminosity function model '{self.model}'."
|
|
59
60
|
)
|
|
60
61
|
|
|
62
|
+
condition_arrays = tuple(
|
|
63
|
+
np.asarray(condition_value, dtype=float) for condition_value in conditions
|
|
64
|
+
)
|
|
65
|
+
|
|
61
66
|
return model_spec.function(
|
|
62
67
|
np.asarray(absolute_mag, dtype=float),
|
|
63
|
-
|
|
68
|
+
*condition_arrays,
|
|
64
69
|
**self.parameters_dict,
|
|
65
70
|
)
|
|
66
71
|
|
|
@@ -125,7 +130,8 @@ def _make_conditional_constructor(
|
|
|
125
130
|
|
|
126
131
|
Examples:
|
|
127
132
|
>>> clf = ConditionalLuminosityFunction.{model_name}(...)
|
|
128
|
-
>>> phi = clf.phi(
|
|
133
|
+
>>> phi = clf.phi(-20.0, 0.5)
|
|
134
|
+
>>> phi = clf.phi(-20.0, halo_mass, redshift)
|
|
129
135
|
"""
|
|
130
136
|
|
|
131
137
|
return constructor
|
|
@@ -138,8 +144,8 @@ def _parameters_from_signature(
|
|
|
138
144
|
) -> dict[str, Any]:
|
|
139
145
|
"""Build stored parameters from a function signature and user values.
|
|
140
146
|
|
|
141
|
-
Independent variables such as ``absolute_mag`` and
|
|
142
|
-
as model parameters. They are supplied later when calling
|
|
147
|
+
Independent variables such as ``absolute_mag`` and conditioning variables are
|
|
148
|
+
not stored as model parameters. They are supplied later when calling
|
|
143
149
|
:meth:`ConditionalLuminosityFunction.phi`.
|
|
144
150
|
|
|
145
151
|
Args:
|
|
@@ -156,8 +162,20 @@ def _parameters_from_signature(
|
|
|
156
162
|
"""
|
|
157
163
|
payload: dict[str, Any] = {}
|
|
158
164
|
|
|
165
|
+
independent_names = {
|
|
166
|
+
"absolute_mag",
|
|
167
|
+
"condition",
|
|
168
|
+
"conditions",
|
|
169
|
+
"z",
|
|
170
|
+
"redshift",
|
|
171
|
+
"x",
|
|
172
|
+
"halo_mass",
|
|
173
|
+
"environment",
|
|
174
|
+
"galaxy_type",
|
|
175
|
+
}
|
|
176
|
+
|
|
159
177
|
for name, parameter in signature.parameters.items():
|
|
160
|
-
if name in
|
|
178
|
+
if name in independent_names:
|
|
161
179
|
continue
|
|
162
180
|
|
|
163
181
|
if parameter.kind in {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"""Conditional luminosity function integration utilities.
|
|
2
2
|
|
|
3
3
|
This module provides numerical helpers for conditional luminosity functions of
|
|
4
|
-
the form ``Phi(M |
|
|
5
|
-
external conditioning
|
|
4
|
+
the form ``Phi(M | x_1, x_2, ...)``, where ``M`` is absolute magnitude and the
|
|
5
|
+
``x_i`` are external conditioning variables.
|
|
6
6
|
|
|
7
|
-
The conditioning
|
|
8
|
-
environment, galaxy type, richness, stellar mass, or any other
|
|
9
|
-
module does not implement HOD or halo-model machinery.
|
|
7
|
+
The conditioning variables are intentionally generic. They may represent halo
|
|
8
|
+
mass, redshift, environment, galaxy type, richness, stellar mass, or any other
|
|
9
|
+
quantities. This module does not implement HOD or halo-model machinery.
|
|
10
10
|
|
|
11
11
|
The goal is to support conditional luminosity function evaluation and
|
|
12
12
|
integration while keeping halo model calculations outside LFKit.
|
|
@@ -15,6 +15,7 @@ integration while keeping halo model calculations outside LFKit.
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
17
|
from collections.abc import Callable
|
|
18
|
+
from typing import Any
|
|
18
19
|
|
|
19
20
|
import numpy as np
|
|
20
21
|
|
|
@@ -28,31 +29,46 @@ __all__ = [
|
|
|
28
29
|
]
|
|
29
30
|
|
|
30
31
|
|
|
32
|
+
def _validate_conditions(conditions: tuple[FloatInput, ...]) -> tuple[FloatArray, ...]:
|
|
33
|
+
"""Return validated conditioning-variable arrays."""
|
|
34
|
+
if not conditions:
|
|
35
|
+
raise ValueError("At least one conditioning variable is required.")
|
|
36
|
+
|
|
37
|
+
return tuple(
|
|
38
|
+
validate_array(condition, name=f"condition_{i}")
|
|
39
|
+
for i, condition in enumerate(conditions)
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
31
43
|
def evaluate_conditional_luminosity_function(
|
|
32
44
|
absolute_mag: FloatInput,
|
|
33
|
-
|
|
34
|
-
conditional_lf: Callable[
|
|
45
|
+
*conditions: FloatInput,
|
|
46
|
+
conditional_lf: Callable[..., Any],
|
|
35
47
|
) -> FloatArray:
|
|
36
48
|
"""Evaluate a conditional luminosity function.
|
|
37
49
|
|
|
38
50
|
Args:
|
|
39
51
|
absolute_mag: Absolute magnitude values.
|
|
40
|
-
|
|
41
|
-
conditional_lf: Callable returning ``Phi(M |
|
|
42
|
-
magnitude ``M`` and
|
|
52
|
+
*conditions: Values of one or more conditioning variables.
|
|
53
|
+
conditional_lf: Callable returning ``Phi(M | x_1, x_2, ...)`` for
|
|
54
|
+
absolute magnitude ``M`` and the supplied conditioning variables.
|
|
43
55
|
|
|
44
56
|
Returns:
|
|
45
57
|
Conditional luminosity function values evaluated at the requested
|
|
46
58
|
absolute magnitudes and conditioning values.
|
|
47
59
|
|
|
48
60
|
Raises:
|
|
49
|
-
ValueError: If
|
|
50
|
-
|
|
61
|
+
ValueError: If no conditioning variables are supplied, if the inputs
|
|
62
|
+
contain non-finite values, or if the evaluated conditional luminosity
|
|
63
|
+
function contains non-finite or negative values.
|
|
51
64
|
"""
|
|
52
65
|
absolute_mag_arr = validate_array(absolute_mag, name="absolute_mag")
|
|
53
|
-
|
|
66
|
+
condition_arrays = _validate_conditions(conditions)
|
|
54
67
|
|
|
55
|
-
phi = np.asarray(
|
|
68
|
+
phi = np.asarray(
|
|
69
|
+
conditional_lf(absolute_mag_arr, *condition_arrays),
|
|
70
|
+
dtype=float,
|
|
71
|
+
)
|
|
56
72
|
|
|
57
73
|
if not np.all(np.isfinite(phi)):
|
|
58
74
|
raise ValueError("conditional_lf returned NaN or infinite values.")
|
|
@@ -67,32 +83,32 @@ def evaluate_conditional_luminosity_function(
|
|
|
67
83
|
|
|
68
84
|
def integrate_conditional_luminosity_function(
|
|
69
85
|
absolute_mag: FloatInput,
|
|
70
|
-
|
|
71
|
-
conditional_lf: Callable[
|
|
72
|
-
*,
|
|
86
|
+
*conditions: FloatInput,
|
|
87
|
+
conditional_lf: Callable[..., Any],
|
|
73
88
|
axis: int = -1,
|
|
74
89
|
) -> FloatArray:
|
|
75
90
|
"""Integrate a conditional luminosity function over absolute magnitude.
|
|
76
91
|
|
|
77
92
|
Args:
|
|
78
93
|
absolute_mag: Absolute magnitude grid.
|
|
79
|
-
|
|
80
|
-
conditional_lf: Callable returning ``Phi(M |
|
|
81
|
-
magnitude ``M`` and
|
|
94
|
+
*conditions: Values of one or more conditioning variables.
|
|
95
|
+
conditional_lf: Callable returning ``Phi(M | x_1, x_2, ...)`` for
|
|
96
|
+
absolute magnitude ``M`` and the supplied conditioning variables.
|
|
82
97
|
axis: Axis corresponding to the absolute magnitude grid.
|
|
83
98
|
|
|
84
99
|
Returns:
|
|
85
100
|
Conditional luminosity function integrated over absolute magnitude.
|
|
86
101
|
|
|
87
102
|
Raises:
|
|
88
|
-
ValueError: If
|
|
89
|
-
|
|
103
|
+
ValueError: If no conditioning variables are supplied, if the inputs
|
|
104
|
+
contain non-finite values, or if the evaluated conditional luminosity
|
|
105
|
+
function contains non-finite or negative values.
|
|
90
106
|
"""
|
|
91
107
|
absolute_mag_arr = validate_array(absolute_mag, name="absolute_mag")
|
|
92
108
|
|
|
93
109
|
phi = evaluate_conditional_luminosity_function(
|
|
94
|
-
|
|
95
|
-
|
|
110
|
+
absolute_mag_arr,
|
|
111
|
+
*conditions,
|
|
96
112
|
conditional_lf=conditional_lf,
|
|
97
113
|
)
|
|
98
114
|
|
|
@@ -104,21 +120,20 @@ def integrate_conditional_luminosity_function(
|
|
|
104
120
|
|
|
105
121
|
def integrate_weighted_conditional_luminosity_function(
|
|
106
122
|
absolute_mag: FloatInput,
|
|
107
|
-
|
|
108
|
-
conditional_lf: Callable[
|
|
109
|
-
weight: Callable[
|
|
110
|
-
*,
|
|
123
|
+
*conditions: FloatInput,
|
|
124
|
+
conditional_lf: Callable[..., Any],
|
|
125
|
+
weight: Callable[..., Any],
|
|
111
126
|
axis: int = -1,
|
|
112
127
|
) -> FloatArray:
|
|
113
128
|
"""Integrate a weighted conditional luminosity function.
|
|
114
129
|
|
|
115
130
|
Args:
|
|
116
131
|
absolute_mag: Absolute magnitude grid.
|
|
117
|
-
|
|
118
|
-
conditional_lf: Callable returning ``Phi(M |
|
|
119
|
-
magnitude ``M`` and
|
|
120
|
-
weight: Callable returning weights ``w(M,
|
|
121
|
-
``M`` and
|
|
132
|
+
*conditions: Values of one or more conditioning variables.
|
|
133
|
+
conditional_lf: Callable returning ``Phi(M | x_1, x_2, ...)`` for
|
|
134
|
+
absolute magnitude ``M`` and the supplied conditioning variables.
|
|
135
|
+
weight: Callable returning weights ``w(M, x_1, x_2, ...)`` for absolute
|
|
136
|
+
magnitude ``M`` and the supplied conditioning variables.
|
|
122
137
|
axis: Axis corresponding to the absolute magnitude grid.
|
|
123
138
|
|
|
124
139
|
Returns:
|
|
@@ -126,20 +141,24 @@ def integrate_weighted_conditional_luminosity_function(
|
|
|
126
141
|
magnitude.
|
|
127
142
|
|
|
128
143
|
Raises:
|
|
129
|
-
ValueError: If
|
|
130
|
-
|
|
131
|
-
or if the weights
|
|
144
|
+
ValueError: If no conditioning variables are supplied, if the inputs
|
|
145
|
+
contain non-finite values, if the evaluated conditional luminosity
|
|
146
|
+
function contains non-finite or negative values, or if the weights
|
|
147
|
+
contain non-finite values.
|
|
132
148
|
"""
|
|
133
149
|
absolute_mag_arr = validate_array(absolute_mag, name="absolute_mag")
|
|
134
|
-
|
|
150
|
+
condition_arrays = _validate_conditions(conditions)
|
|
135
151
|
|
|
136
152
|
phi = evaluate_conditional_luminosity_function(
|
|
137
|
-
|
|
138
|
-
|
|
153
|
+
absolute_mag_arr,
|
|
154
|
+
*condition_arrays,
|
|
139
155
|
conditional_lf=conditional_lf,
|
|
140
156
|
)
|
|
141
157
|
|
|
142
|
-
weight_arr = np.asarray(
|
|
158
|
+
weight_arr = np.asarray(
|
|
159
|
+
weight(absolute_mag_arr, *condition_arrays),
|
|
160
|
+
dtype=float,
|
|
161
|
+
)
|
|
143
162
|
|
|
144
163
|
if not np.all(np.isfinite(weight_arr)):
|
|
145
164
|
raise ValueError("weight returned NaN or infinite values.")
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
This module provides generic conditional wrappers around LFKit luminosity
|
|
4
4
|
function models.
|
|
5
5
|
|
|
6
|
-
A conditional luminosity function has the form ``Phi(M |
|
|
7
|
-
absolute magnitude and ``
|
|
8
|
-
model parameters are evaluated at
|
|
9
|
-
is evaluated.
|
|
6
|
+
A conditional luminosity function has the form ``Phi(M | x_1, x_2, ...)``,
|
|
7
|
+
where ``M`` is absolute magnitude and the ``x_i`` are external conditioning
|
|
8
|
+
variables. Callable model parameters are evaluated at the supplied conditioning
|
|
9
|
+
variables before the wrapped luminosity function is evaluated.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
12
|
from __future__ import annotations
|
|
@@ -27,42 +27,64 @@ def conditionalize_lf_model(
|
|
|
27
27
|
) -> Callable[..., FloatArray]:
|
|
28
28
|
"""Return a conditional version of a luminosity function model.
|
|
29
29
|
|
|
30
|
-
Callable keyword arguments are interpreted as parameter models and evaluated
|
|
31
|
-
functions of
|
|
32
|
-
unchanged.
|
|
30
|
+
Callable keyword arguments are interpreted as parameter models and evaluated
|
|
31
|
+
as functions of the supplied conditioning variables. Non-callable keyword
|
|
32
|
+
arguments are passed through unchanged.
|
|
33
33
|
|
|
34
34
|
Args:
|
|
35
35
|
lf_model: Luminosity function model to wrap.
|
|
36
36
|
|
|
37
37
|
Returns:
|
|
38
38
|
Conditional luminosity function model with signature
|
|
39
|
-
``conditional_model(absolute_mag,
|
|
39
|
+
``conditional_model(absolute_mag, *conditions, **kwargs)``.
|
|
40
40
|
"""
|
|
41
41
|
|
|
42
42
|
@wraps(lf_model)
|
|
43
43
|
def conditional_model(
|
|
44
44
|
absolute_mag: FloatInput,
|
|
45
|
-
|
|
45
|
+
*conditions: FloatInput,
|
|
46
46
|
**kwargs: Any,
|
|
47
47
|
) -> FloatArray:
|
|
48
|
-
|
|
48
|
+
absolute_mag_arr = validate_array(absolute_mag, name="absolute_mag")
|
|
49
|
+
condition_arrays = _validate_conditions(conditions)
|
|
49
50
|
|
|
50
51
|
evaluated_kwargs: dict[str, Any] = {}
|
|
51
52
|
for name, value in kwargs.items():
|
|
52
53
|
if callable(value):
|
|
53
54
|
evaluated_kwargs[name] = validate_array(
|
|
54
|
-
value(
|
|
55
|
+
value(*condition_arrays),
|
|
55
56
|
name=name,
|
|
56
57
|
)
|
|
57
58
|
else:
|
|
58
59
|
evaluated_kwargs[name] = value
|
|
59
60
|
|
|
60
|
-
phi = lf_model(
|
|
61
|
+
phi = lf_model(absolute_mag_arr, **evaluated_kwargs)
|
|
61
62
|
return _validate_lf_output(phi, name=lf_model.__name__)
|
|
62
63
|
|
|
63
64
|
return conditional_model
|
|
64
65
|
|
|
65
66
|
|
|
67
|
+
def _validate_conditions(conditions: tuple[FloatInput, ...]) -> tuple[FloatArray, ...]:
|
|
68
|
+
"""Return validated conditioning variable arrays.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
conditions: Conditioning variable values.
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
Validated conditioning variable arrays.
|
|
75
|
+
|
|
76
|
+
Raises:
|
|
77
|
+
ValueError: If no conditioning variables are supplied.
|
|
78
|
+
"""
|
|
79
|
+
if not conditions:
|
|
80
|
+
raise ValueError("At least one conditioning variable is required.")
|
|
81
|
+
|
|
82
|
+
return tuple(
|
|
83
|
+
validate_array(condition, name=f"condition_{i}")
|
|
84
|
+
for i, condition in enumerate(conditions)
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
66
88
|
def _conditional_model_name(name: str) -> str:
|
|
67
89
|
"""Return the generated conditional wrapper name for a luminosity function model.
|
|
68
90
|
|
|
@@ -213,8 +213,8 @@ def double_schechter(
|
|
|
213
213
|
"""
|
|
214
214
|
absolute_mag = validate_array(absolute_mag, name="absolute_mag")
|
|
215
215
|
phi_star_arr = validate_array(phi_star, name="phi_star")
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
alpha_arr = validate_array(alpha, name="alpha")
|
|
217
|
+
beta_arr = validate_array(beta, name="beta")
|
|
218
218
|
|
|
219
219
|
if np.any(phi_star_arr == 0):
|
|
220
220
|
warnings.warn(
|
|
@@ -225,10 +225,10 @@ def double_schechter(
|
|
|
225
225
|
if np.any(phi_star_arr < 0):
|
|
226
226
|
raise ValueError("phi_star must be non-negative.")
|
|
227
227
|
|
|
228
|
-
if
|
|
228
|
+
if np.any(~np.isfinite(alpha_arr)):
|
|
229
229
|
raise ValueError("alpha must be finite.")
|
|
230
230
|
|
|
231
|
-
if
|
|
231
|
+
if np.any(~np.isfinite(beta_arr)):
|
|
232
232
|
raise ValueError("beta must be finite.")
|
|
233
233
|
|
|
234
234
|
x = luminosity_ratio(absolute_mag, m_star)
|
|
@@ -238,10 +238,10 @@ def double_schechter(
|
|
|
238
238
|
x_t = np.clip(x_t, 1e-300, None)
|
|
239
239
|
|
|
240
240
|
prefactor = 0.4 * np.log(10.0) * phi_star_arr
|
|
241
|
-
modifier = 1.0 + (x / x_t) **
|
|
241
|
+
modifier = 1.0 + (x / x_t) ** beta_arr
|
|
242
242
|
|
|
243
243
|
return np.asarray(
|
|
244
|
-
prefactor * x ** (
|
|
244
|
+
prefactor * x ** (alpha_arr + 1.0) * np.exp(-x) * modifier,
|
|
245
245
|
dtype=float,
|
|
246
246
|
)
|
|
247
247
|
|