PyTransit 2.6.0__tar.gz → 2.6.3__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 (141) hide show
  1. {PyTransit-2.6.0 → pytransit-2.6.3}/PKG-INFO +16 -44
  2. {PyTransit-2.6.0 → pytransit-2.6.3}/PyTransit.egg-info/PKG-INFO +16 -44
  3. {PyTransit-2.6.0 → pytransit-2.6.3}/PyTransit.egg-info/requires.txt +1 -0
  4. {PyTransit-2.6.0 → pytransit-2.6.3}/README.md +14 -43
  5. {PyTransit-2.6.0 → pytransit-2.6.3}/pyproject.toml +2 -6
  6. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/__init__.py +3 -2
  7. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/__init__.py +8 -1
  8. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/ldtkldm.py +15 -16
  9. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/roadrunner/model_trspec.py +76 -0
  10. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/roadrunner/tsmodel.py +9 -4
  11. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/keplerlc.py +2 -2
  12. {PyTransit-2.6.0 → pytransit-2.6.3}/LICENSE +0 -0
  13. {PyTransit-2.6.0 → pytransit-2.6.3}/MANIFEST.in +0 -0
  14. {PyTransit-2.6.0 → pytransit-2.6.3}/PyTransit.egg-info/SOURCES.txt +0 -0
  15. {PyTransit-2.6.0 → pytransit-2.6.3}/PyTransit.egg-info/dependency_links.txt +0 -0
  16. {PyTransit-2.6.0 → pytransit-2.6.3}/PyTransit.egg-info/top_level.txt +0 -0
  17. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/contamination/__init__.py +0 -0
  18. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/contamination/contamination.py +0 -0
  19. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/contamination/data/spectra.h5 +0 -0
  20. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/contamination/data/transmission.nc +0 -0
  21. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/contamination/filter.py +0 -0
  22. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/contamination/instrument.py +0 -0
  23. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/contamination/plotting.py +0 -0
  24. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/limb_darkening.py +0 -0
  25. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/__init__.py +0 -0
  26. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/baselines/__init__.py +0 -0
  27. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/baselines/legendrebaseline.py +0 -0
  28. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/baselines/linearbaseline.py +0 -0
  29. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/cntlpf.py +0 -0
  30. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/eclipselpf.py +0 -0
  31. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/loglikelihood/__init__.py +0 -0
  32. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/loglikelihood/celeriteloglikelihood.py +0 -0
  33. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/loglikelihood/clloglikelihood.py +0 -0
  34. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/loglikelihood/fmcloglikelihood.py +0 -0
  35. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/loglikelihood/logisticloglikelihood.py +0 -0
  36. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/loglikelihood/multiceleriteloglikelihood.py +0 -0
  37. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/loglikelihood/wnloglikelihood.py +0 -0
  38. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/logposteriorfunction.py +0 -0
  39. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/lpf.py +0 -0
  40. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/mclpf.py +0 -0
  41. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/mptlpf.py +0 -0
  42. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/ocllpf.py +0 -0
  43. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/ocltdvlpf.py +0 -0
  44. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/oclttvlpf.py +0 -0
  45. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/phasecurvelpf.py +0 -0
  46. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/rvlpf.py +0 -0
  47. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/tdvlpf.py +0 -0
  48. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/tess/__init__.py +0 -0
  49. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/tess/ctesslpf.py +0 -0
  50. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/tess/tessttvlpf.py +0 -0
  51. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/tess/tgclpf.py +0 -0
  52. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/tess/tgcmplpf.py +0 -0
  53. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/tess/tmpclpf.py +0 -0
  54. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/tesslpf.py +0 -0
  55. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/tessoclttvlpf.py +0 -0
  56. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/transitanalysis.py +0 -0
  57. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/transitlpf.py +0 -0
  58. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/lpf/ttvlpf.py +0 -0
  59. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/eclipse_model.py +0 -0
  60. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/gdmodel.py +0 -0
  61. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/general.py +0 -0
  62. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/ldmodel.py +0 -0
  63. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/limb_darkening/__init__.py +0 -0
  64. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/limb_darkening/general.py +0 -0
  65. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/limb_darkening/linear.py +0 -0
  66. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/limb_darkening/nonlinear.py +0 -0
  67. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/limb_darkening/power_2.py +0 -0
  68. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/limb_darkening/quadratic.py +0 -0
  69. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/limb_darkening/quadratic_tri.py +0 -0
  70. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/limb_darkening/uniform.py +0 -0
  71. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/ma_chromosphere.py +0 -0
  72. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/ma_quadratic.py +0 -0
  73. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/ma_quadratic_cl.py +0 -0
  74. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/ma_uniform.py +0 -0
  75. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/ma_uniform_cl.py +0 -0
  76. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/__init__.py +0 -0
  77. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/gdmodel.py +0 -0
  78. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/general_nb.py +0 -0
  79. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/ldmodels.py +0 -0
  80. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/ma_chromosphere_nb.py +0 -0
  81. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/ma_quadratic_nb.py +0 -0
  82. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/ma_uniform_nb.py +0 -0
  83. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/phasecurves.py +0 -0
  84. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/qpower2_nb.py +0 -0
  85. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/rrmodel.py +0 -0
  86. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/spmodel.py +0 -0
  87. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/numba/udmodel.py +0 -0
  88. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/opencl/ma_quadratic.cl +0 -0
  89. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/opencl/ma_uniform.cl +0 -0
  90. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/opencl/orbits.cl +0 -0
  91. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/opencl/qpower2.cl +0 -0
  92. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/osmodel.py +0 -0
  93. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/qpower2.py +0 -0
  94. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/qpower2_cl.py +0 -0
  95. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/roadrunner/__init__.py +0 -0
  96. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/roadrunner/common.py +0 -0
  97. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/roadrunner/model.py +0 -0
  98. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/roadrunner/model_full.py +0 -0
  99. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/roadrunner/model_simple.py +0 -0
  100. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/roadrunner/rrmodel.cl +0 -0
  101. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/roadrunner/rrmodel.py +0 -0
  102. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/transitmodel.py +0 -0
  103. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/models/uniform.py +0 -0
  104. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/orbits/__init__.py +0 -0
  105. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/orbits/orbits.py +0 -0
  106. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/orbits/orbits_py.py +0 -0
  107. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/orbits/taylor_z.py +0 -0
  108. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/param/__init__.py +0 -0
  109. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/param/parameter.py +0 -0
  110. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/param/prior.py +0 -0
  111. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/param/utilities.py +0 -0
  112. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/stars/__init__.py +0 -0
  113. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/stars/btsettl.py +0 -0
  114. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/stars/data/avg_bt_settl.fits +0 -0
  115. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/stars/data/avg_husser2013.fits +0 -0
  116. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/stars/husser2013.py +0 -0
  117. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/__init__.py +0 -0
  118. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/astrometry.py +0 -0
  119. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/constants.py +0 -0
  120. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/de.py +0 -0
  121. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/downsample.py +0 -0
  122. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/eclipses.py +0 -0
  123. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/io/__init__.py +0 -0
  124. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/io/lightcurvedata.py +0 -0
  125. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/mdwarfs.py +0 -0
  126. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/misc.py +0 -0
  127. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/mocklc.py +0 -0
  128. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/octasphere.py +0 -0
  129. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/phasecurves.py +0 -0
  130. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/physics.py +0 -0
  131. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/rv.py +0 -0
  132. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/utils/tess.py +0 -0
  133. {PyTransit-2.6.0 → pytransit-2.6.3}/pytransit/version.py +0 -0
  134. {PyTransit-2.6.0 → pytransit-2.6.3}/setup.cfg +0 -0
  135. {PyTransit-2.6.0 → pytransit-2.6.3}/tests/test_contamination.py +0 -0
  136. {PyTransit-2.6.0 → pytransit-2.6.3}/tests/test_ma_quadratic.py +0 -0
  137. {PyTransit-2.6.0 → pytransit-2.6.3}/tests/test_ma_quadratic_nb.py +0 -0
  138. {PyTransit-2.6.0 → pytransit-2.6.3}/tests/test_qpower2_nb.py +0 -0
  139. {PyTransit-2.6.0 → pytransit-2.6.3}/tests/test_uniform_model.py +0 -0
  140. {PyTransit-2.6.0 → pytransit-2.6.3}/tests/test_uniform_model_nb.py +0 -0
  141. {PyTransit-2.6.0 → pytransit-2.6.3}/tests/test_z.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyTransit
3
- Version: 2.6.0
3
+ Version: 2.6.3
4
4
  Summary: Fast and painless exoplanet transit light curve modelling.
5
5
  Author-email: Hannu Parviainen <hpparvi@gmail.com>
6
6
  License: GPLv2
@@ -30,6 +30,7 @@ Requires-Dist: deprecated
30
30
  Requires-Dist: uncertainties
31
31
  Requires-Dist: pyrr
32
32
  Requires-Dist: seaborn
33
+ Requires-Dist: emcee
33
34
 
34
35
  PyTransit
35
36
  =========
@@ -40,14 +41,13 @@ PyTransit
40
41
  [![ASCL](https://img.shields.io/badge/ASCL-A1505.024-blue.svg?style=flat)](http://ascl.net/1505.024)
41
42
  [![DOI](https://zenodo.org/badge/5871/hpparvi/PyTransit.svg)](https://zenodo.org/badge/latestdoi/5871/hpparvi/PyTransit)
42
43
 
43
- Fast and easy-to-use tools for exoplanet transit light curve modelling with Python. PyTransit offers optimised CPU and
44
- GPU implementations of popular exoplanet transit models with a unified interface, and thrives to be *the fastest and the
45
- most versatile* tool for transit modelling in Python.
44
+ *PyTransit: fast and versatile exoplanet transit light curve modelling in Python.* PyTransit provides a set of optimised
45
+ transit models with a unified API that makes modelling complex sets of heterogeneous light curve (nearly) as easy as
46
+ modelling individual transit light curves.
47
+
48
+ The package has been under continuous development since 2009, and is described in [Parviainen (2015)](http://arxiv.org/abs/1504.07433),
49
+ [Parviainen (2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract), and [Parviainen (2020b)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.3356P/abstract).
46
50
 
47
- PyTransit makes transit model evaluation trivial whether modelling straightforward single-passband transit light curves or
48
- more complex science-cases, such as transmission spectroscopy. Further, the model can be evaluated for a large set of
49
- parameter sets simultaneously in parallel to optimize the evaluation speed with population-based MCMC samplers and
50
- optimization methods, such as emcee and DE-MCMC.
51
51
 
52
52
  ```Python
53
53
  from pytransit import RoadRunnerModel
@@ -57,9 +57,9 @@ tm.set_data(times)
57
57
 
58
58
  tm.evaluate(k=0.1, ldc=[0.2, 0.1], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
59
59
 
60
- tm.evaluate(k=[0.10, 0.12], ldc=[[0.2, 0.1, 0.5, 0.1]], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
60
+ tm.evaluate(k=[0.10, 0.12], ldc=[[0.2, 0.1], [0.5, 0.1]], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
61
61
 
62
- tm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1, 0.5, 0.1],[0.4, 0.2, 0.75, 0.1]],
62
+ tm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1], [0.5, 0.1],[0.4, 0.2, 0.75, 0.1]],
63
63
  t0=[0.0, 0.01], p=[1, 1], a=[3.0, 2.9], i=[.5*pi, .5*pi])
64
64
  ```
65
65
 
@@ -67,13 +67,15 @@ tm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1, 0.5, 0.1],[0.4, 0.2,
67
67
  ![](doc/source/basic_example_2.svg)
68
68
  ![](doc/source/basic_example_3.svg)
69
69
 
70
- The package has been used in research since 2010, and is described in [Parviainen (2015)](http://arxiv.org/abs/1504.07433),
71
- [Parviainen (2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract),
72
- and [Parviainen (2020b)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.3356P/abstract).
70
+
73
71
 
74
72
 
75
73
  ## Examples and tutorials
76
74
 
75
+ ### EMAC Workshop introduction video
76
+
77
+ [![EMAC Workshop PyTransit introduction video](video1.png)](https://youtu.be/bLnxkFNrMDQ?si=OTjr4kUGK1kkhkLC)
78
+
77
79
  ### RoadRunner transit model
78
80
 
79
81
  RoadRunner [(Parviainen, 2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract) is a fast exoplanet transit model that can use any radially symmetric function to model stellar limb darkening
@@ -98,36 +100,6 @@ transmission spectrum light curves.
98
100
 
99
101
  Read the docs at [pytransit.readthedocs.io](https://pytransit.readthedocs.io).
100
102
 
101
- ## News
102
- - **21.10.2020, version 2.5**
103
- - Version 2.5 makes modelling of TTVs trivial with ``pytransit.RoadRunnerModel`` and ``pytransit.QuadraticModel``.
104
- - See the [TTV modelling example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/ttv_model_example.ipynb) for an example of how to evaluate the models for a TTV analysis.
105
-
106
- - **14.10.2020, version 2.4**
107
- - Version 2.4 adds ``pytransit.EclipseModel`` to model secondary eclipses with as little hassle as possible.
108
- - See the [secondary eclipse model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/example_eclipse_model.ipynb)
109
- for an example of how to use it.
110
-
111
- - **16.9.2020, Version 2.3**
112
- - Version 2.3 adds ``OblateStarModel`` to model transits over gravity-darkened rapidly rotating star as presented by Barnes (2009).
113
- - See the [oblate star model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/osmodel_example_1.ipynb)
114
- for an example of usage.
115
-
116
- - **13.9.2020, Version 2.2**
117
- - Version 2.2 brings a significant speedup to the evaluation speed of all models. The normalised planet-star distances are
118
- now calculated using a Taylor-series expansion of the planet's (x,y) sky-plane position. The method gives a 2-6 x speedup to the transit
119
- model evaluation and is detailed in Parviainen & Korth (2020, submitted to MNRAS)
120
-
121
- - **7.7.2020, Version 2.1**
122
- - Version 2.1 introduces the *RoadRunner* transit model (Parviainen, submitted to MNRAS, 2020), a fast exoplanet transit model
123
- that can use any radially symmetric function to model stellar limb darkening while still being faster to evaluate than
124
- the analytical transit model for quadratic limb darkening.
125
- - See the [basic example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_1.ipynb),
126
- the [custom limb darkening notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_2.ipynb),
127
- and the [LDTk limb darkening model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_3.ipynb).
128
-
129
-
130
-
131
103
  Installation
132
104
  ------------
133
105
  ### PyPI
@@ -142,7 +114,7 @@ Clone the repository from github and do the normal python package installation
142
114
 
143
115
  git clone https://github.com/hpparvi/PyTransit.git
144
116
  cd PyTransit
145
- python setup.py install
117
+ pip install .
146
118
 
147
119
 
148
120
  Citing
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyTransit
3
- Version: 2.6.0
3
+ Version: 2.6.3
4
4
  Summary: Fast and painless exoplanet transit light curve modelling.
5
5
  Author-email: Hannu Parviainen <hpparvi@gmail.com>
6
6
  License: GPLv2
@@ -30,6 +30,7 @@ Requires-Dist: deprecated
30
30
  Requires-Dist: uncertainties
31
31
  Requires-Dist: pyrr
32
32
  Requires-Dist: seaborn
33
+ Requires-Dist: emcee
33
34
 
34
35
  PyTransit
35
36
  =========
@@ -40,14 +41,13 @@ PyTransit
40
41
  [![ASCL](https://img.shields.io/badge/ASCL-A1505.024-blue.svg?style=flat)](http://ascl.net/1505.024)
41
42
  [![DOI](https://zenodo.org/badge/5871/hpparvi/PyTransit.svg)](https://zenodo.org/badge/latestdoi/5871/hpparvi/PyTransit)
42
43
 
43
- Fast and easy-to-use tools for exoplanet transit light curve modelling with Python. PyTransit offers optimised CPU and
44
- GPU implementations of popular exoplanet transit models with a unified interface, and thrives to be *the fastest and the
45
- most versatile* tool for transit modelling in Python.
44
+ *PyTransit: fast and versatile exoplanet transit light curve modelling in Python.* PyTransit provides a set of optimised
45
+ transit models with a unified API that makes modelling complex sets of heterogeneous light curve (nearly) as easy as
46
+ modelling individual transit light curves.
47
+
48
+ The package has been under continuous development since 2009, and is described in [Parviainen (2015)](http://arxiv.org/abs/1504.07433),
49
+ [Parviainen (2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract), and [Parviainen (2020b)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.3356P/abstract).
46
50
 
47
- PyTransit makes transit model evaluation trivial whether modelling straightforward single-passband transit light curves or
48
- more complex science-cases, such as transmission spectroscopy. Further, the model can be evaluated for a large set of
49
- parameter sets simultaneously in parallel to optimize the evaluation speed with population-based MCMC samplers and
50
- optimization methods, such as emcee and DE-MCMC.
51
51
 
52
52
  ```Python
53
53
  from pytransit import RoadRunnerModel
@@ -57,9 +57,9 @@ tm.set_data(times)
57
57
 
58
58
  tm.evaluate(k=0.1, ldc=[0.2, 0.1], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
59
59
 
60
- tm.evaluate(k=[0.10, 0.12], ldc=[[0.2, 0.1, 0.5, 0.1]], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
60
+ tm.evaluate(k=[0.10, 0.12], ldc=[[0.2, 0.1], [0.5, 0.1]], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
61
61
 
62
- tm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1, 0.5, 0.1],[0.4, 0.2, 0.75, 0.1]],
62
+ tm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1], [0.5, 0.1],[0.4, 0.2, 0.75, 0.1]],
63
63
  t0=[0.0, 0.01], p=[1, 1], a=[3.0, 2.9], i=[.5*pi, .5*pi])
64
64
  ```
65
65
 
@@ -67,13 +67,15 @@ tm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1, 0.5, 0.1],[0.4, 0.2,
67
67
  ![](doc/source/basic_example_2.svg)
68
68
  ![](doc/source/basic_example_3.svg)
69
69
 
70
- The package has been used in research since 2010, and is described in [Parviainen (2015)](http://arxiv.org/abs/1504.07433),
71
- [Parviainen (2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract),
72
- and [Parviainen (2020b)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.3356P/abstract).
70
+
73
71
 
74
72
 
75
73
  ## Examples and tutorials
76
74
 
75
+ ### EMAC Workshop introduction video
76
+
77
+ [![EMAC Workshop PyTransit introduction video](video1.png)](https://youtu.be/bLnxkFNrMDQ?si=OTjr4kUGK1kkhkLC)
78
+
77
79
  ### RoadRunner transit model
78
80
 
79
81
  RoadRunner [(Parviainen, 2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract) is a fast exoplanet transit model that can use any radially symmetric function to model stellar limb darkening
@@ -98,36 +100,6 @@ transmission spectrum light curves.
98
100
 
99
101
  Read the docs at [pytransit.readthedocs.io](https://pytransit.readthedocs.io).
100
102
 
101
- ## News
102
- - **21.10.2020, version 2.5**
103
- - Version 2.5 makes modelling of TTVs trivial with ``pytransit.RoadRunnerModel`` and ``pytransit.QuadraticModel``.
104
- - See the [TTV modelling example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/ttv_model_example.ipynb) for an example of how to evaluate the models for a TTV analysis.
105
-
106
- - **14.10.2020, version 2.4**
107
- - Version 2.4 adds ``pytransit.EclipseModel`` to model secondary eclipses with as little hassle as possible.
108
- - See the [secondary eclipse model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/example_eclipse_model.ipynb)
109
- for an example of how to use it.
110
-
111
- - **16.9.2020, Version 2.3**
112
- - Version 2.3 adds ``OblateStarModel`` to model transits over gravity-darkened rapidly rotating star as presented by Barnes (2009).
113
- - See the [oblate star model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/osmodel_example_1.ipynb)
114
- for an example of usage.
115
-
116
- - **13.9.2020, Version 2.2**
117
- - Version 2.2 brings a significant speedup to the evaluation speed of all models. The normalised planet-star distances are
118
- now calculated using a Taylor-series expansion of the planet's (x,y) sky-plane position. The method gives a 2-6 x speedup to the transit
119
- model evaluation and is detailed in Parviainen & Korth (2020, submitted to MNRAS)
120
-
121
- - **7.7.2020, Version 2.1**
122
- - Version 2.1 introduces the *RoadRunner* transit model (Parviainen, submitted to MNRAS, 2020), a fast exoplanet transit model
123
- that can use any radially symmetric function to model stellar limb darkening while still being faster to evaluate than
124
- the analytical transit model for quadratic limb darkening.
125
- - See the [basic example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_1.ipynb),
126
- the [custom limb darkening notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_2.ipynb),
127
- and the [LDTk limb darkening model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_3.ipynb).
128
-
129
-
130
-
131
103
  Installation
132
104
  ------------
133
105
  ### PyPI
@@ -142,7 +114,7 @@ Clone the repository from github and do the normal python package installation
142
114
 
143
115
  git clone https://github.com/hpparvi/PyTransit.git
144
116
  cd PyTransit
145
- python setup.py install
117
+ pip install .
146
118
 
147
119
 
148
120
  Citing
@@ -12,3 +12,4 @@ deprecated
12
12
  uncertainties
13
13
  pyrr
14
14
  seaborn
15
+ emcee
@@ -7,14 +7,13 @@ PyTransit
7
7
  [![ASCL](https://img.shields.io/badge/ASCL-A1505.024-blue.svg?style=flat)](http://ascl.net/1505.024)
8
8
  [![DOI](https://zenodo.org/badge/5871/hpparvi/PyTransit.svg)](https://zenodo.org/badge/latestdoi/5871/hpparvi/PyTransit)
9
9
 
10
- Fast and easy-to-use tools for exoplanet transit light curve modelling with Python. PyTransit offers optimised CPU and
11
- GPU implementations of popular exoplanet transit models with a unified interface, and thrives to be *the fastest and the
12
- most versatile* tool for transit modelling in Python.
10
+ *PyTransit: fast and versatile exoplanet transit light curve modelling in Python.* PyTransit provides a set of optimised
11
+ transit models with a unified API that makes modelling complex sets of heterogeneous light curve (nearly) as easy as
12
+ modelling individual transit light curves.
13
+
14
+ The package has been under continuous development since 2009, and is described in [Parviainen (2015)](http://arxiv.org/abs/1504.07433),
15
+ [Parviainen (2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract), and [Parviainen (2020b)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.3356P/abstract).
13
16
 
14
- PyTransit makes transit model evaluation trivial whether modelling straightforward single-passband transit light curves or
15
- more complex science-cases, such as transmission spectroscopy. Further, the model can be evaluated for a large set of
16
- parameter sets simultaneously in parallel to optimize the evaluation speed with population-based MCMC samplers and
17
- optimization methods, such as emcee and DE-MCMC.
18
17
 
19
18
  ```Python
20
19
  from pytransit import RoadRunnerModel
@@ -24,9 +23,9 @@ tm.set_data(times)
24
23
 
25
24
  tm.evaluate(k=0.1, ldc=[0.2, 0.1], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
26
25
 
27
- tm.evaluate(k=[0.10, 0.12], ldc=[[0.2, 0.1, 0.5, 0.1]], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
26
+ tm.evaluate(k=[0.10, 0.12], ldc=[[0.2, 0.1], [0.5, 0.1]], t0=0.0, p=1.0, a=3.0, i=0.5*pi)
28
27
 
29
- tm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1, 0.5, 0.1],[0.4, 0.2, 0.75, 0.1]],
28
+ tm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1], [0.5, 0.1],[0.4, 0.2, 0.75, 0.1]],
30
29
  t0=[0.0, 0.01], p=[1, 1], a=[3.0, 2.9], i=[.5*pi, .5*pi])
31
30
  ```
32
31
 
@@ -34,13 +33,15 @@ tm.evaluate(k=[[0.10, 0.12], [0.11, 0.13]], ldc=[[0.2, 0.1, 0.5, 0.1],[0.4, 0.2,
34
33
  ![](doc/source/basic_example_2.svg)
35
34
  ![](doc/source/basic_example_3.svg)
36
35
 
37
- The package has been used in research since 2010, and is described in [Parviainen (2015)](http://arxiv.org/abs/1504.07433),
38
- [Parviainen (2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract),
39
- and [Parviainen (2020b)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.3356P/abstract).
36
+
40
37
 
41
38
 
42
39
  ## Examples and tutorials
43
40
 
41
+ ### EMAC Workshop introduction video
42
+
43
+ [![EMAC Workshop PyTransit introduction video](video1.png)](https://youtu.be/bLnxkFNrMDQ?si=OTjr4kUGK1kkhkLC)
44
+
44
45
  ### RoadRunner transit model
45
46
 
46
47
  RoadRunner [(Parviainen, 2020a)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.1633P/abstract) is a fast exoplanet transit model that can use any radially symmetric function to model stellar limb darkening
@@ -65,36 +66,6 @@ transmission spectrum light curves.
65
66
 
66
67
  Read the docs at [pytransit.readthedocs.io](https://pytransit.readthedocs.io).
67
68
 
68
- ## News
69
- - **21.10.2020, version 2.5**
70
- - Version 2.5 makes modelling of TTVs trivial with ``pytransit.RoadRunnerModel`` and ``pytransit.QuadraticModel``.
71
- - See the [TTV modelling example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/ttv_model_example.ipynb) for an example of how to evaluate the models for a TTV analysis.
72
-
73
- - **14.10.2020, version 2.4**
74
- - Version 2.4 adds ``pytransit.EclipseModel`` to model secondary eclipses with as little hassle as possible.
75
- - See the [secondary eclipse model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/example_eclipse_model.ipynb)
76
- for an example of how to use it.
77
-
78
- - **16.9.2020, Version 2.3**
79
- - Version 2.3 adds ``OblateStarModel`` to model transits over gravity-darkened rapidly rotating star as presented by Barnes (2009).
80
- - See the [oblate star model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/osmodel_example_1.ipynb)
81
- for an example of usage.
82
-
83
- - **13.9.2020, Version 2.2**
84
- - Version 2.2 brings a significant speedup to the evaluation speed of all models. The normalised planet-star distances are
85
- now calculated using a Taylor-series expansion of the planet's (x,y) sky-plane position. The method gives a 2-6 x speedup to the transit
86
- model evaluation and is detailed in Parviainen & Korth (2020, submitted to MNRAS)
87
-
88
- - **7.7.2020, Version 2.1**
89
- - Version 2.1 introduces the *RoadRunner* transit model (Parviainen, submitted to MNRAS, 2020), a fast exoplanet transit model
90
- that can use any radially symmetric function to model stellar limb darkening while still being faster to evaluate than
91
- the analytical transit model for quadratic limb darkening.
92
- - See the [basic example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_1.ipynb),
93
- the [custom limb darkening notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_2.ipynb),
94
- and the [LDTk limb darkening model example notebook](https://github.com/hpparvi/PyTransit/blob/master/notebooks/roadrunner/roadrunner_model_example_3.ipynb).
95
-
96
-
97
-
98
69
  Installation
99
70
  ------------
100
71
  ### PyPI
@@ -109,7 +80,7 @@ Clone the repository from github and do the normal python package installation
109
80
 
110
81
  git clone https://github.com/hpparvi/PyTransit.git
111
82
  cd PyTransit
112
- python setup.py install
83
+ pip install .
113
84
 
114
85
 
115
86
  Citing
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "PyTransit"
3
- version = "2.6.0"
3
+ version = "2.6.3"
4
4
  description = 'Fast and painless exoplanet transit light curve modelling.'
5
5
  authors=[{name='Hannu Parviainen', email='hpparvi@gmail.com'}]
6
6
  classifiers=[
@@ -14,7 +14,7 @@ classifiers=[
14
14
  ]
15
15
  keywords = ['astronomy', 'astrophysics', 'exoplanets']
16
16
  dependencies = ["numpy", "numba", "scipy", "pandas", "xarray", "tables", "meepmeep", "pyopencl", "ldtk",
17
- "semantic_version", "deprecated", "uncertainties", "pyrr", "seaborn"]
17
+ "semantic_version", "deprecated", "uncertainties", "pyrr", "seaborn", "emcee"]
18
18
  requires-python = ">= 3.8"
19
19
  readme = "README.md"
20
20
  license = {text = "GPLv2"}
@@ -32,7 +32,3 @@ include-package-data = true
32
32
  [tool.setuptools.packages.find]
33
33
  include = ["pytransit"]
34
34
  namespaces = true
35
-
36
- #[tool.setuptools.package-data]
37
- #"pytransit.contamination.data" = ["*.nc"]
38
- #"pytransit" = ["*.fits", "*.txt", "*.csv", "*.h5", "*.nc", "*.cl"]
@@ -64,12 +64,13 @@ with warnings.catch_warnings():
64
64
  from .models.eclipse_model import EclipseModel
65
65
  from .models.ma_chromosphere import ChromosphereModel
66
66
  from .models.general import GeneralModel
67
- from .models.roadrunner.rrmodel import RoadRunnerModel
68
- from .models.roadrunner.tsmodel import TransmissionSpectroscopyModel
69
67
  from .models.osmodel import OblateStarModel
70
68
  from .models.gdmodel import GravityDarkenedModel
71
69
 
70
+ from .models import RoadRunnerModel, OblatePlanetModel, TransmissionSpectroscopyModel
71
+
72
72
  TSModel = TransmissionSpectroscopyModel
73
+ OPModel = OblatePlanetModel
73
74
  RRModel = RoadRunnerModel
74
75
 
75
76
  # OpenCL models
@@ -14,4 +14,11 @@
14
14
  # You should have received a copy of the GNU General Public License
15
15
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
16
16
 
17
- from .transitmodel import TransitModel
17
+ from .transitmodel import TransitModel
18
+ from .roadrunner.rrmodel import RoadRunnerModel
19
+ from .roadrunner.opmodel import OblatePlanetModel
20
+ from .roadrunner.tsmodel import TransmissionSpectroscopyModel
21
+
22
+ RRModel = RoadRunnerModel
23
+ OPModel = OblatePlanetModel
24
+ TSModel = TransmissionSpectroscopyModel
@@ -22,6 +22,7 @@ from numpy import zeros, interp, pi, ndarray, linspace, meshgrid, transpose
22
22
  from scipy.interpolate import interpn, interpnd, RegularGridInterpolator as RGI
23
23
 
24
24
  from .ldmodel import LDModel
25
+ from .numba.ldtkldm import trilinear_interpolation_set, integrate_profiles_set
25
26
 
26
27
  try:
27
28
  from ldtk import LDPSetCreator
@@ -53,33 +54,31 @@ class LDTkLDModel(LDModel):
53
54
  self.profiles = None
54
55
  self.rgi = None
55
56
 
56
- def _init_interpolation(self, mu, nteff, nlogg, nz):
57
+ def _init_interpolation(self, mu):
57
58
  self.mu = mu
58
59
  self.nmu = mu.size
59
60
  c = self.sc.client
60
61
 
61
- teffs = linspace(*c.teffl, nteff)
62
- loggs = linspace(*c.loggl, nlogg)
63
- zs = linspace(*c.zl, nz)
62
+ teffs = linspace(*c.teffl, self.sc.client.nteff)
63
+ loggs = linspace(*c.loggl, self.sc.client.nlogg)
64
+ zs = linspace(*c.zl, self.sc.client.nz)
64
65
  teffg, loggg, zg = meshgrid(teffs, loggs, zs)
66
+ self.teff0, self.dteff, self.nteff = teffs[0], teffs[1]-teffs[0], self.sc.client.nteff
67
+ self.logg0, self.dlogg, self.nlogg = loggs[0], loggs[1]-loggs[0], self.sc.client.nlogg
68
+ self.metal0, self.dmetal, self.nmetal = zs[0], zs[1]-zs[0], self.sc.client.nz
65
69
 
66
70
  self.ps = self.sc.create_profiles(teff=teffg.ravel(), logg=loggg.ravel(), metal=zg.ravel())
67
71
  self.ps.resample(mu=self.mu)
68
- self.profiles = transpose(self.ps._ldps.copy(), axes=(1, 0, 2)).reshape((nteff, nlogg, nz, self.npb, self.nmu))
69
- self.rgi = RGI((teffs, loggs, zs), self.profiles)
72
+ self.profiles = transpose(self.ps._ldps.copy(), axes=(1, 0, 2)).reshape((self.nteff, self.nlogg, self.nmetal, self.npb, self.nmu))
70
73
 
71
74
  def __call__(self, mu: ndarray, x: ndarray) -> Tuple[ndarray, ndarray]:
72
75
  if self.mu is None or id(mu) != id(self.mu):
73
- self._init_interpolation(mu, 5, 3, 3)
74
-
75
- npv = x.shape[0]
76
- z = self.ps._z
77
- ldp = zeros((npv, self.npb, self.nmu))
78
- ldi = zeros((npv, self.npb))
79
- for ipv in range(npv):
80
- ldp[ipv] = self.rgi(x[ipv])
81
- for ipb in range(self.npb):
82
- ldi[ipv, ipb] = 2 * pi * ntrapz(z, z * ldp[ipv, ipb, :])
76
+ self._init_interpolation(mu)
77
+ ldp = trilinear_interpolation_set(self.profiles, x[:, 0, 0], x[:, 0, 1], x[:, 0, 2],
78
+ self.teff0, self.dteff, self.nteff,
79
+ self.logg0, self.dlogg, self.nlogg,
80
+ self.metal0, self.dmetal, self.nmetal)
81
+ ldi = integrate_profiles_set(self.mu, ldp)
83
82
  return ldp, ldi
84
83
 
85
84
  def _evaluate(self, mu: ndarray, x: ndarray) -> ndarray:
@@ -83,3 +83,79 @@ def tsmodel_serial(times: ndarray,
83
83
  flux[ipv, ipb, ipt] += (istar[ipv, ipb] - iplanet * aplanet * afac[ipb]) / istar[ipv, ipb]
84
84
  flux[ipv, :, ipt] /= nsamples[0]
85
85
  return flux
86
+
87
+
88
+ @njit(parallel=True, fastmath=False)
89
+ def tsmodel_parallel(times: ndarray,
90
+ k: ndarray, t0: ndarray, p: ndarray, a: ndarray, i: ndarray, e: ndarray, w: ndarray,
91
+ nsamples: ndarray, exptimes: ndarray, ldp: ndarray, istar: ndarray,
92
+ weights: ndarray, dk: float, kmin: float, kmax: float, dg: float, z_edges: ndarray) -> ndarray:
93
+ if k.ndim != 2:
94
+ raise ValueError(" The radius ratios must be given as a 2D array with shape (npv, npb)")
95
+
96
+ if ldp.ndim != 3:
97
+ raise ValueError("The limb darkening profiles must be given as a 3D array with shape (npv, npb, nmu)")
98
+
99
+ if k.shape[1] != ldp.shape[1]:
100
+ raise ValueError("The transmission spectrum transit model requires that the number or radius ratios and the number of passbands match.")
101
+
102
+ npt = times.size
103
+ npv = k.shape[0]
104
+ npb = k.shape[1]
105
+ ng = weights.shape[1]
106
+
107
+ flux = zeros((npv, npb, npt)) # Model flux
108
+ ldm = zeros((npb, ng)) # Limb darkening means
109
+ xyc = zeros((2, 5)) # Taylor series coefficients for the (x, y) position
110
+
111
+ for ipv in prange(npv):
112
+ if isnan(a[ipv]) or (a[ipv] <= 1.0) or (e[ipv] < 0.0):
113
+ flux[ipv, :, :] = nan
114
+ continue
115
+
116
+ kmean = mean(k[ipv])
117
+ afac = k[ipv] ** 2 / kmean ** 2
118
+
119
+ # -----------------------------------#
120
+ # Calculate the limb darkening means #
121
+ # -----------------------------------#
122
+ if kmin <= kmean <= kmax:
123
+ ik = int(floor((kmean - kmin) / dk))
124
+ ak = (kmean - kmin - ik * dk) / dk
125
+ for ipb in range(npb):
126
+ ldm[ipb, :] = (1.0 - ak) * dot(weights[ik], ldp[ipv, ipb, :]) + ak * dot(weights[ik + 1],
127
+ ldp[ipv, ipb, :])
128
+ else:
129
+ _, _, wg = calculate_weights_2d(kmean, z_edges, ng)
130
+ for ipb in range(npb):
131
+ ldm[ipb, :] = dot(wg, ldp[ipv, ipb, :])
132
+
133
+ # -----------------------------------------------------#
134
+ # Calculate the Taylor series expansions for the orbit #
135
+ # -----------------------------------------------------#
136
+ xyc[:, :] = solve_xy_p5s(0.0, p[ipv], a[ipv], i[ipv], e[ipv], w[ipv])
137
+
138
+ # --------------------------------#
139
+ # Calculate the half-window width #
140
+ # --------------------------------#
141
+ hww = 0.5 * d_from_pkaiews(p[ipv], kmean, a[ipv], i[ipv], e[ipv], w[ipv], 1, 14)
142
+ hww = 0.0015 + exptimes[0] + hww
143
+
144
+ # --------------------------#
145
+ # Calculate the light curve #
146
+ # --------------------------#
147
+ for ipt in range(npt):
148
+ epoch = floor((times[ipt] - t0[ipv] + 0.5 * p[ipv]) / p[ipv])
149
+ tc = times[ipt] - (t0[ipv] + epoch * p[ipv])
150
+ if fabs(tc) > hww:
151
+ flux[ipv, :, ipt] = 1.0
152
+ else:
153
+ for isample in range(1, nsamples[0] + 1):
154
+ time_offset = exptimes[0] * ((isample - 0.5) / nsamples[0] - 0.5)
155
+ z = pd_t15sc(tc + time_offset, xyc)
156
+ aplanet = ccia(1.0, kmean, z)[0]
157
+ for ipb in range(npb):
158
+ iplanet = interpolate_mean_limb_darkening_s(z / (1.0 + kmean), dg, ldm[ipb])
159
+ flux[ipv, ipb, ipt] += (istar[ipv, ipb] - iplanet * aplanet * afac[ipb]) / istar[ipv, ipb]
160
+ flux[ipv, :, ipt] /= nsamples[0]
161
+ return flux
@@ -36,7 +36,7 @@ from ..ldmodel import LDModel
36
36
  from ..numba.ldmodels import *
37
37
  from .rrmodel import RoadRunnerModel
38
38
 
39
- from .model_trspec import tsmodel_serial
39
+ from .model_trspec import tsmodel_serial, tsmodel_parallel
40
40
 
41
41
  __all__ = ['TransmissionSpectroscopyModel']
42
42
 
@@ -46,7 +46,7 @@ class TransmissionSpectroscopyModel(RoadRunnerModel):
46
46
  def evaluate(self, k: Union[float, ndarray], ldc: Union[ndarray, List],
47
47
  t0: Union[float, ndarray], p: Union[float, ndarray], a: Union[float, ndarray],
48
48
  i: Union[float, ndarray], e: Union[float, ndarray] = 0.0, w: Union[float, ndarray] = 0.0,
49
- copy: bool = True) -> ndarray:
49
+ copy: bool = True, parallel: bool = False) -> ndarray:
50
50
  """Evaluate the transit model for a set of scalar or vector parameters.
51
51
 
52
52
  Parameters
@@ -115,8 +115,13 @@ class TransmissionSpectroscopyModel(RoadRunnerModel):
115
115
  istar[ipv, ipb] = 2 * pi * trapz(self._ldz * ldpi[ipv, ipb], self._ldz)
116
116
 
117
117
  dk, dg, weights = calculate_weights_3d(self.nk, self.klims[0], self.klims[1], self.ze, self.ng)
118
- flux = tsmodel_serial(self.time, k, t0, p, a, i, e, w, self.nsamples, self.exptimes,
119
- ldp, istar, weights, dk, self.klims[0], self.klims[1], dg, self.ze)
118
+
119
+ if parallel:
120
+ flux = tsmodel_parallel(self.time, k, t0, p, a, i, e, w, self.nsamples, self.exptimes,
121
+ ldp, istar, weights, dk, self.klims[0], self.klims[1], dg, self.ze)
122
+ else:
123
+ flux = tsmodel_serial(self.time, k, t0, p, a, i, e, w, self.nsamples, self.exptimes,
124
+ ldp, istar, weights, dk, self.klims[0], self.klims[1], dg, self.ze)
120
125
 
121
126
  return flux.squeeze()
122
127
 
@@ -79,7 +79,7 @@ class KeplerLC(object):
79
79
 
80
80
  # Remove orbits with too big ptp range
81
81
  # ------------------------------------
82
- msk_inc = ones(self.npt, np.bool)
82
+ msk_inc = ones(self.npt, bool)
83
83
  for tid,ptp in enumerate(list(map(np.ptp, self.normalized_flux_per_transit))):
84
84
  if ptp > self.max_ptp:
85
85
  msk_inc[self.tidarr==tid] = 0
@@ -116,7 +116,7 @@ class KeplerLC(object):
116
116
 
117
117
  def remove_common_orbits(self, lc2):
118
118
  is_unique = ~np.in1d(self.orbit_n, lc2.orbit_n)
119
- mask = np.ones(self.npt, np.bool)
119
+ mask = np.ones(self.npt, bool)
120
120
  for tid,include in enumerate(is_unique):
121
121
  mask[self.tslices[tid]] = include
122
122
  self._compress_data(mask)
File without changes
File without changes
File without changes
File without changes