PyTransit 2.7.0__tar.gz → 2.8.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 (161) hide show
  1. {pytransit-2.7.0 → pytransit-2.8.0}/PKG-INFO +2 -2
  2. {pytransit-2.7.0 → pytransit-2.8.0}/PyTransit.egg-info/PKG-INFO +2 -2
  3. {pytransit-2.7.0 → pytransit-2.8.0}/PyTransit.egg-info/SOURCES.txt +2 -2
  4. {pytransit-2.7.0 → pytransit-2.8.0}/PyTransit.egg-info/requires.txt +1 -1
  5. {pytransit-2.7.0 → pytransit-2.8.0}/pyproject.toml +5 -0
  6. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/__init__.py +1 -1
  7. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/rvlpf.py +30 -15
  8. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/eclipse_model.py +1 -27
  9. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/gdmodel.py +8 -7
  10. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/ma_chromosphere.py +1 -25
  11. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/ma_quadratic.py +1 -34
  12. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/ma_uniform.py +1 -25
  13. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/gdmodel.py +26 -28
  14. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/ma_chromosphere_nb.py +0 -32
  15. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/ma_quadratic_nb.py +13 -76
  16. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/ma_uniform_nb.py +20 -67
  17. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/qpower2_nb.py +13 -51
  18. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/udmodel.py +20 -43
  19. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/qpower2.py +1 -26
  20. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/esmodel.py +10 -5
  21. pytransit-2.8.0/pytransit/models/roadrunner/model_eclipse.py +81 -0
  22. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/model_ecspec.py +17 -14
  23. pytransit-2.8.0/pytransit/models/roadrunner/model_full.py +100 -0
  24. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/model_simple.py +7 -8
  25. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/model_trspec.py +21 -20
  26. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/opmodel_full.py +17 -14
  27. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/rrmodel.py +16 -8
  28. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/uniform.py +45 -6
  29. {pytransit-2.7.0 → pytransit-2.8.0}/requirements.txt +1 -1
  30. {pytransit-2.7.0 → pytransit-2.8.0}/tests/test_contamination.py +3 -11
  31. {pytransit-2.7.0 → pytransit-2.8.0}/tests/test_jax_uniformdisk.py +2 -1
  32. {pytransit-2.7.0 → pytransit-2.8.0}/tests/test_limb_darkening.py +3 -0
  33. pytransit-2.8.0/tests/test_ma_quadratic.py +152 -0
  34. pytransit-2.8.0/tests/test_ma_quadratic_nb.py +62 -0
  35. pytransit-2.8.0/tests/test_qpower2_nb.py +51 -0
  36. pytransit-2.8.0/tests/test_roadrunner_eclipse.py +69 -0
  37. pytransit-2.8.0/tests/test_transitmodel_helpers.py +193 -0
  38. pytransit-2.8.0/tests/test_uniform_model.py +95 -0
  39. pytransit-2.8.0/tests/test_uniform_model_nb.py +82 -0
  40. pytransit-2.8.0/tests/test_z.py +68 -0
  41. pytransit-2.7.0/pytransit/models/numba/rrmodel.py +0 -633
  42. pytransit-2.7.0/pytransit/models/roadrunner/model.py +0 -21
  43. pytransit-2.7.0/pytransit/models/roadrunner/model_full.py +0 -216
  44. pytransit-2.7.0/tests/test_ma_quadratic.py +0 -175
  45. pytransit-2.7.0/tests/test_ma_quadratic_nb.py +0 -64
  46. pytransit-2.7.0/tests/test_qpower2_nb.py +0 -61
  47. pytransit-2.7.0/tests/test_transitmodel_helpers.py +0 -211
  48. pytransit-2.7.0/tests/test_uniform_model.py +0 -131
  49. pytransit-2.7.0/tests/test_uniform_model_nb.py +0 -87
  50. pytransit-2.7.0/tests/test_z.py +0 -77
  51. {pytransit-2.7.0 → pytransit-2.8.0}/LICENSE +0 -0
  52. {pytransit-2.7.0 → pytransit-2.8.0}/MANIFEST.in +0 -0
  53. {pytransit-2.7.0 → pytransit-2.8.0}/PyTransit.egg-info/dependency_links.txt +0 -0
  54. {pytransit-2.7.0 → pytransit-2.8.0}/PyTransit.egg-info/top_level.txt +0 -0
  55. {pytransit-2.7.0 → pytransit-2.8.0}/README.md +0 -0
  56. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/contamination/__init__.py +0 -0
  57. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/contamination/contamination.py +0 -0
  58. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/contamination/data/spectra.h5 +0 -0
  59. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/contamination/data/transmission.nc +0 -0
  60. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/contamination/filter.py +0 -0
  61. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/contamination/instrument.py +0 -0
  62. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/contamination/plotting.py +0 -0
  63. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/limb_darkening.py +0 -0
  64. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/__init__.py +0 -0
  65. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/baselines/__init__.py +0 -0
  66. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/baselines/legendrebaseline.py +0 -0
  67. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/baselines/linearbaseline.py +0 -0
  68. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/cntlpf.py +0 -0
  69. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/eclipselpf.py +0 -0
  70. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/loglikelihood/__init__.py +0 -0
  71. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/loglikelihood/celeriteloglikelihood.py +0 -0
  72. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/loglikelihood/clloglikelihood.py +0 -0
  73. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/loglikelihood/fmcloglikelihood.py +0 -0
  74. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/loglikelihood/logisticloglikelihood.py +0 -0
  75. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/loglikelihood/multiceleriteloglikelihood.py +0 -0
  76. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/loglikelihood/wnloglikelihood.py +0 -0
  77. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/logposteriorfunction.py +0 -0
  78. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/lpf.py +0 -0
  79. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/mclpf.py +0 -0
  80. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/mptlpf.py +0 -0
  81. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/ocllpf.py +0 -0
  82. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/ocltdvlpf.py +0 -0
  83. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/oclttvlpf.py +0 -0
  84. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/phasecurvelpf.py +0 -0
  85. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/tdvlpf.py +0 -0
  86. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/tess/__init__.py +0 -0
  87. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/tess/ctesslpf.py +0 -0
  88. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/tess/tessttvlpf.py +0 -0
  89. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/tess/tgclpf.py +0 -0
  90. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/tess/tgcmplpf.py +0 -0
  91. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/tess/tmpclpf.py +0 -0
  92. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/tesslpf.py +0 -0
  93. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/tessoclttvlpf.py +0 -0
  94. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/transitanalysis.py +0 -0
  95. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/transitlpf.py +0 -0
  96. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/lpf/ttvlpf.py +0 -0
  97. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/__init__.py +0 -0
  98. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/general.py +0 -0
  99. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/ldmodel.py +0 -0
  100. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/ldtkldm.py +0 -0
  101. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/limb_darkening/__init__.py +0 -0
  102. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/limb_darkening/general.py +0 -0
  103. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/limb_darkening/linear.py +0 -0
  104. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/limb_darkening/nonlinear.py +0 -0
  105. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/limb_darkening/power_2.py +0 -0
  106. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/limb_darkening/quadratic.py +0 -0
  107. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/limb_darkening/quadratic_tri.py +0 -0
  108. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/limb_darkening/uniform.py +0 -0
  109. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/ma_quadratic_cl.py +0 -0
  110. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/ma_uniform_cl.py +0 -0
  111. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/__init__.py +0 -0
  112. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/general_nb.py +0 -0
  113. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/ldmodels.py +0 -0
  114. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/ldtkldm.py +0 -0
  115. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/phasecurves.py +0 -0
  116. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/numba/spmodel.py +0 -0
  117. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/opencl/ma_quadratic.cl +0 -0
  118. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/opencl/ma_uniform.cl +0 -0
  119. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/opencl/orbits.cl +0 -0
  120. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/opencl/qpower2.cl +0 -0
  121. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/osmodel.py +0 -0
  122. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/qpower2_cl.py +0 -0
  123. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/__init__.py +0 -0
  124. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/common.py +0 -0
  125. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/ecintersection.py +0 -0
  126. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/opmodel.py +0 -0
  127. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/rrmodel.cl +0 -0
  128. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/rrmodel_cl.py +0 -0
  129. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/roadrunner/tsmodel.py +0 -0
  130. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/models/transitmodel.py +0 -0
  131. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/orbits/__init__.py +0 -0
  132. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/orbits/orbits.py +0 -0
  133. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/orbits/orbits_py.py +0 -0
  134. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/orbits/taylor_z.py +0 -0
  135. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/param/__init__.py +0 -0
  136. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/param/parameter.py +0 -0
  137. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/param/prior.py +0 -0
  138. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/param/utilities.py +0 -0
  139. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/stars/__init__.py +0 -0
  140. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/stars/btsettl.py +0 -0
  141. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/stars/data/avg_bt_settl.fits +0 -0
  142. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/stars/data/avg_husser2013.fits +0 -0
  143. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/stars/husser2013.py +0 -0
  144. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/__init__.py +0 -0
  145. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/astrometry.py +0 -0
  146. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/constants.py +0 -0
  147. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/de.py +0 -0
  148. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/downsample.py +0 -0
  149. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/eclipses.py +0 -0
  150. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/io/__init__.py +0 -0
  151. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/io/lightcurvedata.py +0 -0
  152. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/keplerlc.py +0 -0
  153. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/mdwarfs.py +0 -0
  154. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/misc.py +0 -0
  155. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/mocklc.py +0 -0
  156. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/octasphere.py +0 -0
  157. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/phasecurves.py +0 -0
  158. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/physics.py +0 -0
  159. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/rv.py +0 -0
  160. {pytransit-2.7.0 → pytransit-2.8.0}/pytransit/utils/tess.py +0 -0
  161. {pytransit-2.7.0 → pytransit-2.8.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyTransit
3
- Version: 2.7.0
3
+ Version: 2.8.0
4
4
  Summary: Fast and painless exoplanet transit light curve modelling.
5
5
  Author-email: Hannu Parviainen <hpparvi@gmail.com>
6
6
  License: GPLv2
@@ -35,7 +35,7 @@ Requires-Dist: emcee
35
35
  Requires-Dist: pyopencl
36
36
  Requires-Dist: corner
37
37
  Requires-Dist: celerite
38
- Requires-Dist: meepmeep>=0.8.0
38
+ Requires-Dist: meepmeep>=1.0.0
39
39
  Dynamic: license-file
40
40
 
41
41
  PyTransit
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyTransit
3
- Version: 2.7.0
3
+ Version: 2.8.0
4
4
  Summary: Fast and painless exoplanet transit light curve modelling.
5
5
  Author-email: Hannu Parviainen <hpparvi@gmail.com>
6
6
  License: GPLv2
@@ -35,7 +35,7 @@ Requires-Dist: emcee
35
35
  Requires-Dist: pyopencl
36
36
  Requires-Dist: corner
37
37
  Requires-Dist: celerite
38
- Requires-Dist: meepmeep>=0.8.0
38
+ Requires-Dist: meepmeep>=1.0.0
39
39
  Dynamic: license-file
40
40
 
41
41
  PyTransit
@@ -85,7 +85,6 @@ pytransit/models/numba/ma_quadratic_nb.py
85
85
  pytransit/models/numba/ma_uniform_nb.py
86
86
  pytransit/models/numba/phasecurves.py
87
87
  pytransit/models/numba/qpower2_nb.py
88
- pytransit/models/numba/rrmodel.py
89
88
  pytransit/models/numba/spmodel.py
90
89
  pytransit/models/numba/udmodel.py
91
90
  pytransit/models/opencl/ma_quadratic.cl
@@ -96,7 +95,7 @@ pytransit/models/roadrunner/__init__.py
96
95
  pytransit/models/roadrunner/common.py
97
96
  pytransit/models/roadrunner/ecintersection.py
98
97
  pytransit/models/roadrunner/esmodel.py
99
- pytransit/models/roadrunner/model.py
98
+ pytransit/models/roadrunner/model_eclipse.py
100
99
  pytransit/models/roadrunner/model_ecspec.py
101
100
  pytransit/models/roadrunner/model_full.py
102
101
  pytransit/models/roadrunner/model_simple.py
@@ -143,6 +142,7 @@ tests/test_limb_darkening.py
143
142
  tests/test_ma_quadratic.py
144
143
  tests/test_ma_quadratic_nb.py
145
144
  tests/test_qpower2_nb.py
145
+ tests/test_roadrunner_eclipse.py
146
146
  tests/test_transitmodel_helpers.py
147
147
  tests/test_uniform_model.py
148
148
  tests/test_uniform_model_nb.py
@@ -17,4 +17,4 @@ emcee
17
17
  pyopencl
18
18
  corner
19
19
  celerite
20
- meepmeep>=0.8.0
20
+ meepmeep>=1.0.0
@@ -35,3 +35,8 @@ include-package-data = true
35
35
  [tool.setuptools.packages.find]
36
36
  include = ["pytransit"]
37
37
  namespaces = true
38
+
39
+ [tool.pytest.ini_options]
40
+ testpaths = ["tests"]
41
+ python_files = ["test_*.py"]
42
+ addopts = "-ra"
@@ -41,7 +41,7 @@ Date
41
41
 
42
42
  """
43
43
 
44
- __version__ = '2.7.0'
44
+ __version__ = '2.8.0'
45
45
 
46
46
  # Generic
47
47
  # -------
@@ -32,8 +32,8 @@ from astropy.table import Column
32
32
  from corner import corner
33
33
  from matplotlib.pyplot import subplots, setp
34
34
  from numba import njit
35
- from numpy import zeros, log, pi, inf, atleast_2d, arange, arctan2, cos, squeeze, median, linspace, \
36
- percentile, argsort, sum, concatenate, full, sqrt, ndarray
35
+ from numpy import zeros, log, pi, inf, atleast_2d, arange, arctan2, cos, squeeze, median, linspace, percentile, argsort, \
36
+ sum, concatenate, full, sqrt, ndarray, floor
37
37
  from numpy.random.mtrand import permutation
38
38
 
39
39
  from pytransit.lpf.logposteriorfunction import LogPosteriorFunction
@@ -57,7 +57,7 @@ def lnlike_normal(o, m, e):
57
57
 
58
58
 
59
59
  class RVLPF(LogPosteriorFunction):
60
- def __init__(self, name: str, nplanets: int, times, rvs, rves, rvis=None, slope_order: int = 1):
60
+ def __init__(self, name: str, nplanets: int, times, rvs, rves, rvis, is_transiting, slope_order: int = 1):
61
61
  super().__init__(name)
62
62
 
63
63
  def transform_input(a):
@@ -76,8 +76,8 @@ class RVLPF(LogPosteriorFunction):
76
76
  else:
77
77
  rvis = zeros(len(times), 'int')
78
78
 
79
- self._tref = concatenate(times).mean()
80
- self.rvm: RVModel = RVModel(self, nplanets, times, rvs, rves, rvis, slope_order=slope_order)
79
+ self._tref = floor(concatenate(times).min())
80
+ self.rvm: RVModel = RVModel(self, nplanets, times, rvs, rves, rvis, is_transiting=is_transiting, slope_order=slope_order)
81
81
 
82
82
  def model(self, pv):
83
83
  return self.rvm.rv_model(pv)
@@ -102,7 +102,7 @@ class RVModel:
102
102
  """
103
103
 
104
104
  def __init__(self, lpf: LogPosteriorFunction, nplanets: int,
105
- times, rvs: Iterable, rves: Iterable, rvis: Iterable,
105
+ times, rvs: Iterable, rves: Iterable, rvis: Iterable, is_transiting,
106
106
  tref: Optional[float] = None, slope_order: int = 1):
107
107
  self.lpf = lpf
108
108
 
@@ -110,6 +110,10 @@ class RVModel:
110
110
  assert lpf.nplanets == nplanets
111
111
  self.nplanets = nplanets
112
112
 
113
+ if len(is_transiting) != self.nplanets:
114
+ raise ValueError("The size of the is_transiting list must equal the number of planets.")
115
+ self.is_transiting = is_transiting
116
+
113
117
  if hasattr(lpf, '_tref'):
114
118
  assert tref is None
115
119
  self._tref = lpf._tref
@@ -152,12 +156,15 @@ class RVModel:
152
156
  self.ps = ps = ParameterSet([])
153
157
  pp = []
154
158
  for i in range(1, self.nplanets + 1):
155
- pp.extend([
156
- GParameter(f'tc_{i}', f'zero epoch {i}', 'd', NP(0.0, 0.1), (-inf, inf)),
157
- GParameter(f'p_{i}', f'period {i}', 'd', NP(1.0, 1e-5), (0, inf)),
158
- GParameter(f'secw_{i}', f'sqrt(e) cos(w) {i}', '', UP(-1.0, 1.0), (-1, 1)),
159
- GParameter(f'sesw_{i}', f'sqrt(e) sin(w) {i}', '', UP(-1.0, 1.0), (-1, 1)),
160
- ])
159
+ if self.is_transiting[i-1]:
160
+ pp.append(GParameter(f't0_{i}', f'zero epoch {i}', 'd', NP(0.0, 0.1), (-inf, inf)))
161
+ else:
162
+ pp.append(GParameter(f'm0_{i}', f'reference mean anomaly {i}', 'd', UP(0.0, 2*pi), (0, 2*pi)))
163
+
164
+ pp.extend([GParameter(f'p_{i}', f'period {i}', 'd', NP(1.0, 1e-5), (0, inf)),
165
+ GParameter(f'secw_{i}', f'sqrt(e) cos(w) {i}', '', UP(-1.0, 1.0), (-1, 1)),
166
+ GParameter(f'sesw_{i}', f'sqrt(e) sin(w) {i}', '', UP(-1.0, 1.0), (-1, 1)),
167
+ ])
161
168
  ps.add_global_block('planets', pp)
162
169
  self._start_pl = ps.blocks[-1].start
163
170
  self._sl_pl = ps.blocks[-1].slice
@@ -190,9 +197,11 @@ class RVModel:
190
197
  self._sl_rv_slope = ps.blocks[-1].slice
191
198
  self.ps.freeze()
192
199
 
193
- pnames = "rv_k_{} tc_{} p_{} secw_{} sesw_{}".split()
200
+ pnames_tr = "rv_k_{} t0_{} p_{} secw_{} sesw_{}".split()
201
+ pnames_nt = "rv_k_{} m0_{} p_{} secw_{} sesw_{}".split()
194
202
  self.pids = zeros((self.nplanets, 5), 'int')
195
203
  for ipl in range(self.nplanets):
204
+ pnames = pnames_tr if self.is_transiting[ipl] else pnames_nt
196
205
  for ip, p in enumerate(pnames):
197
206
  name = p.format(ipl + 1)
198
207
  self.pids[ipl, ip] = self.ps.names.index(name)
@@ -216,7 +225,10 @@ class RVModel:
216
225
  planets = planets if planets is not None else arange(self.nplanets)
217
226
  for ipl in planets:
218
227
  pv = pvp[:, self.pids[ipl]]
219
- tc = pv[:, 1] - self._tref
228
+ if self.is_transiting[ipl]:
229
+ tc = pv[:, 1] - self._tref
230
+ else:
231
+ tc = pv[:, 1] / (2*pi) * pv[:, 2]
220
232
  p = pv[:, 2]
221
233
  e = pv[:, 3] ** 2 + pv[:, 4] ** 2
222
234
  w = arctan2(pv[:, 4], pv[:, 3])
@@ -345,7 +357,10 @@ class RVModel:
345
357
  rv_others = median(self.rv_model(pvp, planets=other_planets, add_sv=False, add_slope=False), 0)
346
358
 
347
359
  period = pv[self.ps.names.index(f'p_{planet + 1}')]
348
- tc = pv[self.ps.names.index(f'tc_{planet + 1}')] - self._tref
360
+ if self.is_transiting[planet]:
361
+ tc = pv[self.ps.names.index(f't0_{planet + 1}')] - self._tref
362
+ else:
363
+ tc = pv[self.ps.names.index(f'm0_{planet + 1}')] / (2*pi) * period
349
364
 
350
365
  phase = (fold(self._timea, period, tc, 0.5) - 0.5) * period
351
366
  phase_model = (fold(rv_time, period, tc, 0.5) - 0.5) * period
@@ -18,7 +18,7 @@ from typing import Union, Optional
18
18
 
19
19
  from numba import njit
20
20
  from numpy import ndarray, squeeze, zeros, asarray, ones
21
- from .numba.ma_uniform_nb import uniform_model_v, uniform_model_s, uniform_model_pv
21
+ from .numba.ma_uniform_nb import uniform_model_v, uniform_model_s
22
22
  from .transitmodel import TransitModel
23
23
 
24
24
  __all__ = ['EclipseModel']
@@ -140,29 +140,3 @@ class EclipseModel(TransitModel):
140
140
  if fr is not None:
141
141
  flux = 1.0 + (flux - 1.0) * fr
142
142
  return squeeze(flux)
143
-
144
- def evaluate_pv(self, pvp: ndarray, fr = None) -> ndarray:
145
- """Evaluate the transit model for a 2D parameter array.
146
-
147
- Parameters
148
- ----------
149
- pvp
150
- Parameter array with a shape `(npv, npar)` where `npv` is the number of parameter vectors, and each row
151
- contains a set of parameters `[k, t0, p, a, i, e, w]`. The radius ratios can also be given per passband,
152
- in which case the row should be structured as `[k_0, k_1, k_2, ..., k_npb, t0, p, a, i, e, w]`.
153
-
154
- Notes
155
- -----
156
- This version of the `evaluate` method is optimized for calculating several models in parallel, such as when
157
- using *emcee* for MCMC sampling.
158
-
159
- Returns
160
- -------
161
- ndarray
162
- Modelled flux either as a 1D or 2D ndarray.
163
- """
164
- assert self.time is not None, "Need to set the data before calling the transit model."
165
- flux = uniform_model_pv(self.time, pvp, self.lcids, self.pbids, self.nsamples, self.exptimes, zsign=-1.0)
166
- if fr is not None:
167
- flux = 1.0 + (flux - 1.0) * fr
168
- return squeeze(flux)
@@ -30,8 +30,9 @@ from .numba.gdmodel import create_star_xy, create_planet_xy, map_osm, xy_taylor_
30
30
  luminosity_v2, planck, create_star_luminosity
31
31
  from ..contamination.filter import Filter, DeltaFilter
32
32
  from ..stars import read_bt_settl_table, read_husser2013_table
33
+ from meepmeep.backends.numba.point2d import solve2d, find_contact_point
34
+
33
35
  from ..orbits import as_from_rhop, i_from_baew
34
- from ..orbits.taylor_z import vajs_from_paiew, find_contact_point
35
36
  from ..utils.octasphere import octasphere
36
37
 
37
38
 
@@ -214,15 +215,15 @@ class GravityDarkenedModel(TransitModel):
214
215
 
215
216
  # Plot the orbit
216
217
  # --------------
217
- y0, vx, vy, ax_, ay, jx, jy, sx, sy = vajs_from_paiew(p, a, inc, e, w)
218
- c1 = find_contact_point(k, 1, y0, vx, vy, ax_, ay, jx, jy, sx, sy)
219
- c4 = find_contact_point(k, 4, y0, vx, vy, ax_, ay, jx, jy, sx, sy)
218
+ cf = solve2d(0.0, p, a, inc, e, w)
219
+ c1 = find_contact_point(k, 1, cf)
220
+ c4 = find_contact_point(k, 4, cf)
220
221
  time = linspace(2 * c1, 2 * c4, 100)
221
222
 
222
- ox, oy = xy_taylor_vt(time, alpha, y0, vx, vy, ax_, ay, jx, jy, sx, sy)
223
+ ox, oy = xy_taylor_vt(time, alpha, cf)
223
224
  ax.plot(ox, oy, 'k')
224
225
 
225
- pxy = xy_taylor_vt(array([0.0]), alpha, y0, vx, vy, ax_, ay, jx, jy, sx, sy)
226
+ pxy = xy_taylor_vt(array([0.0]), alpha, cf)
226
227
  ax.add_artist(Circle(pxy, k, zorder=10, fc='k'))
227
228
 
228
229
  # Plot the info
@@ -314,7 +315,7 @@ class GravityDarkenedModel(TransitModel):
314
315
  st, sx, sy = create_star_xy(res)
315
316
  fstar = create_star_luminosity(res, sx, sy, mstar, self.rstar, ostar, tpole, gpole, f,
316
317
  sphi, cphi, beta, ldc, self._flux_table, self._teff0, self._dteff, self.accurate_mu)
317
- px, py = xy_taylor_vt(self.time - t0, l, *vajs_from_paiew(p, a, i, e, w))
318
+ px, py = xy_taylor_vt(self.time - t0, l, solve2d(0.0, p, a, i, e, w))
318
319
 
319
320
  if plot:
320
321
  fig, ax = subplots()
@@ -17,7 +17,7 @@ from typing import Union
17
17
 
18
18
  from numpy import ndarray, array, squeeze, asarray, zeros, isscalar
19
19
 
20
- from .numba.ma_chromosphere_nb import chromosphere_model_pv, chromosphere_model_v, chromosphere_model_s
20
+ from .numba.ma_chromosphere_nb import chromosphere_model_v, chromosphere_model_s
21
21
  from .transitmodel import TransitModel
22
22
 
23
23
  __all__ = ['ChromosphereModel']
@@ -120,27 +120,3 @@ class ChromosphereModel(TransitModel):
120
120
  self._es, self._ms, self._tae)
121
121
  return squeeze(flux)
122
122
 
123
- def evaluate_pv(self, pvp: ndarray) -> ndarray:
124
- """Evaluate the transit model for a 2D parameter array.
125
-
126
- Parameters
127
- ----------
128
- pvp
129
- Parameter array with a shape `(npv, npar)` where `npv` is the number of parameter vectors, and each row
130
- contains a set of parameters `[k, t0, p, a, i, e, w]`. The radius ratios can also be given per passband,
131
- in which case the row should be structured as `[k_0, k_1, k_2, ..., k_npb, t0, p, a, i, e, w]`.
132
-
133
- Notes
134
- -----
135
- This version of the `evaluate` method is optimized for calculating several models in parallel, such as when
136
- using *emcee* for MCMC sampling.
137
-
138
- Returns
139
- -------
140
- ndarray
141
- Modelled flux either as a 1D or 2D ndarray.
142
- """
143
- assert self.time is not None, "Need to set the data before calling the transit model."
144
- flux = chromosphere_model_pv(self.time, pvp, self.lcids, self.pbids, self.nsamples, self.exptimes, self._es,
145
- self._ms, self._tae)
146
- return squeeze(flux)
@@ -30,7 +30,7 @@ from typing import Union, Optional, List
30
30
 
31
31
  from numpy import ndarray, array, squeeze, atleast_2d, atleast_1d, zeros, asarray, inf, isscalar
32
32
 
33
- from .numba.ma_quadratic_nb import quadratic_model_pv, calculate_interpolation_tables, quadratic_model_v, quadratic_model_s
33
+ from .numba.ma_quadratic_nb import calculate_interpolation_tables, quadratic_model_v, quadratic_model_s
34
34
  from .transitmodel import TransitModel
35
35
 
36
36
  __all__ = ['QuadraticModel']
@@ -191,39 +191,6 @@ class QuadraticModel(TransitModel):
191
191
  self.ed, self.ld, self.le, self.kt, self.zt, self.interpolate)
192
192
  return squeeze(flux)
193
193
 
194
- def evaluate_pv(self, pvp: ndarray, ldc: ndarray, copy: bool = True) -> ndarray:
195
- """Evaluate the transit model for a 2D parameter array.
196
-
197
- Parameters
198
- ----------
199
- pvp: ndarray
200
- Parameter array with a shape `(npv, npar)` where `npv` is the number of parameter vectors, and each row
201
- contains a set of parameters `[k, t0, p, a, i, e, w]`. The radius ratios can also be given per passband,
202
- in which case the row should be structured as `[k_0, k_1, k_2, ..., k_npb, t0, p, a, b, e, w]`.
203
- ldc: ndarray
204
- Limb darkening coefficient array with shape `(npv, 2*npb)`, where `npv` is the number of parameter vectors
205
- and `npb` is the number of passbands.
206
-
207
- Notes
208
- -----
209
- This version of the `evaluate` method is optimized for calculating several models in parallel, such as when
210
- using *emcee* for MCMC sampling.
211
-
212
- Returns
213
- -------
214
- ndarray
215
- Modelled flux either as a 1D or 2D ndarray.
216
- """
217
-
218
- ldc = asarray(ldc)
219
- pvp = asarray(pvp)
220
-
221
- if self.time is None:
222
- raise ValueError("Need to set the data before calling the transit model.")
223
-
224
- flux = quadratic_model_pv(self.time, pvp, ldc, self.lcids, self.pbids, self.nsamples, self.exptimes,
225
- self.npb, self.ed, self.ld, self.le, self.kt, self.zt, self.interpolate)
226
- return squeeze(flux)
227
194
 
228
195
  def to_opencl(self):
229
196
  """Creates an OpenCL clone (`QuadraticModelCL`) of the transit model.
@@ -16,7 +16,7 @@
16
16
 
17
17
  from typing import Union
18
18
  from numpy import ndarray, squeeze, zeros, asarray, isscalar
19
- from .numba.ma_uniform_nb import uniform_model_v, uniform_model_s, uniform_model_pv
19
+ from .numba.ma_uniform_nb import uniform_model_v, uniform_model_s
20
20
  from .transitmodel import TransitModel
21
21
 
22
22
  __all__ = ['UniformModel']
@@ -122,27 +122,3 @@ class UniformModel(TransitModel):
122
122
  k = asarray(k)
123
123
  flux = uniform_model_s(self.time, k, t0, p, a, i, e, w, self.lcids, self.pbids, self.nsamples, self.exptimes, zsign=self._zsign)
124
124
  return squeeze(flux)
125
-
126
- def evaluate_pv(self, pvp: ndarray) -> ndarray:
127
- """Evaluate the transit model for a 2D parameter array.
128
-
129
- Parameters
130
- ----------
131
- pvp
132
- Parameter array with a shape `(npv, npar)` where `npv` is the number of parameter vectors, and each row
133
- contains a set of parameters `[k, t0, p, a, i, e, w]`. The radius ratios can also be given per passband,
134
- in which case the row should be structured as `[k_0, k_1, k_2, ..., k_npb, t0, p, a, i, e, w]`.
135
-
136
- Notes
137
- -----
138
- This version of the `evaluate` method is optimized for calculating several models in parallel, such as when
139
- using *emcee* for MCMC sampling.
140
-
141
- Returns
142
- -------
143
- ndarray
144
- Modelled flux either as a 1D or 2D ndarray.
145
- """
146
- assert self.time is not None, "Need to set the data before calling the transit model."
147
- flux = uniform_model_pv(self.time, pvp, self.lcids, self.pbids, self.nsamples, self.exptimes, zsign=self._zsign)
148
- return squeeze(flux)
@@ -19,8 +19,9 @@ from scipy.constants import G, k, h, c
19
19
  from numpy import exp, pi, sqrt, zeros, sin, cos, nan, inf, linspace, meshgrid, floor, isfinite, fmax, isnan, nanmean, \
20
20
  arange, zeros_like, atleast_2d, array, cross, sign
21
21
 
22
+ from meepmeep.backends.numba.point2d import solve2d, find_contact_point, bounding_box
23
+
22
24
  from ..roadrunner.common import circle_circle_intersection_area
23
- from ...orbits.taylor_z import vajs_from_paiew, find_contact_point, t14
24
25
 
25
26
  d2sec = 24.*60.*60.
26
27
 
@@ -397,18 +398,18 @@ def mean_luminosity_under_planet(x, y, mstar, rstar, ostar, tpole, gpole, f, sph
397
398
 
398
399
 
399
400
  @njit
400
- def calculate_luminosity_interpolation_table(res, k, xp, yp, sa, ca, y0, vx, vy, ax, ay, jx, jy, sx, sy,
401
+ def calculate_luminosity_interpolation_table(res, k, xp, yp, sa, ca, c,
401
402
  mstar, rstar, ostar, tpole, gpole, f, sphi, cphi, beta, ldc,
402
403
  ftable, t0, dt, accurate_mu):
403
- t1 = find_contact_point(k, 1, y0, vx, vy, ax, ay, jx, jy, sx, sy)
404
- t4 = find_contact_point(k, 4, y0, vx, vy, ax, ay, jx, jy, sx, sy)
404
+ t1 = find_contact_point(k, 1, c)
405
+ t4 = find_contact_point(k, 4, c)
405
406
  times = linspace(t1, t4, res)
406
407
 
407
408
  npb = ftable.shape[0]
408
409
  lt = zeros((npb, res))
409
410
  for ipb in range(npb):
410
411
  for i in range(lt.shape[1]):
411
- x, y = xy_taylor_st(times[i], sa, ca, y0, vx, vy, ax, ay, jx, jy, sx, sy)
412
+ x, y = xy_taylor_st(times[i], sa, ca, c)
412
413
  xs = x + k * xp
413
414
  ys = y + k * yp
414
415
  lt[ipb, i] = mean_luminosity_under_planet(xs, ys, mstar, rstar, ostar, tpole, gpole, f, sphi, cphi, beta, ldc,
@@ -436,12 +437,9 @@ def calculate_luminosity_interpolation_table(res, k, xp, yp, sa, ca, y0, vx, vy,
436
437
 
437
438
 
438
439
  @njit(fastmath=True)
439
- def xy_taylor_st(t, sa, ca, y0, vx, vy, ax, ay, jx, jy, sx, sy):
440
- t2 = t*t
441
- t3 = t2*t
442
- t4 = t3*t
443
- px = vx*t + 0.5*ax*t2 + jx*t3/6.0 + sx*t4/24.
444
- py = y0 + vy*t + 0.5*ay*t2 + jy*t3/6.0 + sy*t4/24.
440
+ def xy_taylor_st(t, sa, ca, c):
441
+ px = c[0, 0] + t*(c[0, 1] + t*(c[0, 2] + t*(c[0, 3] + t*c[0, 4])))
442
+ py = c[1, 0] + t*(c[1, 1] + t*(c[1, 2] + t*(c[1, 3] + t*c[1, 4])))
445
443
 
446
444
  x = ca*px - sa*py
447
445
  y = ca*py + sa*px
@@ -450,18 +448,15 @@ def xy_taylor_st(t, sa, ca, y0, vx, vy, ax, ay, jx, jy, sx, sy):
450
448
 
451
449
 
452
450
  @njit(fastmath=True)
453
- def xy_taylor_vt(ts, a, y0, vx, vy, ax, ay, jx, jy, sx, sy):
451
+ def xy_taylor_vt(ts, a, c):
454
452
  npt = ts.size
455
453
  x, y = zeros(npt), zeros(npt)
456
454
  ca, sa = cos(a), sin(a)
457
455
 
458
456
  for i in range(npt):
459
457
  t = ts[i]
460
- t2 = t*t
461
- t3 = t2*t
462
- t4 = t3*t
463
- px = vx*t + 0.5*ax*t2 + jx*t3/6.0 + sx*t4/24.
464
- py = y0 + vy*t + 0.5*ay*t2 + jy*t3/6.0 + sy*t4/24.
458
+ px = c[0, 0] + t*(c[0, 1] + t*(c[0, 2] + t*(c[0, 3] + t*c[0, 4])))
459
+ py = c[1, 0] + t*(c[1, 1] + t*(c[1, 2] + t*(c[1, 3] + t*c[1, 4])))
465
460
 
466
461
  x[i] = ca*px - sa*py
467
462
  y[i] = ca*py + sa*px
@@ -470,7 +465,7 @@ def xy_taylor_vt(ts, a, y0, vx, vy, ax, ay, jx, jy, sx, sy):
470
465
 
471
466
 
472
467
  @njit
473
- def find_contact_point_2d(k: float, point: int, az, feff, y0, vx, vy, ax, ay, jx, jy, sx, sy):
468
+ def find_contact_point_2d(k: float, point: int, az, feff, c):
474
469
  if point == 1 or point == 2 or point == 12:
475
470
  s = -1.0
476
471
  else:
@@ -483,14 +478,16 @@ def find_contact_point_2d(k: float, point: int, az, feff, y0, vx, vy, ax, ay, jx
483
478
  else:
484
479
  zt = 1.0
485
480
 
481
+ vx = c[0, 1]
482
+
486
483
  t0 = 0.0
487
484
  t2 = s * 2.0 / vx
488
485
  t1 = 0.5 * t2
489
486
 
490
487
  sa, ca = sin(az), cos(az)
491
488
 
492
- x0, y0 = xy_taylor_st(t0, sa, ca, y0, vx, vy, ax, ay, jx, jy, sx, sy)
493
- x1, y1 = xy_taylor_st(t1, sa, ca, y0, vx, vy, ax, ay, jx, jy, sx, sy)
489
+ x0, y0 = xy_taylor_st(t0, sa, ca, c)
490
+ x1, y1 = xy_taylor_st(t1, sa, ca, c)
494
491
  z0 = sqrt(x0 ** 2 + (y0 / (1 - feff)) ** 2) - zt
495
492
  z1 = sqrt(x1 ** 2 + (y1 / (1 - feff)) ** 2) - zt
496
493
 
@@ -499,12 +496,12 @@ def find_contact_point_2d(k: float, point: int, az, feff, y0, vx, vy, ax, ay, jx
499
496
  if z0 * z1 < 0.0:
500
497
  t1, t2 = 0.5 * (t0 + t1), t1
501
498
  z2 = z1
502
- x1, y1 = xy_taylor_st(t1, sa, ca, y0, vx, vy, ax, ay, jx, jy, sx, sy)
499
+ x1, y1 = xy_taylor_st(t1, sa, ca, c)
503
500
  z1 = sqrt(x1 ** 2 + (y1 / (1 - feff)) ** 2) - zt
504
501
  else:
505
502
  t0, t1 = t1, 0.5 * (t1 + t2)
506
503
  z0 = z1
507
- x1, y1 = xy_taylor_st(t1, sa, ca, y0, vx, vy, ax, ay, jx, jy, sx, sy)
504
+ x1, y1 = xy_taylor_st(t1, sa, ca, c)
508
505
  z1 = sqrt(x1 ** 2 + (y1 / (1 - feff)) ** 2) - zt
509
506
  i += 1
510
507
  return t1
@@ -516,16 +513,17 @@ def oblate_model_s(t, k, t0, p, a, aa, i, e, w, ldc,
516
513
  f, feff, sphi, cphi, beta, ftable, teff0, dteff,
517
514
  tres, ts, xs, ys, xp, yp,
518
515
  lcids, pbids, nsamples, exptimes, npb, accurate_mu):
519
- y0, vx, vy, ax, ay, jx, jy, sx, sy = vajs_from_paiew(p, a, i, e, w)
516
+ c = solve2d(0.0, p, a, i, e, w)
520
517
  ldc = atleast_2d(ldc)
521
518
 
522
519
  sa, ca = sin(aa), cos(aa)
523
- half_window_width = 0.025 + 0.5 * t14(k[0], y0, vx, vy, ax, ay, jx, jy, sx, sy)
520
+ bt1, bt4 = bounding_box(k[0], c)
521
+ bt1 -= 0.025
522
+ bt4 += 0.025
524
523
 
525
524
  npt = t.size
526
525
  flux = zeros(npt)
527
- tp, lp = calculate_luminosity_interpolation_table(tres, k[0], xp, yp, sa, ca,
528
- y0, vx, vy, ax, ay, jx, jy, sx, sy,
526
+ tp, lp = calculate_luminosity_interpolation_table(tres, k[0], xp, yp, sa, ca, c,
529
527
  mstar, rstar, ostar, tpole, gpole, f,
530
528
  sphi, cphi, beta, ldc, ftable, teff0, dteff, accurate_mu)
531
529
  dtp = tp[1] - tp[0]
@@ -541,7 +539,7 @@ def oblate_model_s(t, k, t0, p, a, aa, i, e, w, ldc,
541
539
  for j in range(npt):
542
540
  epoch = floor((t[j] - t0 + 0.5*p)/p)
543
541
  tc = t[j] - (t0 + epoch*p)
544
- if abs(tc) > half_window_width:
542
+ if not (bt1 <= tc <= bt4):
545
543
  flux[j] = 1.0
546
544
  else:
547
545
  ilc = lcids[j]
@@ -570,7 +568,7 @@ def oblate_model_s(t, k, t0, p, a, aa, i, e, w, ldc,
570
568
  at = (to - tp[it]) / dtp
571
569
  ml = (1.0 - at) * lp[ipb, it] + at * lp[ipb, it + 1]
572
570
 
573
- x, y = xy_taylor_st(to, sa, ca, y0, vx, vy, ax, ay, jx, jy, sx, sy)
571
+ x, y = xy_taylor_st(to, sa, ca, c)
574
572
 
575
573
  b = sqrt(x**2 + (y / (1. - feff))**2)
576
574
  ia = circle_circle_intersection_area(1., _k, b)
@@ -213,35 +213,3 @@ def chromosphere_model_s(t, k, t0, p, a, i, e, w, lcids, pbids, nsamples, exptim
213
213
  flux[j] += chromosphere_z_s(z, _k)
214
214
  flux[j] /= nsamples[ilc]
215
215
  return flux
216
-
217
- @njit(parallel=True, fastmath=True)
218
- def chromosphere_model_pv(t, pvp, lcids, pbids, nsamples, exptimes, es, ms, tae):
219
- pvp = atleast_2d(pvp)
220
- npv = pvp.shape[0]
221
- npt = t.size
222
- nk = pvp.shape[1] - 6
223
-
224
- flux = zeros((npv, npt))
225
- for j in prange(npt):
226
- for ipv in range(npv):
227
- t0, p, a, i, e, w = pvp[ipv,nk:]
228
- ilc = lcids[j]
229
- ipb = pbids[ilc]
230
-
231
- if nk == 1:
232
- k = pvp[ipv, 0]
233
- else:
234
- if ipb < nk:
235
- k = pvp[ipv, ipb]
236
- else:
237
- k = nan
238
-
239
- for isample in range(1,nsamples[ilc]+1):
240
- time_offset = exptimes[ilc] * ((isample - 0.5) / nsamples[ilc] - 0.5)
241
- z = z_ip_s(t[j]+time_offset, t0, p, a, i, e, w, es, ms, tae)
242
- if z > 1.0+k:
243
- flux[ipv, j] += 1.
244
- else:
245
- flux[ipv, j] += chromosphere_z_s(z, k)
246
- flux[ipv, j] /= nsamples[ilc]
247
- return flux