jaxspec 0.2.1.dev2__py3-none-any.whl → 0.2.2.dev0__py3-none-any.whl
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.
- jaxspec/analysis/results.py +10 -4
- jaxspec/model/additive.py +6 -3
- {jaxspec-0.2.1.dev2.dist-info → jaxspec-0.2.2.dev0.dist-info}/METADATA +31 -37
- {jaxspec-0.2.1.dev2.dist-info → jaxspec-0.2.2.dev0.dist-info}/RECORD +8 -8
- {jaxspec-0.2.1.dev2.dist-info → jaxspec-0.2.2.dev0.dist-info}/WHEEL +1 -1
- jaxspec-0.2.2.dev0.dist-info/entry_points.txt +2 -0
- jaxspec-0.2.1.dev2.dist-info/entry_points.txt +0 -3
- {jaxspec-0.2.1.dev2.dist-info → jaxspec-0.2.2.dev0.dist-info/licenses}/LICENSE.md +0 -0
jaxspec/analysis/results.py
CHANGED
|
@@ -140,9 +140,9 @@ class FitResult:
|
|
|
140
140
|
|
|
141
141
|
if len(total_shape) < len(input_parameters[f"{module}_{parameter}"].shape):
|
|
142
142
|
# If there are only chains and draws, we reduce
|
|
143
|
-
input_parameters[f"{module}_{parameter}"] =
|
|
144
|
-
f"{module}_{parameter}"
|
|
145
|
-
|
|
143
|
+
input_parameters[f"{module}_{parameter}"] = jnp.broadcast_to(
|
|
144
|
+
input_parameters[f"{module}_{parameter}"][..., 0], total_shape
|
|
145
|
+
)
|
|
146
146
|
|
|
147
147
|
else:
|
|
148
148
|
input_parameters[f"{module}_{parameter}"] = jnp.broadcast_to(
|
|
@@ -491,6 +491,9 @@ class FitResult:
|
|
|
491
491
|
alpha=0.7,
|
|
492
492
|
)
|
|
493
493
|
|
|
494
|
+
lowest_y = y_observed.min()
|
|
495
|
+
highest_y = y_observed.max()
|
|
496
|
+
|
|
494
497
|
legend_plots.append((true_data_plot,))
|
|
495
498
|
legend_labels.append("Observed")
|
|
496
499
|
legend_plots += model_plot
|
|
@@ -574,6 +577,9 @@ class FitResult:
|
|
|
574
577
|
alpha=0.7,
|
|
575
578
|
)
|
|
576
579
|
|
|
580
|
+
lowest_y = min(lowest_y, y_observed_bkg.min())
|
|
581
|
+
highest_y = max(highest_y, y_observed_bkg.max())
|
|
582
|
+
|
|
577
583
|
legend_plots.append((true_bkg_plot,))
|
|
578
584
|
legend_labels.append("Observed (bkg)")
|
|
579
585
|
legend_plots += model_bkg_plot
|
|
@@ -607,7 +613,7 @@ class FitResult:
|
|
|
607
613
|
ax[1].set_yticks(range(-3, 4), minor=True)
|
|
608
614
|
|
|
609
615
|
ax[0].set_xlim(xbins.value.min(), xbins.value.max())
|
|
610
|
-
|
|
616
|
+
ax[0].set_ylim(lowest_y.value * 0.8, highest_y.value * 1.2)
|
|
611
617
|
ax[0].legend(legend_plots, legend_labels)
|
|
612
618
|
|
|
613
619
|
match scale:
|
jaxspec/model/additive.py
CHANGED
|
@@ -227,12 +227,15 @@ class Diskbb(AdditiveComponent):
|
|
|
227
227
|
return e**2 * (kT / tin) ** (-2 / p - 1) / (jnp.exp(e / kT) - 1)
|
|
228
228
|
|
|
229
229
|
integral = integrate_interval(integrand)
|
|
230
|
+
norm = jnp.asarray(self.norm)
|
|
231
|
+
Tin = jnp.asarray(self.Tin)
|
|
232
|
+
|
|
230
233
|
return (
|
|
231
|
-
|
|
234
|
+
norm
|
|
232
235
|
* 2.78e-3
|
|
233
236
|
* (0.75 / p)
|
|
234
|
-
/
|
|
235
|
-
* jnp.vectorize(lambda e: integral(tout,
|
|
237
|
+
/ jnp.asarray(Tin)
|
|
238
|
+
* jnp.vectorize(lambda e: integral(tout, Tin, e, Tin, p))(energy)
|
|
236
239
|
)
|
|
237
240
|
|
|
238
241
|
|
|
@@ -1,42 +1,37 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: jaxspec
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2.dev0
|
|
4
4
|
Summary: jaxspec is a bayesian spectral fitting library for X-ray astronomy.
|
|
5
|
-
License: MIT
|
|
6
|
-
Author: sdupourque
|
|
7
|
-
Author-email: sdupourque@irap.omp.eu
|
|
8
|
-
Requires-Python: >=3.10,<3.13
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Requires-Dist: arviz (>=0.17.1,<0.21.0)
|
|
15
|
-
Requires-Dist: astropy (>=6.0.0,<7.0.0)
|
|
16
|
-
Requires-Dist: catppuccin (>=2.3.4,<3.0.0)
|
|
17
|
-
Requires-Dist: chainconsumer (>=1.1.2,<2.0.0)
|
|
18
|
-
Requires-Dist: cmasher (>=1.6.3,<2.0.0)
|
|
19
|
-
Requires-Dist: flax (>=0.10.1,<0.11.0)
|
|
20
|
-
Requires-Dist: interpax (>=0.3.3,<0.4.0)
|
|
21
|
-
Requires-Dist: jax (>=0.5.0,<0.6.0)
|
|
22
|
-
Requires-Dist: jaxns (>=2.6.7,<3.0.0)
|
|
23
|
-
Requires-Dist: jaxopt (>=0.8.1,<0.9.0)
|
|
24
|
-
Requires-Dist: matplotlib (>=3.8.0,<4.0.0)
|
|
25
|
-
Requires-Dist: mendeleev (>=0.15,<0.20)
|
|
26
|
-
Requires-Dist: networkx (>=3.1,<4.0)
|
|
27
|
-
Requires-Dist: numpy (<2.0.0)
|
|
28
|
-
Requires-Dist: numpyro (>=0.16.1,<0.17.0)
|
|
29
|
-
Requires-Dist: optimistix (>=0.0.7,<0.0.11)
|
|
30
|
-
Requires-Dist: pandas (>=2.2.0,<3.0.0)
|
|
31
|
-
Requires-Dist: pooch (>=1.8.2,<2.0.0)
|
|
32
|
-
Requires-Dist: scipy (<1.15)
|
|
33
|
-
Requires-Dist: seaborn (>=0.13.1,<0.14.0)
|
|
34
|
-
Requires-Dist: simpleeval (>=0.9.13,<1.1.0)
|
|
35
|
-
Requires-Dist: sparse (>=0.15.4,<0.16.0)
|
|
36
|
-
Requires-Dist: tinygp (>=0.3.0,<0.4.0)
|
|
37
|
-
Requires-Dist: watermark (>=2.4.3,<3.0.0)
|
|
38
|
-
Project-URL: Documentation, https://jaxspec.readthedocs.io/en/latest/
|
|
39
5
|
Project-URL: Homepage, https://github.com/renecotyfanboy/jaxspec
|
|
6
|
+
Project-URL: Documentation, https://jaxspec.readthedocs.io/en/latest/
|
|
7
|
+
Author-email: sdupourque <sdupourque@irap.omp.eu>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE.md
|
|
10
|
+
Requires-Python: <3.13,>=3.10
|
|
11
|
+
Requires-Dist: arviz<0.21.0,>=0.17.1
|
|
12
|
+
Requires-Dist: astropy<7,>=6.0.0
|
|
13
|
+
Requires-Dist: catppuccin<3,>=2.3.4
|
|
14
|
+
Requires-Dist: chainconsumer<2,>=1.1.2
|
|
15
|
+
Requires-Dist: cmasher<2,>=1.6.3
|
|
16
|
+
Requires-Dist: flax<0.11,>=0.10.3
|
|
17
|
+
Requires-Dist: interpax<0.4,>=0.3.5
|
|
18
|
+
Requires-Dist: jax<0.6,>=0.5.0
|
|
19
|
+
Requires-Dist: jaxns<3,>=2.6.7
|
|
20
|
+
Requires-Dist: jaxopt<0.9,>=0.8.3
|
|
21
|
+
Requires-Dist: matplotlib<4,>=3.8.0
|
|
22
|
+
Requires-Dist: mendeleev<0.20,>=0.15
|
|
23
|
+
Requires-Dist: networkx~=3.1
|
|
24
|
+
Requires-Dist: numpy<2.0.0
|
|
25
|
+
Requires-Dist: numpyro<0.18,>=0.17.0
|
|
26
|
+
Requires-Dist: optimistix<0.0.11,>=0.0.10
|
|
27
|
+
Requires-Dist: pandas<3,>=2.2.0
|
|
28
|
+
Requires-Dist: pooch<2,>=1.8.2
|
|
29
|
+
Requires-Dist: scipy<1.15
|
|
30
|
+
Requires-Dist: seaborn<0.14,>=0.13.1
|
|
31
|
+
Requires-Dist: simpleeval<1.1.0,>=0.9.13
|
|
32
|
+
Requires-Dist: sparse<0.16,>=0.15.4
|
|
33
|
+
Requires-Dist: tinygp<0.4,>=0.3.0
|
|
34
|
+
Requires-Dist: watermark<3,>=2.4.3
|
|
40
35
|
Description-Content-Type: text/markdown
|
|
41
36
|
|
|
42
37
|
<p align="center">
|
|
@@ -97,4 +92,3 @@ If you use `jaxspec` in your research, please consider citing the following arti
|
|
|
97
92
|
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
|
|
98
93
|
}
|
|
99
94
|
```
|
|
100
|
-
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
jaxspec/__init__.py,sha256=Sbn02lX6Y-zNXk17N8dec22c5jeypiS0LkHmGfz7lWA,126
|
|
2
|
+
jaxspec/fit.py,sha256=gO0H8CR76WP7lrG2X-Z3HLMndOSkCulzrp2jll1b4ow,24337
|
|
2
3
|
jaxspec/_fit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
4
|
jaxspec/_fit/_build_model.py,sha256=NgLobtysyhCoiRguAazYGRIpG75iW-pG0Ss_hQGuCT4,2019
|
|
4
5
|
jaxspec/analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
6
|
jaxspec/analysis/_plot.py,sha256=1VbWentCLHR8XzM3jZtGyppbQRFWnChNztrwpZ2reA4,6185
|
|
6
7
|
jaxspec/analysis/compare.py,sha256=g2UFhmR9Zt-7cz5gQFOB6lXuklXB3yTyUvjTypOzoSY,725
|
|
7
|
-
jaxspec/analysis/results.py,sha256=
|
|
8
|
+
jaxspec/analysis/results.py,sha256=9ybhWMtwXD_f9reTt_UcSUKQaY4Raxm0Fi7QBv7fqow,25448
|
|
8
9
|
jaxspec/data/__init__.py,sha256=aantcYKC9kZFvaE-V2SIwSuLhIld17Kjrd9CIUu___Y,415
|
|
9
10
|
jaxspec/data/instrument.py,sha256=RDiG_LkucvnF2XE_ghTFME6d_2YirgQUcEY0gEle6dk,4775
|
|
10
11
|
jaxspec/data/obsconf.py,sha256=r0deDgzpfKJZFMeiKQYUnkqQEmoDYTzl3eQFjb5xYjo,10263
|
|
11
12
|
jaxspec/data/observation.py,sha256=dfb-hJFpeSPMS52oNmQl39CB9GD_MK1gG9vHlQXhhwU,7741
|
|
12
13
|
jaxspec/data/ogip.py,sha256=57lfUgvMhM4j5tdfnOmwLI0ehx09pG7SvJx6VNIJFHE,9543
|
|
13
14
|
jaxspec/data/util.py,sha256=FnIqrnwm29WsFV3FayeLXpjJDS10FcZ613B3SzGQCTk,9331
|
|
14
|
-
jaxspec/fit.py,sha256=gO0H8CR76WP7lrG2X-Z3HLMndOSkCulzrp2jll1b4ow,24337
|
|
15
15
|
jaxspec/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
jaxspec/model/_graph_util.py,sha256=hPvHYmAxb7P3nyIecaZ7RqWOjwcZ1WvUByt_yNANiaY,4552
|
|
17
17
|
jaxspec/model/abc.py,sha256=sHaFKOGfpD1ocXKlzEMdsmGLluikmBSmX8FAu7duFMQ,15489
|
|
18
|
-
jaxspec/model/additive.py,sha256=
|
|
18
|
+
jaxspec/model/additive.py,sha256=2MXttFw7eZ6dZ2yWyNpMGDDFFE0kNo6yAP-G-YtL2Qk,20276
|
|
19
19
|
jaxspec/model/background.py,sha256=INRuuHIYgfu2E1a8Ddqpr_gF1wnhPtOpciWCteZfVVg,7687
|
|
20
20
|
jaxspec/model/list.py,sha256=0RPAoscVz_zM1CWdx_Gd5wfrQWV5Nv4Kd4bSXu2ayUA,860
|
|
21
21
|
jaxspec/model/multiplicative.py,sha256=5LHBAXCV9EQO1BGm1HzAI56dqjVbafBdV8Eq7_qXdbM,7890
|
|
@@ -27,8 +27,8 @@ jaxspec/util/integrate.py,sha256=_Ax_knpC7d4et2-QFkOUzVtNeQLX1-cwLvm-FRBxYcw,450
|
|
|
27
27
|
jaxspec/util/misc.py,sha256=O3qorCL1Y2X1BS2jdd36C1eDHK9QDXTSOr9kj3uqcJo,654
|
|
28
28
|
jaxspec/util/online_storage.py,sha256=vm56RfcbFKpkRVfr0bXO7J9aQxuBq-I_oEgA26YIhCo,2469
|
|
29
29
|
jaxspec/util/typing.py,sha256=ZQM_l68qyYnIBZPz_1mKvwPMx64jvVBD8Uj6bx9sHv0,140
|
|
30
|
-
jaxspec-0.2.
|
|
31
|
-
jaxspec-0.2.
|
|
32
|
-
jaxspec-0.2.
|
|
33
|
-
jaxspec-0.2.
|
|
34
|
-
jaxspec-0.2.
|
|
30
|
+
jaxspec-0.2.2.dev0.dist-info/METADATA,sha256=IerKRzXZp5wfqk_2mBYt1vl8wyrnEiMTkWoI-BiNNOo,4116
|
|
31
|
+
jaxspec-0.2.2.dev0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
32
|
+
jaxspec-0.2.2.dev0.dist-info/entry_points.txt,sha256=4ffU5AImfcEBxgWTqopQll2YffpFldOswXRh16pd0Dc,72
|
|
33
|
+
jaxspec-0.2.2.dev0.dist-info/licenses/LICENSE.md,sha256=2q5XoWzddts5IqzIcgYYMOL21puU3MfO8gvT3Ype1eQ,1073
|
|
34
|
+
jaxspec-0.2.2.dev0.dist-info/RECORD,,
|
|
File without changes
|