bbf 0.7.1__tar.gz → 0.7.2__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 (73) hide show
  1. {bbf-0.7.1 → bbf-0.7.2}/PKG-INFO +16 -1
  2. {bbf-0.7.1 → bbf-0.7.2}/README.md +8 -0
  3. {bbf-0.7.1 → bbf-0.7.2}/bbf/atmosphere.py +20 -6
  4. {bbf-0.7.1 → bbf-0.7.2}/bbf/bspline/projector.py +9 -2
  5. bbf-0.7.2/bbf/data/palomar_extinction_eac4.dat +907 -0
  6. bbf-0.7.2/bbf/data/palomar_extinction_eac4_median.dat +907 -0
  7. bbf-0.7.2/bbf/data/palomar_extinction_merra2.dat +907 -0
  8. bbf-0.7.2/bbf/data/palomar_extinction_merra2_median.dat +907 -0
  9. {bbf-0.7.1 → bbf-0.7.2}/bbf/filterlib.py +55 -12
  10. {bbf-0.7.1 → bbf-0.7.2}/bbf/magsys.py +2 -2
  11. {bbf-0.7.1 → bbf-0.7.2}/bbf/snfilterset.py +7 -2
  12. {bbf-0.7.1 → bbf-0.7.2}/bbf/stellarlib/__init__.py +1 -1
  13. bbf-0.7.2/bbf/stellarlib/calspec.py +169 -0
  14. bbf-0.7.2/bbf/stellarlib/data/ngsl.parquet +0 -0
  15. {bbf-0.7.1 → bbf-0.7.2}/bbf/stellarlib/gaia.py +167 -10
  16. bbf-0.7.2/bbf/stellarlib/ngsl.py +48 -0
  17. {bbf-0.7.1 → bbf-0.7.2}/bbf/stellarlib/stellarlib.py +184 -9
  18. bbf-0.7.2/docs/api.rst +176 -0
  19. bbf-0.7.2/docs/audit/audit_request.md +718 -0
  20. bbf-0.7.2/docs/audit/audit_results_and_recommendations.md +617 -0
  21. bbf-0.7.2/docs/audit/bbf_szf_20260924.md +377 -0
  22. bbf-0.7.2/docs/audit/bug_fix_plan.md +455 -0
  23. bbf-0.7.2/docs/audit/rd_architecture_plan.md +172 -0
  24. bbf-0.7.2/docs/audit/testing_plan.md +258 -0
  25. bbf-0.7.2/docs/changelog.md +5 -0
  26. bbf-0.7.2/docs/conf.py +102 -0
  27. bbf-0.7.2/docs/index.md +14 -0
  28. {bbf-0.7.1 → bbf-0.7.2}/pixi.lock +17048 -8547
  29. {bbf-0.7.1 → bbf-0.7.2}/pyproject.toml +33 -3
  30. bbf-0.7.2/tests/test_atmosphere.py +153 -0
  31. bbf-0.7.2/tests/test_audit_seb.py +204 -0
  32. bbf-0.7.2/tests/test_bspline_derivatives.py +116 -0
  33. bbf-0.7.2/tests/test_direct_integration.py +86 -0
  34. bbf-0.7.2/tests/test_filterlib.py +353 -0
  35. bbf-0.7.2/tests/test_magsys_ab_self_consistency.py +147 -0
  36. bbf-0.7.2/tests/test_snfilterset.py +48 -0
  37. bbf-0.7.2/tests/test_stellarlib.py +467 -0
  38. bbf-0.7.1/bbf/data/palomar_extinction_eac4.dat +0 -907
  39. bbf-0.7.1/bbf/data/palomar_extinction_merra2.dat +0 -907
  40. bbf-0.7.1/bbf/stellarlib/calspec.py +0 -125
  41. bbf-0.7.1/tests/snls.py +0 -122
  42. bbf-0.7.1/tests/test_atmosphere.py +0 -57
  43. bbf-0.7.1/tests/test_filterlib.py +0 -91
  44. bbf-0.7.1/tests/test_stellarlib.py +0 -67
  45. {bbf-0.7.1 → bbf-0.7.2}/CHANGELOG.md +0 -0
  46. {bbf-0.7.1 → bbf-0.7.2}/CMakeLists.txt +0 -0
  47. {bbf-0.7.1 → bbf-0.7.2}/LICENSE +0 -0
  48. {bbf-0.7.1 → bbf-0.7.2}/bbf/__init__.py +0 -0
  49. {bbf-0.7.1 → bbf-0.7.2}/bbf/bspline/__init__.py +0 -0
  50. {bbf-0.7.1 → bbf-0.7.2}/bbf/bspline/bspline.py +0 -0
  51. {bbf-0.7.1 → bbf-0.7.2}/bbf/bspline/bspline2d.py +0 -0
  52. {bbf-0.7.1 → bbf-0.7.2}/bbf/bspline/cardinal_bspline.py +0 -0
  53. {bbf-0.7.1 → bbf-0.7.2}/bbf/bspline/cardinal_bspline2d.py +0 -0
  54. {bbf-0.7.1 → bbf-0.7.2}/bbf/bspline/src/bspline.hpp +0 -0
  55. {bbf-0.7.1 → bbf-0.7.2}/bbf/bspline/src/bspline_ext.cpp +0 -0
  56. {bbf-0.7.1 → bbf-0.7.2}/bbf/bspline/utils.py +0 -0
  57. {bbf-0.7.1 → bbf-0.7.2}/bbf/cache.py +0 -0
  58. {bbf-0.7.1 → bbf-0.7.2}/bbf/data/Buton_Atmo.dat +0 -0
  59. {bbf-0.7.1 → bbf-0.7.2}/bbf/data/SNIFS_extinction.fits +0 -0
  60. {bbf-0.7.1 → bbf-0.7.2}/bbf/filterset.py +0 -0
  61. {bbf-0.7.1 → bbf-0.7.2}/bbf/sncosmoutils.py +0 -0
  62. {bbf-0.7.1 → bbf-0.7.2}/bbf/stellarlib/data/pickles.parquet +0 -0
  63. {bbf-0.7.1 → bbf-0.7.2}/bbf/stellarlib/data/snfactory.parquet +0 -0
  64. {bbf-0.7.1 → bbf-0.7.2}/bbf/stellarlib/pickles.py +0 -0
  65. {bbf-0.7.1 → bbf-0.7.2}/bbf/stellarlib/snfactory.py +0 -0
  66. {bbf-0.7.1 → bbf-0.7.2}/bbf/utils.py +0 -0
  67. {bbf-0.7.1 → bbf-0.7.2}/tests/conftest.py +0 -0
  68. {bbf-0.7.1 → bbf-0.7.2}/tests/test_bspline_1d.py +0 -0
  69. {bbf-0.7.1 → bbf-0.7.2}/tests/test_bspline_2d.py +0 -0
  70. {bbf-0.7.1 → bbf-0.7.2}/tests/test_cardinal_bspline.py +0 -0
  71. {bbf-0.7.1 → bbf-0.7.2}/tests/test_compare_sncosmo.py +0 -0
  72. {bbf-0.7.1 → bbf-0.7.2}/tests/test_sncosmoutils.py +0 -0
  73. {bbf-0.7.1 → bbf-0.7.2}/tests/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bbf
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: Fast computation of broadband fluxes and magnitudes
5
5
  Keywords: astronomy,astrophysics
6
6
  Author-Email: Nicolas Regnault <nicolas.regnault@lpnhe.in2p3.fr>
@@ -28,10 +28,17 @@ Requires-Dist: scikit-sparse<0.5
28
28
  Requires-Dist: scipy>=1.14
29
29
  Requires-Dist: sncosmo>=2.12
30
30
  Requires-Dist: gaiahealpixcache>=0.4.0
31
+ Provides-Extra: hdf5
32
+ Requires-Dist: tables; extra == "hdf5"
31
33
  Provides-Extra: test
32
34
  Requires-Dist: pytest>=6.0; extra == "test"
33
35
  Requires-Dist: pytest-cov; extra == "test"
34
36
  Requires-Dist: lemaitre-bandpasses>=0.4; extra == "test"
37
+ Requires-Dist: tables; extra == "test"
38
+ Provides-Extra: docs
39
+ Requires-Dist: sphinx>=7.0; extra == "docs"
40
+ Requires-Dist: myst-parser>=2.0; extra == "docs"
41
+ Requires-Dist: furo; extra == "docs"
35
42
  Description-Content-Type: text/markdown
36
43
 
37
44
  # Broadband fluxes (`bbf`)
@@ -116,6 +123,14 @@ To work on the sources and, e.g. run the tests locally:
116
123
  VERBOSE=1 pip install --no-build-isolation -Ceditable.rebuild=true -ve .
117
124
  ```
118
125
 
126
+ To build the documentation locally (API reference generated from the docstrings, plus
127
+ this README and the `docs/audit` pages):
128
+
129
+ ```bash
130
+ pixi run -e docs docs
131
+ # open docs/_build/html/index.html
132
+ ```
133
+
119
134
 
120
135
  ## Installing the Lemaitre bandpasses
121
136
 
@@ -80,6 +80,14 @@ To work on the sources and, e.g. run the tests locally:
80
80
  VERBOSE=1 pip install --no-build-isolation -Ceditable.rebuild=true -ve .
81
81
  ```
82
82
 
83
+ To build the documentation locally (API reference generated from the docstrings, plus
84
+ this README and the `docs/audit` pages):
85
+
86
+ ```bash
87
+ pixi run -e docs docs
88
+ # open docs/_build/html/index.html
89
+ ```
90
+
83
91
 
84
92
  ## Installing the Lemaitre bandpasses
85
93
 
@@ -151,22 +151,36 @@ def get_airmass_extinction(source="palomar"):
151
151
  )
152
152
  return spec
153
153
 
154
- if source.lower() == "palomareac4":
154
+ if source.lower() == "palomareac4median":
155
155
  lbda, data = pd.read_csv(
156
156
  importlib.resources.files(__package__)
157
157
  / "data"
158
- / "palomar_extinction_eac4.dat"
158
+ / "palomar_extinction_eac4_median.dat"
159
159
  ).values.T
160
- spec = ExtinctionSpectrum(lbda, data, "EAC4 average 2017-2025")
160
+ spec = ExtinctionSpectrum(lbda, data, "EAC4 median 2017-2025")
161
161
  return spec
162
162
 
163
- if source.lower() == "palomarmerra2":
163
+ if source.lower() == "palomarmerra2median":
164
164
  lbda, data = pd.read_csv(
165
165
  importlib.resources.files(__package__)
166
166
  / "data"
167
- / "palomar_extinction_merra2.dat"
167
+ / "palomar_extinction_merra2_median.dat"
168
168
  ).values.T
169
- spec = ExtinctionSpectrum(lbda, data, "MERRA2 average 2017-2025")
169
+ spec = ExtinctionSpectrum(lbda, data, "MERRA2 median 2017-2025")
170
+ return spec
171
+
172
+ if source.lower() == "palomareac4":
173
+ lbda, data = pd.read_csv(
174
+ importlib.resources.files(__package__) / 'data' / 'palomar_extinction_eac4.dat').values.T
175
+ spec = ExtinctionSpectrum(lbda, data,
176
+ "EAC4 average DR2.5")
177
+ return spec
178
+
179
+ if source.lower() == "palomarmerra2":
180
+ lbda, data = pd.read_csv(
181
+ importlib.resources.files(__package__) / 'data' / 'palomar_extinction_merra2.dat').values.T
182
+ spec = ExtinctionSpectrum(lbda, data,
183
+ "MERRA2 average DR2.5")
170
184
  return spec
171
185
 
172
186
  if source.lower() == "buton":
@@ -30,9 +30,16 @@ class Projector:
30
30
 
31
31
  self._factor, self._J = self._get_projector(self._grid)
32
32
 
33
- def _get_projector(self, x):
33
+ def _get_projector(self, x, beta=1.0e-6):
34
+ # beta=1e-6: matches every other cholesky_AAt call site in the codebase
35
+ # (docs/bug_fix_plan.md B-9). Without it, a dataset that does not fully
36
+ # cover the basis (any basis function untouched by any sample point) makes
37
+ # the Gram matrix exactly rank-deficient and this raised
38
+ # sksparse.cholmod.CholmodNotPositiveDefiniteError outright, unlike the
39
+ # one_by_one/BSpline.linear_fit projection path (also beta=1e-6), which
40
+ # degrades gracefully instead.
34
41
  J = self.basis.eval(x).tocsr()
35
- factor = sksparse.cholmod.cholesky_AAt(J.T)
42
+ factor = sksparse.cholmod.cholesky_AAt(J.T, beta=beta)
36
43
  return factor, J
37
44
 
38
45
  def _compatible_arrays(self, y, x):