jnkepler 0.2.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 (65) hide show
  1. jnkepler-0.2.0/LICENSE +21 -0
  2. jnkepler-0.2.0/MANIFEST.in +27 -0
  3. jnkepler-0.2.0/PKG-INFO +64 -0
  4. jnkepler-0.2.0/README.md +44 -0
  5. jnkepler-0.2.0/examples/comparison_with_ttvfast+emcee/emcee_vs_hmc.png +0 -0
  6. jnkepler-0.2.0/examples/comparison_with_ttvfast+emcee/kep51.tsv +5169 -0
  7. jnkepler-0.2.0/examples/comparison_with_ttvfast+emcee/kep51_posterior_vs_emcee.ipynb +201 -0
  8. jnkepler-0.2.0/examples/kep51/dt1.0_nw500_ns1500_c4_mcmc.pkl +0 -0
  9. jnkepler-0.2.0/examples/kep51/ttv.txt +53 -0
  10. jnkepler-0.2.0/setup.cfg +4 -0
  11. jnkepler-0.2.0/setup.py +62 -0
  12. jnkepler-0.2.0/src/jnkepler/__init__.py +13 -0
  13. jnkepler-0.2.0/src/jnkepler/data/JaxTTVobject.pkl +0 -0
  14. jnkepler-0.2.0/src/jnkepler/data/__init__.py +0 -0
  15. jnkepler-0.2.0/src/jnkepler/data/hessian.txt +15 -0
  16. jnkepler-0.2.0/src/jnkepler/data/info.txt +15 -0
  17. jnkepler-0.2.0/src/jnkepler/data/kep51_4planet.csv +71 -0
  18. jnkepler-0.2.0/src/jnkepler/data/kep51_4planet_sol-2.csv +4 -0
  19. jnkepler-0.2.0/src/jnkepler/data/kep51_4planet_sol.csv +4 -0
  20. jnkepler-0.2.0/src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_de.csv +2 -0
  21. jnkepler-0.2.0/src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_grad.txt +3 -0
  22. jnkepler-0.2.0/src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_params.txt +21 -0
  23. jnkepler-0.2.0/src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_pdict.csv +4 -0
  24. jnkepler-0.2.0/src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_pdict_ttvfast.csv +2 -0
  25. jnkepler-0.2.0/src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_tc.csv +54 -0
  26. jnkepler-0.2.0/src/jnkepler/data/kep51_lc_model.txt +1689 -0
  27. jnkepler-0.2.0/src/jnkepler/data/kep51_lc_photodtest.csv +1690 -0
  28. jnkepler-0.2.0/src/jnkepler/data/kep51_nbodytransit_optim.npy +0 -0
  29. jnkepler-0.2.0/src/jnkepler/data/kep51_ttv.txt +53 -0
  30. jnkepler-0.2.0/src/jnkepler/data/kep51_ttv_photodtest.txt +49 -0
  31. jnkepler-0.2.0/src/jnkepler/data/rvs_ttvfast_for_test-ttandrv.txt +10000 -0
  32. jnkepler-0.2.0/src/jnkepler/data/tcbug_elements.txt +3 -0
  33. jnkepler-0.2.0/src/jnkepler/data/tcbug_masses.txt +4 -0
  34. jnkepler-0.2.0/src/jnkepler/data/tcs_ttvfast_for_test-all.txt +117 -0
  35. jnkepler-0.2.0/src/jnkepler/data/tcs_ttvfast_for_test-nontransiting.txt +227 -0
  36. jnkepler-0.2.0/src/jnkepler/data/tcs_ttvfast_for_test-obs-nontransiting.txt +70 -0
  37. jnkepler-0.2.0/src/jnkepler/data/tcs_ttvfast_for_test-obs-nontransiting2.txt +70 -0
  38. jnkepler-0.2.0/src/jnkepler/data/tcs_ttvfast_for_test-ttandrv.txt +53 -0
  39. jnkepler-0.2.0/src/jnkepler/infer.py +133 -0
  40. jnkepler-0.2.0/src/jnkepler/jaxttv/__init__.py +2 -0
  41. jnkepler-0.2.0/src/jnkepler/jaxttv/conversion.py +300 -0
  42. jnkepler-0.2.0/src/jnkepler/jaxttv/findtransit.py +478 -0
  43. jnkepler-0.2.0/src/jnkepler/jaxttv/hermite4.py +153 -0
  44. jnkepler-0.2.0/src/jnkepler/jaxttv/infer.py +138 -0
  45. jnkepler-0.2.0/src/jnkepler/jaxttv/information.py +202 -0
  46. jnkepler-0.2.0/src/jnkepler/jaxttv/jaxttv.py +624 -0
  47. jnkepler-0.2.0/src/jnkepler/jaxttv/markley.py +53 -0
  48. jnkepler-0.2.0/src/jnkepler/jaxttv/rv.py +27 -0
  49. jnkepler-0.2.0/src/jnkepler/jaxttv/symplectic.py +286 -0
  50. jnkepler-0.2.0/src/jnkepler/jaxttv/ttvfastutils.py +214 -0
  51. jnkepler-0.2.0/src/jnkepler/jaxttv/utils.py +304 -0
  52. jnkepler-0.2.0/src/jnkepler/jnkepler_version.py +1 -0
  53. jnkepler-0.2.0/src/jnkepler/nbodyrv/__init__.py +1 -0
  54. jnkepler-0.2.0/src/jnkepler/nbodyrv/nbodyrv.py +41 -0
  55. jnkepler-0.2.0/src/jnkepler/nbodytransit/__init__.py +1 -0
  56. jnkepler-0.2.0/src/jnkepler/nbodytransit/nbodytransit.py +258 -0
  57. jnkepler-0.2.0/src/jnkepler/nbodytransit/transit.py +108 -0
  58. jnkepler-0.2.0/src/jnkepler/tests/__init__.py +1 -0
  59. jnkepler-0.2.0/src/jnkepler/tests/read_testdata.py +78 -0
  60. jnkepler-0.2.0/src/jnkepler.egg-info/PKG-INFO +64 -0
  61. jnkepler-0.2.0/src/jnkepler.egg-info/SOURCES.txt +63 -0
  62. jnkepler-0.2.0/src/jnkepler.egg-info/dependency_links.txt +1 -0
  63. jnkepler-0.2.0/src/jnkepler.egg-info/not-zip-safe +1 -0
  64. jnkepler-0.2.0/src/jnkepler.egg-info/requires.txt +6 -0
  65. jnkepler-0.2.0/src/jnkepler.egg-info/top_level.txt +1 -0
jnkepler-0.2.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Kento Masuda
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,27 @@
1
+ include src/jnkepler/data/kep51_ttv.txt
2
+ include src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_de.csv
3
+ include src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_params.txt
4
+ include src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_pdict_ttvfast.csv
5
+ include src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_pdict.csv
6
+ include src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_tc.csv
7
+ include src/jnkepler/data/kep51_dt1.0_start155.00_end2950.00_grad.txt
8
+ include src/jnkepler/data/tcbug_elements.txt
9
+ include src/jnkepler/data/tcbug_masses.txt
10
+ include src/jnkepler/data/kep51_lc_model.txt
11
+ include src/jnkepler/data/kep51_lc_photodtest.csv
12
+ include src/jnkepler/data/kep51_ttv_photodtest.txt
13
+ include src/jnkepler/data/info.txt
14
+ include src/jnkepler/data/hessian.txt
15
+ include src/jnkepler/data/JaxTTVobject.pkl
16
+ include src/jnkepler/data/kep51_nbodytransit_optim.npy
17
+ include src/jnkepler/data/kep51_4planet.csv
18
+ include src/jnkepler/data/kep51_4planet_sol.csv
19
+ include src/jnkepler/data/kep51_4planet_sol-2.csv
20
+ include src/jnkepler/data/tcs_ttvfast_for_test-all.txt
21
+ include src/jnkepler/data/tcs_ttvfast_for_test-nontransiting.txt
22
+ include src/jnkepler/data/tcs_ttvfast_for_test-obs-nontransiting.txt
23
+ include src/jnkepler/data/tcs_ttvfast_for_test-obs-nontransiting2.txt
24
+ include src/jnkepler/data/tcs_ttvfast_for_test-ttandrv.txt
25
+ include src/jnkepler/data/rvs_ttvfast_for_test-ttandrv.txt
26
+
27
+ global-exclude *.py[co]
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.1
2
+ Name: jnkepler
3
+ Version: 0.2.0
4
+ Summary: JAX code for modeling nearly-Keplerian orbits
5
+ Home-page: https://github.com/kemasuda/jnkepler
6
+ Author: Kento Masuda
7
+ Author-email: kmasuda@ess.sci.osaka-u.ac.jp
8
+ Maintainer: Kento Masuda
9
+ Maintainer-email: kmasuda@ess.sci.osaka-u.ac.jp
10
+ License: MIT
11
+ Classifier: Programming Language :: Python
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: jax
15
+ Requires-Dist: numpyro
16
+ Requires-Dist: pandas
17
+ Requires-Dist: numpy<2.0
18
+ Requires-Dist: matplotlib
19
+ Requires-Dist: importlib_resources
20
+
21
+ # jnkepler
22
+
23
+ *A differentiable N-body model for multi-planet systems.*
24
+
25
+ `jnkepler` is a Python package for modeling photometric and radial velocity data of multi-planet systems via N-body integration. Built with [JAX](https://jax.readthedocs.io/en/latest/index.html), it leverages automatic differentiation for efficient computation of model gradients. This enables seamless integration with gradient-based optimizers and Hamiltonian Monte Carlo methods, including the No-U-Turn Sampler (NUTS) in [NumPyro](https://num.pyro.ai). The package is particularly suited for efficiently sampling from multi-planet posteriors involving a larger number of parameters and strong degeneracy.
26
+
27
+ ## Subpackages
28
+
29
+ - **jnkepler.jaxttv**: A differentialble N-body model for analyzing transit timing variations (TTVs) and radial velocities (RVs) of multi-planet systems.
30
+ - **jnkepler.nbodytransit**: A differentialble photodynamical model. [`jaxoplanet`](https://jax.exoplanet.codes/en/latest/) needs to be installed for using this package.
31
+ - **jnkepler.nbodyrv**: A differentiable RV model taking into account mutual interactions between planets.
32
+
33
+ See [readthedocs](https://jnkepler.readthedocs.io/en/latest/index.html) for more details.
34
+
35
+ ## Installation
36
+
37
+ ```python setup.py install```
38
+
39
+
40
+ ## Examples
41
+
42
+ Explore example notebooks in the `examples/` directory to see `jnkepler` in action:
43
+
44
+ - **minimal example for computing transit times**: `examples/minimal_example.ipynb`
45
+
46
+ - **TTV modeling**: `examples/kep51_ttv_iidnormal.ipynb`
47
+ - posterior sampling with NUTS
48
+ - reproducing the result in [Libby-Roberts et al. 2020](https://ui.adsabs.harvard.edu/abs/2020AJ....159...57L/abstract)
49
+ - **Photodynamical modeling**: `examples/kep51_photodynamics_gp.ipynb`
50
+ - SVI optimization & posterior sampling with NUTS
51
+ - noise modeling using Gaussian Process with [`celerite2.jax`](https://celerite2.readthedocs.io/en/latest/api/jax/)
52
+
53
+
54
+
55
+ ## Applications
56
+
57
+ - TOI-1136: TTV modeling of 6-planets in a resonance chain [[paper]](https://ui.adsabs.harvard.edu/abs/2022arXiv221009283D/abstract)
58
+ - TOI-2015: joint TTV & RV modeling of a two-planet system [[paper]](https://arxiv.org/abs/2310.11775)
59
+ - Kepler-51: four-planet modeling including JWST data [[paper]](https://arxiv.org/abs/2410.01625) [[repository]](https://github.com/kemasuda/kep51_jwst)
60
+
61
+ ## References
62
+
63
+ - Masuda et al. (2024), [A Fourth Planet in the Kepler-51 System Revealed by Transit Timing Variations](https://arxiv.org/abs/2410.01625), AJ in press.
64
+
@@ -0,0 +1,44 @@
1
+ # jnkepler
2
+
3
+ *A differentiable N-body model for multi-planet systems.*
4
+
5
+ `jnkepler` is a Python package for modeling photometric and radial velocity data of multi-planet systems via N-body integration. Built with [JAX](https://jax.readthedocs.io/en/latest/index.html), it leverages automatic differentiation for efficient computation of model gradients. This enables seamless integration with gradient-based optimizers and Hamiltonian Monte Carlo methods, including the No-U-Turn Sampler (NUTS) in [NumPyro](https://num.pyro.ai). The package is particularly suited for efficiently sampling from multi-planet posteriors involving a larger number of parameters and strong degeneracy.
6
+
7
+ ## Subpackages
8
+
9
+ - **jnkepler.jaxttv**: A differentialble N-body model for analyzing transit timing variations (TTVs) and radial velocities (RVs) of multi-planet systems.
10
+ - **jnkepler.nbodytransit**: A differentialble photodynamical model. [`jaxoplanet`](https://jax.exoplanet.codes/en/latest/) needs to be installed for using this package.
11
+ - **jnkepler.nbodyrv**: A differentiable RV model taking into account mutual interactions between planets.
12
+
13
+ See [readthedocs](https://jnkepler.readthedocs.io/en/latest/index.html) for more details.
14
+
15
+ ## Installation
16
+
17
+ ```python setup.py install```
18
+
19
+
20
+ ## Examples
21
+
22
+ Explore example notebooks in the `examples/` directory to see `jnkepler` in action:
23
+
24
+ - **minimal example for computing transit times**: `examples/minimal_example.ipynb`
25
+
26
+ - **TTV modeling**: `examples/kep51_ttv_iidnormal.ipynb`
27
+ - posterior sampling with NUTS
28
+ - reproducing the result in [Libby-Roberts et al. 2020](https://ui.adsabs.harvard.edu/abs/2020AJ....159...57L/abstract)
29
+ - **Photodynamical modeling**: `examples/kep51_photodynamics_gp.ipynb`
30
+ - SVI optimization & posterior sampling with NUTS
31
+ - noise modeling using Gaussian Process with [`celerite2.jax`](https://celerite2.readthedocs.io/en/latest/api/jax/)
32
+
33
+
34
+
35
+ ## Applications
36
+
37
+ - TOI-1136: TTV modeling of 6-planets in a resonance chain [[paper]](https://ui.adsabs.harvard.edu/abs/2022arXiv221009283D/abstract)
38
+ - TOI-2015: joint TTV & RV modeling of a two-planet system [[paper]](https://arxiv.org/abs/2310.11775)
39
+ - Kepler-51: four-planet modeling including JWST data [[paper]](https://arxiv.org/abs/2410.01625) [[repository]](https://github.com/kemasuda/kep51_jwst)
40
+
41
+ ## References
42
+
43
+ - Masuda et al. (2024), [A Fourth Planet in the Kepler-51 System Revealed by Transit Timing Variations](https://arxiv.org/abs/2410.01625), AJ in press.
44
+