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.
Files changed (249) hide show
  1. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/PKG-INFO +1 -1
  2. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/conditional_luminosity_function.rst +3 -1
  3. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/_version.py +3 -3
  4. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/api/conditional_luminosity_function.py +36 -18
  5. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/conditional_integrals.py +59 -40
  6. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/conditional_models.py +34 -12
  7. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/schechter.py +6 -6
  8. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/py_lfkit.egg-info/PKG-INFO +1 -1
  9. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_api_conditional_luminosity_function.py +139 -62
  10. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_conditional_integrals.py +42 -42
  11. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_conditional_models.py +43 -44
  12. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_schechter.py +5 -5
  13. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/.github/workflows/ci.yml +0 -0
  14. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/.github/workflows/docs.yml +0 -0
  15. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/.github/workflows/publish.yml +0 -0
  16. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/.gitignore +0 -0
  17. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/CITATION.cff +0 -0
  18. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/LICENSE +0 -0
  19. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/MANIFEST.in +0 -0
  20. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/README.md +0 -0
  21. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/Makefile +0 -0
  22. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_static/custom.css +0 -0
  23. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_static/logos/lfkit_logo-icon.png +0 -0
  24. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_static/logos/lfkit_logo.pdf +0 -0
  25. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_static/logos/lfkit_logo.png +0 -0
  26. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_static/logos/lfkit_logo.svg +0 -0
  27. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_templates/pages_redirect.html +0 -0
  28. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/_templates/sidebar/brand.html +0 -0
  29. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/about/corrections_overview.rst +0 -0
  30. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/about/index.rst +0 -0
  31. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/about/photometry_overview.rst +0 -0
  32. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/api/index.rst +0 -0
  33. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/citation.rst +0 -0
  34. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/conf.py +0 -0
  35. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/contributing.rst +0 -0
  36. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/catalog_completeness.rst +0 -0
  37. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/index.rst +0 -0
  38. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/kcorrect_examples.rst +0 -0
  39. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/composite_models.rst +0 -0
  40. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/gaussian_models.rst +0 -0
  41. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/index.rst +0 -0
  42. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/model_registry.rst +0 -0
  43. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/power_law_models.rst +0 -0
  44. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/lf_models/schechter_models.rst +0 -0
  45. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/magnitude_integrals.rst +0 -0
  46. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/magnitudes_and_luminosities.rst +0 -0
  47. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/poggianti_examples.rst +0 -0
  48. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/examples/redshift_density.rst +0 -0
  49. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/index.rst +0 -0
  50. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/installation.rst +0 -0
  51. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/license.rst +0 -0
  52. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/docs/make.bat +0 -0
  53. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/lfkit_github_banner.png +0 -0
  54. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/lfkit_logo-icon.png +0 -0
  55. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/lfkit_logo.pdf +0 -0
  56. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/lfkit_logo.png +0 -0
  57. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/lfkit_logo.svg +0 -0
  58. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/make_gh_banner.py +0 -0
  59. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/logo/make_logo.py +0 -0
  60. {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
  61. {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
  62. {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
  63. {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
  64. {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
  65. {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
  66. {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
  67. {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
  68. {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
  69. {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
  70. {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
  71. {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
  72. {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
  73. {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
  74. {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
  75. {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
  76. {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
  77. {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
  78. {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
  79. {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
  80. {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
  81. {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
  82. {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
  83. {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
  84. {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
  85. {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
  86. {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
  87. {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
  88. {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
  89. {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
  90. {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
  91. {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
  92. {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
  93. {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
  94. {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
  95. {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
  96. {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
  97. {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
  98. {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
  99. {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
  100. {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
  101. {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
  102. {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
  103. {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
  104. {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
  105. {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
  106. {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
  107. {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
  108. {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
  109. {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
  110. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_E.pdf +0 -0
  111. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_E2.pdf +0 -0
  112. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_Sa.pdf +0 -0
  113. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_B_type_Sc.pdf +0 -0
  114. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_E.pdf +0 -0
  115. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_E2.pdf +0 -0
  116. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_Sa.pdf +0 -0
  117. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_H_type_Sc.pdf +0 -0
  118. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_E.pdf +0 -0
  119. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_E2.pdf +0 -0
  120. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_Sa.pdf +0 -0
  121. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_I_type_Sc.pdf +0 -0
  122. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_Ic_type_E.pdf +0 -0
  123. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_Ic_type_Sc.pdf +0 -0
  124. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_E.pdf +0 -0
  125. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_E2.pdf +0 -0
  126. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_Sa.pdf +0 -0
  127. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_J_type_Sc.pdf +0 -0
  128. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_E.pdf +0 -0
  129. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_E2.pdf +0 -0
  130. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_Sa.pdf +0 -0
  131. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_K_type_Sc.pdf +0 -0
  132. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_E.pdf +0 -0
  133. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_E2.pdf +0 -0
  134. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_Sa.pdf +0 -0
  135. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_R_type_Sc.pdf +0 -0
  136. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_Rc_type_E.pdf +0 -0
  137. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_Rc_type_Sc.pdf +0 -0
  138. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_E.pdf +0 -0
  139. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_E2.pdf +0 -0
  140. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_Sa.pdf +0 -0
  141. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_U_type_Sc.pdf +0 -0
  142. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_E.pdf +0 -0
  143. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_E2.pdf +0 -0
  144. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_Sa.pdf +0 -0
  145. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_V_type_Sc.pdf +0 -0
  146. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_E.pdf +0 -0
  147. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_E2.pdf +0 -0
  148. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_Sa.pdf +0 -0
  149. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/output/plots/poggianti1997/ke_pogg1997_band_g_type_Sc.pdf +0 -0
  150. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/pyproject.toml +0 -0
  151. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/scripts/compare_kcorr_surveys.py +0 -0
  152. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/scripts/compare_poggianti_to_kcorrect.py +0 -0
  153. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/scripts/make_fake_magnitude_limited_catalog.py +0 -0
  154. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/scripts/plot_poggianti1997_corrections.py +0 -0
  155. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/setup.cfg +0 -0
  156. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/__init__.py +0 -0
  157. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/api/__init__.py +0 -0
  158. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/api/_namespaces.py +0 -0
  159. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/api/corrections.py +0 -0
  160. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/api/luminosity_function.py +0 -0
  161. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/__init__.py +0 -0
  162. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/color_anchors.py +0 -0
  163. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/filters.py +0 -0
  164. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/kcorrect_backend.py +0 -0
  165. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/kcorrect_from_color.py +0 -0
  166. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/kcorrect_grids.py +0 -0
  167. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/poggianti1997.py +0 -0
  168. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/corrections/responses.py +0 -0
  169. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/cosmo/__init__.py +0 -0
  170. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/cosmo/cosmology.py +0 -0
  171. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/demo_catalogs/fake_magnitude_limited_catalog.csv +0 -0
  172. {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
  173. {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
  174. {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
  175. {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
  176. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/__init__.py +0 -0
  177. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/ecorr.csv +0 -0
  178. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/filters.csv +0 -0
  179. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/kcorr.csv +0 -0
  180. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/kcorrv.csv +0 -0
  181. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/data/poggianti1997/sed.csv +0 -0
  182. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/__init__.py +0 -0
  183. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/_discovery.py +0 -0
  184. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/completeness.py +0 -0
  185. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/integrals.py +0 -0
  186. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/__init__.py +0 -0
  187. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/composite.py +0 -0
  188. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/gamma.py +0 -0
  189. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/gaussian.py +0 -0
  190. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/modifiers.py +0 -0
  191. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/non_parametric.py +0 -0
  192. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/power_law.py +0 -0
  193. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/models/saunders.py +0 -0
  194. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/parameter_models.py +0 -0
  195. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/redshift_density.py +0 -0
  196. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/luminosity_functions/registry.py +0 -0
  197. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/photometry/__init__.py +0 -0
  198. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/photometry/luminosities.py +0 -0
  199. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/photometry/magnitudes.py +0 -0
  200. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/__init__.py +0 -0
  201. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/download_poggianti97_data.py +0 -0
  202. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/evaluators.py +0 -0
  203. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/integrators.py +0 -0
  204. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/interpolation.py +0 -0
  205. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/io.py +0 -0
  206. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/types.py +0 -0
  207. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/units.py +0 -0
  208. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/lfkit/utils/validators.py +0 -0
  209. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/py_lfkit.egg-info/SOURCES.txt +0 -0
  210. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/py_lfkit.egg-info/dependency_links.txt +0 -0
  211. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/py_lfkit.egg-info/requires.txt +0 -0
  212. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/src/py_lfkit.egg-info/top_level.txt +0 -0
  213. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/benchmarks/test_cacciato_clf_reference.py +0 -0
  214. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/benchmarks/test_cacciato_hod_reference.py +0 -0
  215. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_api_corrections.py +0 -0
  216. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_api_luminosity_function.py +0 -0
  217. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_api_namespaces.py +0 -0
  218. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_color_anchors.py +0 -0
  219. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_filters.py +0 -0
  220. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_kcorrect_backend.py +0 -0
  221. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_kcorrect_from_color.py +0 -0
  222. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_kcorrrect_grids.py +0 -0
  223. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_poggianti1997.py +0 -0
  224. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_corrections_responses.py +0 -0
  225. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_cosmo_cosmology.py +0 -0
  226. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_completeness.py +0 -0
  227. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_completeness_fake_catalog.py +0 -0
  228. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_discovery.py +0 -0
  229. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_integrals.py +0 -0
  230. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_composite.py +0 -0
  231. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_gamma.py +0 -0
  232. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_gaussian.py +0 -0
  233. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_modifiers.py +0 -0
  234. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_non_parametric.py +0 -0
  235. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_power_law.py +0 -0
  236. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_models_saunders.py +0 -0
  237. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_parameter_models.py +0 -0
  238. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_redshift_density.py +0 -0
  239. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_lumfuncs_registry.py +0 -0
  240. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_photometry_luminosities.py +0 -0
  241. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_photometry_magnitudes.py +0 -0
  242. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_download_pogg97_data.py +0 -0
  243. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_evaluators.py +0 -0
  244. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_integrators.py +0 -0
  245. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_interpolation.py +0 -0
  246. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_io.py +0 -0
  247. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_types.py +0 -0
  248. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_units.py +0 -0
  249. {py_lfkit-0.4.0 → py_lfkit-0.5.0}/tests/test_utils_validators.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-lfkit
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Luminosity functions and photometric corrections toolkit.
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -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.schechter(
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.4.0'
22
- __version_tuple__ = version_tuple = (0, 4, 0)
21
+ __version__ = version = '0.5.0'
22
+ __version_tuple__ = version_tuple = (0, 5, 0)
23
23
 
24
- __commit_id__ = commit_id = 'g2dc465b25'
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 | x)``, where ``M`` is
25
- absolute magnitude and ``x`` is an external conditioning variable such as
26
- redshift, halo mass, environment, richness, stellar mass, or another
27
- model-specific quantity.
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
- condition: FloatInput | None = None,
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
- condition: Conditioning variable value or array. The meaning of this
43
- variable depends on the selected conditional luminosity function model.
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
- ``condition``.
48
+ the supplied conditioning variables.
48
49
 
49
50
  Raises:
50
- ValueError: If ``condition`` is not provided or the model is not registered
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 condition is None:
56
+ if not conditions:
56
57
  raise ValueError(
57
- f"condition is required for conditional luminosity function "
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
- np.asarray(condition, dtype=float),
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(absolute_mag=-20.0, condition=0.5)
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 ``condition`` are not stored
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 {"absolute_mag", "condition", "z", "redshift", "x"}:
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 | x)``, where ``M`` is absolute magnitude and ``x`` is an
5
- external conditioning variable.
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 variable is intentionally generic. It may represent halo mass,
8
- environment, galaxy type, richness, stellar mass, or any other quantity. This
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
- condition: FloatInput,
34
- conditional_lf: Callable[[FloatArray, FloatArray], FloatArray],
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
- condition: Values of the conditioning variable.
41
- conditional_lf: Callable returning ``Phi(M | x)`` for absolute
42
- magnitude ``M`` and condition ``x``.
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 the inputs contain non-finite values, or if the evaluated
50
- conditional luminosity function contains non-finite or negative values.
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
- condition_arr = validate_array(condition, name="condition")
66
+ condition_arrays = _validate_conditions(conditions)
54
67
 
55
- phi = np.asarray(conditional_lf(absolute_mag_arr, condition_arr), dtype=float)
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
- condition: FloatInput,
71
- conditional_lf: Callable[[FloatArray, FloatArray], FloatArray],
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
- condition: Values of the conditioning variable.
80
- conditional_lf: Callable returning ``Phi(M | x)`` for absolute
81
- magnitude ``M`` and condition ``x``.
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 the inputs contain non-finite values, or if the evaluated
89
- conditional luminosity function contains non-finite or negative values.
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
- absolute_mag=absolute_mag_arr,
95
- condition=condition,
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
- condition: FloatInput,
108
- conditional_lf: Callable[[FloatArray, FloatArray], FloatArray],
109
- weight: Callable[[FloatArray, FloatArray], FloatArray],
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
- condition: Values of the conditioning variable.
118
- conditional_lf: Callable returning ``Phi(M | x)`` for absolute
119
- magnitude ``M`` and condition ``x``.
120
- weight: Callable returning weights ``w(M, x)`` for absolute magnitude
121
- ``M`` and condition ``x``.
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 the inputs contain non-finite values, if the evaluated
130
- conditional luminosity function contains non-finite or negative values,
131
- or if the weights contain non-finite values.
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
- condition_arr = validate_array(condition, name="condition")
150
+ condition_arrays = _validate_conditions(conditions)
135
151
 
136
152
  phi = evaluate_conditional_luminosity_function(
137
- absolute_mag=absolute_mag_arr,
138
- condition=condition_arr,
153
+ absolute_mag_arr,
154
+ *condition_arrays,
139
155
  conditional_lf=conditional_lf,
140
156
  )
141
157
 
142
- weight_arr = np.asarray(weight(absolute_mag_arr, condition_arr), dtype=float)
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 | x)``, where ``M`` is
7
- absolute magnitude and ``x`` is an external conditioning variable. Callable
8
- model parameters are evaluated at ``x`` before the wrapped luminosity function
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 as
31
- functions of ``condition``. Non-callable keyword arguments are passed through
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, condition, **kwargs)``.
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
- condition: FloatInput,
45
+ *conditions: FloatInput,
46
46
  **kwargs: Any,
47
47
  ) -> FloatArray:
48
- condition_arr = validate_array(condition, name="condition")
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(condition_arr),
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(absolute_mag, **evaluated_kwargs)
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
- alpha = float(alpha)
217
- beta = float(beta)
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 not np.isfinite(alpha):
228
+ if np.any(~np.isfinite(alpha_arr)):
229
229
  raise ValueError("alpha must be finite.")
230
230
 
231
- if not np.isfinite(beta):
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) ** beta
241
+ modifier = 1.0 + (x / x_t) ** beta_arr
242
242
 
243
243
  return np.asarray(
244
- prefactor * x ** (alpha + 1.0) * np.exp(-x) * modifier,
244
+ prefactor * x ** (alpha_arr + 1.0) * np.exp(-x) * modifier,
245
245
  dtype=float,
246
246
  )
247
247
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-lfkit
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Luminosity functions and photometric corrections toolkit.
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown