PyTransit 2.6.4__tar.gz → 2.6.6__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.
- {pytransit-2.6.4 → pytransit-2.6.6}/PKG-INFO +13 -7
- {pytransit-2.6.4 → pytransit-2.6.6}/PyTransit.egg-info/PKG-INFO +13 -7
- {pytransit-2.6.4 → pytransit-2.6.6}/PyTransit.egg-info/SOURCES.txt +1 -3
- {pytransit-2.6.4 → pytransit-2.6.6}/PyTransit.egg-info/requires.txt +12 -6
- {pytransit-2.6.4 → pytransit-2.6.6}/pyproject.toml +9 -6
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/rvlpf.py +16 -9
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/eclipse_model.py +1 -70
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/gdmodel.py +6 -5
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/ldtkldm.py +12 -4
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/gdmodel.py +38 -5
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/udmodel.py +1 -2
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/roadrunner/model_trspec.py +12 -15
- pytransit-2.6.6/requirements.txt +21 -0
- pytransit-2.6.4/pytransit/models/roadrunner/opmodel.py +0 -104
- pytransit-2.6.4/pytransit/models/roadrunner/rrmodel.py +0 -230
- pytransit-2.6.4/pytransit/models/roadrunner/tsmodel.py +0 -136
- {pytransit-2.6.4 → pytransit-2.6.6}/LICENSE +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/MANIFEST.in +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/PyTransit.egg-info/dependency_links.txt +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/PyTransit.egg-info/top_level.txt +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/README.md +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/contamination/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/contamination/contamination.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/contamination/data/spectra.h5 +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/contamination/data/transmission.nc +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/contamination/filter.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/contamination/instrument.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/contamination/plotting.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/limb_darkening.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/baselines/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/baselines/legendrebaseline.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/baselines/linearbaseline.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/cntlpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/eclipselpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/loglikelihood/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/loglikelihood/celeriteloglikelihood.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/loglikelihood/clloglikelihood.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/loglikelihood/fmcloglikelihood.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/loglikelihood/logisticloglikelihood.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/loglikelihood/multiceleriteloglikelihood.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/loglikelihood/wnloglikelihood.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/logposteriorfunction.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/lpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/mclpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/mptlpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/ocllpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/ocltdvlpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/oclttvlpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/phasecurvelpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/tdvlpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/tess/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/tess/ctesslpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/tess/tessttvlpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/tess/tgclpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/tess/tgcmplpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/tess/tmpclpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/tesslpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/tessoclttvlpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/transitanalysis.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/transitlpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/lpf/ttvlpf.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/general.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/ldmodel.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/limb_darkening/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/limb_darkening/general.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/limb_darkening/linear.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/limb_darkening/nonlinear.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/limb_darkening/power_2.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/limb_darkening/quadratic.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/limb_darkening/quadratic_tri.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/limb_darkening/uniform.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/ma_chromosphere.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/ma_quadratic.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/ma_quadratic_cl.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/ma_uniform.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/ma_uniform_cl.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/general_nb.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/ldmodels.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/ldtkldm.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/ma_chromosphere_nb.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/ma_quadratic_nb.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/ma_uniform_nb.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/phasecurves.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/qpower2_nb.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/rrmodel.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/numba/spmodel.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/opencl/ma_quadratic.cl +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/opencl/ma_uniform.cl +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/opencl/orbits.cl +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/opencl/qpower2.cl +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/osmodel.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/qpower2.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/qpower2_cl.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/roadrunner/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/roadrunner/common.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/roadrunner/ecintersection.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/roadrunner/model.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/roadrunner/model_full.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/roadrunner/model_simple.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/roadrunner/opmodel_full.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/roadrunner/rrmodel.cl +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/roadrunner/rrmodel_cl.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/transitmodel.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/models/uniform.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/orbits/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/orbits/orbits.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/orbits/orbits_py.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/orbits/taylor_z.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/param/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/param/parameter.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/param/prior.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/param/utilities.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/stars/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/stars/btsettl.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/stars/data/avg_bt_settl.fits +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/stars/data/avg_husser2013.fits +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/stars/husser2013.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/astrometry.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/constants.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/de.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/downsample.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/eclipses.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/io/__init__.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/io/lightcurvedata.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/keplerlc.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/mdwarfs.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/misc.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/mocklc.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/octasphere.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/phasecurves.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/physics.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/rv.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/utils/tess.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/pytransit/version.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/setup.cfg +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/tests/test_contamination.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/tests/test_ma_quadratic.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/tests/test_ma_quadratic_nb.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/tests/test_qpower2_nb.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/tests/test_uniform_model.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/tests/test_uniform_model_nb.py +0 -0
- {pytransit-2.6.4 → pytransit-2.6.6}/tests/test_z.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyTransit
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.6
|
|
4
4
|
Summary: Fast and painless exoplanet transit light curve modelling.
|
|
5
5
|
Author-email: Hannu Parviainen <hpparvi@gmail.com>
|
|
6
6
|
License: GPLv2
|
|
@@ -16,21 +16,27 @@ Classifier: Programming Language :: Python
|
|
|
16
16
|
Requires-Python: >=3.8
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
+
Requires-Dist: arviz
|
|
19
20
|
Requires-Dist: numpy
|
|
20
|
-
Requires-Dist: numba
|
|
21
21
|
Requires-Dist: scipy
|
|
22
22
|
Requires-Dist: pandas
|
|
23
23
|
Requires-Dist: xarray
|
|
24
24
|
Requires-Dist: tables
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist:
|
|
25
|
+
Requires-Dist: uncertainties
|
|
26
|
+
Requires-Dist: numba
|
|
27
|
+
Requires-Dist: astropy
|
|
28
|
+
Requires-Dist: matplotlib
|
|
29
|
+
Requires-Dist: tqdm
|
|
28
30
|
Requires-Dist: semantic_version
|
|
31
|
+
Requires-Dist: setuptools
|
|
29
32
|
Requires-Dist: deprecated
|
|
30
|
-
Requires-Dist: uncertainties
|
|
31
|
-
Requires-Dist: pyrr
|
|
32
33
|
Requires-Dist: seaborn
|
|
33
34
|
Requires-Dist: emcee
|
|
35
|
+
Requires-Dist: ldtk
|
|
36
|
+
Requires-Dist: pyopencl
|
|
37
|
+
Requires-Dist: corner
|
|
38
|
+
Requires-Dist: celerite
|
|
39
|
+
Requires-Dist: pyrr
|
|
34
40
|
|
|
35
41
|
PyTransit
|
|
36
42
|
=========
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyTransit
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.6
|
|
4
4
|
Summary: Fast and painless exoplanet transit light curve modelling.
|
|
5
5
|
Author-email: Hannu Parviainen <hpparvi@gmail.com>
|
|
6
6
|
License: GPLv2
|
|
@@ -16,21 +16,27 @@ Classifier: Programming Language :: Python
|
|
|
16
16
|
Requires-Python: >=3.8
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
+
Requires-Dist: arviz
|
|
19
20
|
Requires-Dist: numpy
|
|
20
|
-
Requires-Dist: numba
|
|
21
21
|
Requires-Dist: scipy
|
|
22
22
|
Requires-Dist: pandas
|
|
23
23
|
Requires-Dist: xarray
|
|
24
24
|
Requires-Dist: tables
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist:
|
|
25
|
+
Requires-Dist: uncertainties
|
|
26
|
+
Requires-Dist: numba
|
|
27
|
+
Requires-Dist: astropy
|
|
28
|
+
Requires-Dist: matplotlib
|
|
29
|
+
Requires-Dist: tqdm
|
|
28
30
|
Requires-Dist: semantic_version
|
|
31
|
+
Requires-Dist: setuptools
|
|
29
32
|
Requires-Dist: deprecated
|
|
30
|
-
Requires-Dist: uncertainties
|
|
31
|
-
Requires-Dist: pyrr
|
|
32
33
|
Requires-Dist: seaborn
|
|
33
34
|
Requires-Dist: emcee
|
|
35
|
+
Requires-Dist: ldtk
|
|
36
|
+
Requires-Dist: pyopencl
|
|
37
|
+
Requires-Dist: corner
|
|
38
|
+
Requires-Dist: celerite
|
|
39
|
+
Requires-Dist: pyrr
|
|
34
40
|
|
|
35
41
|
PyTransit
|
|
36
42
|
=========
|
|
@@ -2,6 +2,7 @@ LICENSE
|
|
|
2
2
|
MANIFEST.in
|
|
3
3
|
README.md
|
|
4
4
|
pyproject.toml
|
|
5
|
+
requirements.txt
|
|
5
6
|
PyTransit.egg-info/PKG-INFO
|
|
6
7
|
PyTransit.egg-info/SOURCES.txt
|
|
7
8
|
PyTransit.egg-info/dependency_links.txt
|
|
@@ -99,12 +100,9 @@ pytransit/models/roadrunner/model.py
|
|
|
99
100
|
pytransit/models/roadrunner/model_full.py
|
|
100
101
|
pytransit/models/roadrunner/model_simple.py
|
|
101
102
|
pytransit/models/roadrunner/model_trspec.py
|
|
102
|
-
pytransit/models/roadrunner/opmodel.py
|
|
103
103
|
pytransit/models/roadrunner/opmodel_full.py
|
|
104
104
|
pytransit/models/roadrunner/rrmodel.cl
|
|
105
|
-
pytransit/models/roadrunner/rrmodel.py
|
|
106
105
|
pytransit/models/roadrunner/rrmodel_cl.py
|
|
107
|
-
pytransit/models/roadrunner/tsmodel.py
|
|
108
106
|
pytransit/orbits/__init__.py
|
|
109
107
|
pytransit/orbits/orbits.py
|
|
110
108
|
pytransit/orbits/orbits_py.py
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
+
arviz
|
|
1
2
|
numpy
|
|
2
|
-
numba
|
|
3
3
|
scipy
|
|
4
4
|
pandas
|
|
5
5
|
xarray
|
|
6
6
|
tables
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
uncertainties
|
|
8
|
+
numba
|
|
9
|
+
astropy
|
|
10
|
+
matplotlib
|
|
11
|
+
tqdm
|
|
10
12
|
semantic_version
|
|
13
|
+
setuptools
|
|
11
14
|
deprecated
|
|
12
|
-
uncertainties
|
|
13
|
-
pyrr
|
|
14
15
|
seaborn
|
|
15
16
|
emcee
|
|
17
|
+
ldtk
|
|
18
|
+
pyopencl
|
|
19
|
+
corner
|
|
20
|
+
celerite
|
|
21
|
+
pyrr
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
1
5
|
[project]
|
|
2
6
|
name = "PyTransit"
|
|
3
|
-
version = "2.6.
|
|
7
|
+
version = "2.6.6"
|
|
4
8
|
description = 'Fast and painless exoplanet transit light curve modelling.'
|
|
5
9
|
authors=[{name='Hannu Parviainen', email='hpparvi@gmail.com'}]
|
|
6
10
|
classifiers=[
|
|
@@ -12,19 +16,18 @@ classifiers=[
|
|
|
12
16
|
"Operating System :: OS Independent",
|
|
13
17
|
"Programming Language :: Python",
|
|
14
18
|
]
|
|
19
|
+
|
|
15
20
|
keywords = ['astronomy', 'astrophysics', 'exoplanets']
|
|
16
|
-
dependencies = ["numpy", "numba", "scipy", "pandas", "xarray", "tables", "meepmeep", "pyopencl", "ldtk",
|
|
17
|
-
"semantic_version", "deprecated", "uncertainties", "pyrr", "seaborn", "emcee"]
|
|
18
21
|
requires-python = ">= 3.8"
|
|
19
22
|
readme = "README.md"
|
|
20
23
|
license = {text = "GPLv2"}
|
|
24
|
+
dynamic = ["dependencies"]
|
|
21
25
|
|
|
22
26
|
[project.urls]
|
|
23
27
|
homepage = 'https://github.com/hpparvi/PyTransit'
|
|
24
28
|
|
|
25
|
-
[
|
|
26
|
-
|
|
27
|
-
build-backend = "setuptools.build_meta"
|
|
29
|
+
[tool.setuptools.dynamic]
|
|
30
|
+
dependencies = {file = ["requirements.txt"]}
|
|
28
31
|
|
|
29
32
|
[tool.setuptools]
|
|
30
33
|
include-package-data = true
|
|
@@ -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):
|
|
60
|
+
def __init__(self, name: str, nplanets: int, times, rvs, rves, rvis=None, slope_order: int = 1):
|
|
61
61
|
super().__init__(name)
|
|
62
62
|
|
|
63
63
|
def transform_input(a):
|
|
@@ -77,7 +77,7 @@ class RVLPF(LogPosteriorFunction):
|
|
|
77
77
|
rvis = zeros(len(times), 'int')
|
|
78
78
|
|
|
79
79
|
self._tref = concatenate(times).mean()
|
|
80
|
-
self.rvm: RVModel = RVModel(self, nplanets, times, rvs, rves, rvis)
|
|
80
|
+
self.rvm: RVModel = RVModel(self, nplanets, times, rvs, rves, rvis, slope_order=slope_order)
|
|
81
81
|
|
|
82
82
|
def model(self, pv):
|
|
83
83
|
return self.rvm.rv_model(pv)
|
|
@@ -103,7 +103,7 @@ class RVModel:
|
|
|
103
103
|
|
|
104
104
|
def __init__(self, lpf: LogPosteriorFunction, nplanets: int,
|
|
105
105
|
times, rvs: Iterable, rves: Iterable, rvis: Iterable,
|
|
106
|
-
tref: Optional[float] = None):
|
|
106
|
+
tref: Optional[float] = None, slope_order: int = 1):
|
|
107
107
|
self.lpf = lpf
|
|
108
108
|
|
|
109
109
|
if hasattr(lpf, 'nplanets'):
|
|
@@ -125,6 +125,7 @@ class RVModel:
|
|
|
125
125
|
self._rva = None
|
|
126
126
|
self._rvea = None
|
|
127
127
|
self._rv_ids = None
|
|
128
|
+
self.slope_order = slope_order
|
|
128
129
|
|
|
129
130
|
self.setup_data(times, rvs, rves, rvis)
|
|
130
131
|
|
|
@@ -183,7 +184,7 @@ class RVModel:
|
|
|
183
184
|
self._start_rvk = ps.blocks[-1].start
|
|
184
185
|
self._sl_rvk = ps.blocks[-1].slice
|
|
185
186
|
|
|
186
|
-
psl = [GParameter('
|
|
187
|
+
psl = [GParameter(f'rv_slope_{i}', 'rv slope', '', NP(0.0, 1.0), (-inf, inf)) for i in range(1, self.slope_order+1)]
|
|
187
188
|
ps.add_global_block('rv_slope', psl)
|
|
188
189
|
self._start_rv_slope = ps.blocks[-1].start
|
|
189
190
|
self._sl_rv_slope = ps.blocks[-1].slice
|
|
@@ -202,7 +203,10 @@ class RVModel:
|
|
|
202
203
|
|
|
203
204
|
def rv_slope(self, pvp, times):
|
|
204
205
|
pvp = atleast_2d(pvp)
|
|
205
|
-
|
|
206
|
+
slope = times * pvp[:, self._start_rv_slope : self._start_rv_slope + 1]
|
|
207
|
+
if self.slope_order == 2:
|
|
208
|
+
slope += times**2 * pvp[:, self._start_rv_slope + 1: self._start_rv_slope + 2]
|
|
209
|
+
return slope
|
|
206
210
|
|
|
207
211
|
def rv_model(self, pvp, times=None, planets=None, add_sv=True, add_slope=True):
|
|
208
212
|
times = self._timea if times is None else times - self._tref
|
|
@@ -264,10 +268,10 @@ class RVModel:
|
|
|
264
268
|
rv_time = linspace(self._timea.min() - 1, self._timea.max() + 1, num=ntimes) + self._tref
|
|
265
269
|
|
|
266
270
|
if pvp is None:
|
|
267
|
-
rv_model = self.rv_model(pv, rv_time, add_sv=False)
|
|
271
|
+
rv_model = self.rv_model(pv, rv_time, add_sv=False, add_slope=slope)
|
|
268
272
|
rv_model_limits = None
|
|
269
273
|
else:
|
|
270
|
-
rv_percentiles = percentile(self.rv_model(pvp, rv_time, add_sv=False), [50, 16, 84, 2.5, 97.5], 0)
|
|
274
|
+
rv_percentiles = percentile(self.rv_model(pvp, rv_time, add_sv=False, add_slope=slope), [50, 16, 84, 2.5, 97.5], 0)
|
|
271
275
|
rv_model = rv_percentiles[0]
|
|
272
276
|
rv_model_limits = rv_percentiles[1:]
|
|
273
277
|
|
|
@@ -279,10 +283,13 @@ class RVModel:
|
|
|
279
283
|
colors = len(self.rvis) * ['k']
|
|
280
284
|
if markers is None:
|
|
281
285
|
markers = len(self.rvis) * ['.']
|
|
282
|
-
rvs = self._rva - self.rv_shifts(pv)
|
|
286
|
+
rvs = self._rva - self.rv_shifts(pv)
|
|
287
|
+
if not slope:
|
|
288
|
+
rvs -= squeeze(self.rv_slope(pv, self._timea))
|
|
289
|
+
|
|
283
290
|
for iid, instrument in enumerate(self.rvis):
|
|
284
291
|
m = self._rv_ids == iid
|
|
285
|
-
axs[0].errorbar(self._timea[m] + self._tref, rvs[m], self._rvea[m],
|
|
292
|
+
axs[0].errorbar(self._timea[m] + self._tref, rvs[m], self._rvea[m], marker=markers[iid], ls='',
|
|
286
293
|
c=colors[iid], ms=4, label=instrument)
|
|
287
294
|
axs[1].errorbar(self._timea[m] + self._tref, self._rva[m] - squeeze(self.rv_model(pv))[m], self._rvea[m],
|
|
288
295
|
fmt='ok', ms=4)
|
|
@@ -38,7 +38,7 @@ class EclipseModel(TransitModel):
|
|
|
38
38
|
Parameters
|
|
39
39
|
----------
|
|
40
40
|
k
|
|
41
|
-
Radius ratio(s) either as a single float
|
|
41
|
+
Radius ratio(s) either as a single float or a 1D vector.
|
|
42
42
|
t0
|
|
43
43
|
Transit center(s) as a float or a 1D vector.
|
|
44
44
|
p
|
|
@@ -97,72 +97,3 @@ class EclipseModel(TransitModel):
|
|
|
97
97
|
flux = 1.0 + (flux - 1.0) / k**2
|
|
98
98
|
|
|
99
99
|
return squeeze(flux)
|
|
100
|
-
|
|
101
|
-
def evaluate_ps(self, k: float, t0: float, p: float, a: float, i: float, e: float = 0., w: float = 0., fr: Optional[float] = None) -> ndarray:
|
|
102
|
-
"""Evaluate the transit model for a set of scalar parameters.
|
|
103
|
-
|
|
104
|
-
Parameters
|
|
105
|
-
----------
|
|
106
|
-
k : array-like
|
|
107
|
-
Radius ratio(s) either as a single float or an 1D array.
|
|
108
|
-
t0 : float
|
|
109
|
-
Transit center as a float.
|
|
110
|
-
p : float
|
|
111
|
-
Orbital period as a float.
|
|
112
|
-
a : float
|
|
113
|
-
Orbital semi-major axis divided by the stellar radius as a float.
|
|
114
|
-
i : float
|
|
115
|
-
Orbital inclination(s) as a float.
|
|
116
|
-
e : float, optional
|
|
117
|
-
Orbital eccentricity as a float.
|
|
118
|
-
w : float, optional
|
|
119
|
-
Argument of periastron as a float.
|
|
120
|
-
fr : float, optional
|
|
121
|
-
Planet-star flux ratio as a float.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
Notes
|
|
125
|
-
-----
|
|
126
|
-
This version of the `evaluate` method is optimized for calculating a single transit model (such as when using a
|
|
127
|
-
local optimizer). If you want to evaluate the model for a large number of parameters simultaneously, use either
|
|
128
|
-
`evaluate` or `evaluate_pv`.
|
|
129
|
-
|
|
130
|
-
Returns
|
|
131
|
-
-------
|
|
132
|
-
ndarray
|
|
133
|
-
Modelled flux as a 1D ndarray.
|
|
134
|
-
"""
|
|
135
|
-
if self.time is None:
|
|
136
|
-
raise ValueError("Need to set the data before calling the transit model.")
|
|
137
|
-
|
|
138
|
-
k = asarray(k)
|
|
139
|
-
flux = uniform_model_s(self.time, k, t0, p, a, i, e, w, self.lcids, self.pbids, self.nsamples, self.exptimes, zsign=-1.0)
|
|
140
|
-
if fr is not None:
|
|
141
|
-
flux = 1.0 + (flux - 1.0) * fr
|
|
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)
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
from typing import Union, Iterable
|
|
17
17
|
|
|
18
|
+
from astropy import units as u
|
|
18
19
|
from astropy.constants import R_sun, M_sun
|
|
19
20
|
from matplotlib.patches import Circle
|
|
20
21
|
from matplotlib.pyplot import subplots, setp
|
|
@@ -129,7 +130,7 @@ class GravityDarkenedModel(TransitModel):
|
|
|
129
130
|
tres
|
|
130
131
|
Orbit discretization resolution.
|
|
131
132
|
model
|
|
132
|
-
The
|
|
133
|
+
The stellar model to use. Can be either 'blackbody', 'husser2013', or 'bt-settl'.
|
|
133
134
|
tmin
|
|
134
135
|
Minimum allowed temperature [K].
|
|
135
136
|
tmax
|
|
@@ -148,7 +149,7 @@ class GravityDarkenedModel(TransitModel):
|
|
|
148
149
|
else:
|
|
149
150
|
self.filters = filters
|
|
150
151
|
|
|
151
|
-
self.rstar = rstar*R_sun.value # Stellar equator radius [m]
|
|
152
|
+
self.rstar = (rstar*u.R_sun).to(u.m).value # Stellar equator radius [m]
|
|
152
153
|
self.sres = sres # Integration resolution for the star
|
|
153
154
|
self.pres = pres # Integration resolution for the planet
|
|
154
155
|
self.tres = tres
|
|
@@ -176,7 +177,7 @@ class GravityDarkenedModel(TransitModel):
|
|
|
176
177
|
ldc = atleast_2d(ldc)
|
|
177
178
|
a = as_from_rhop(rho, p)
|
|
178
179
|
inc = i_from_baew(b, a, e, w)
|
|
179
|
-
mstar, ostar, gpole, f, _ = map_osm(rstar=self.rstar,
|
|
180
|
+
mstar, ostar, gpole, f, _ = map_osm(rstar=self.rstar, dstar=rho, rperiod=rperiod, phi=0.0)
|
|
180
181
|
|
|
181
182
|
# Plot the star
|
|
182
183
|
# -------------
|
|
@@ -291,7 +292,7 @@ class GravityDarkenedModel(TransitModel):
|
|
|
291
292
|
if ldc.size != 2*self.npb:
|
|
292
293
|
raise ValueError("The quadratic model needs two limb darkening coefficients per passband")
|
|
293
294
|
|
|
294
|
-
mstar, ostar, gpole, f, feff = map_osm(self.rstar, rho, rperiod,
|
|
295
|
+
mstar, ostar, gpole, f, feff = map_osm(self.rstar, rho, rperiod, phi)
|
|
295
296
|
sphi, cphi = sin(phi), cos(phi)
|
|
296
297
|
|
|
297
298
|
flux = oblate_model_s(self.time, k, t0, p, a, l, i, e, w, ldc, mstar, self.rstar, ostar, tpole, gpole, f, feff,
|
|
@@ -305,7 +306,7 @@ class GravityDarkenedModel(TransitModel):
|
|
|
305
306
|
def evaluate_brute(self, k: Union[float, ndarray], rho: float, rperiod: float, tpole: float, phi: float,
|
|
306
307
|
beta: float, ldc: ndarray, t0: float, p: float, a: float, i: float, l: float = 0.0,
|
|
307
308
|
e: float = 0.0, w: float = 0.0, copy: bool = True, plot: bool = False, res: int = 300) -> ndarray:
|
|
308
|
-
mstar, ostar, gpole, f, feff = map_osm(self.rstar, rho, rperiod,
|
|
309
|
+
mstar, ostar, gpole, f, feff = map_osm(self.rstar, rho, rperiod, phi)
|
|
309
310
|
sphi, cphi = sin(phi), cos(phi)
|
|
310
311
|
ldc = atleast_2d(ldc)
|
|
311
312
|
k = atleast_1d(k)
|
|
@@ -18,7 +18,7 @@ from typing import Tuple, Optional, Union
|
|
|
18
18
|
from pathlib import Path
|
|
19
19
|
|
|
20
20
|
from numba import njit
|
|
21
|
-
from numpy import zeros, interp, pi, ndarray, linspace, meshgrid, transpose
|
|
21
|
+
from numpy import zeros, interp, pi, ndarray, linspace, meshgrid, transpose, asarray, newaxis, errstate
|
|
22
22
|
from scipy.interpolate import interpn, interpnd, RegularGridInterpolator as RGI
|
|
23
23
|
|
|
24
24
|
from .ldmodel import LDModel
|
|
@@ -67,13 +67,21 @@ class LDTkLDModel(LDModel):
|
|
|
67
67
|
self.logg0, self.dlogg, self.nlogg = loggs[0], loggs[1]-loggs[0], self.sc.client.nlogg
|
|
68
68
|
self.metal0, self.dmetal, self.nmetal = zs[0], zs[1]-zs[0], self.sc.client.nz
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
with errstate(divide='ignore'):
|
|
71
|
+
self.ps = self.sc.create_profiles(teff=teffg.ravel(), logg=loggg.ravel(), metal=zg.ravel())
|
|
72
|
+
self.ps.resample(mu=self.mu)
|
|
73
|
+
self.profiles = transpose(self.ps._ldps.copy(), axes=(1, 0, 2)).reshape((self.nteff, self.nlogg, self.nmetal, self.npb, self.nmu))
|
|
73
74
|
|
|
74
75
|
def __call__(self, mu: ndarray, x: ndarray) -> Tuple[ndarray, ndarray]:
|
|
75
76
|
if self.mu is None or id(mu) != id(self.mu):
|
|
76
77
|
self._init_interpolation(mu)
|
|
78
|
+
|
|
79
|
+
x = asarray(x)
|
|
80
|
+
if x.ndim == 1:
|
|
81
|
+
x = x[newaxis, newaxis, :]
|
|
82
|
+
elif x.ndim == 2:
|
|
83
|
+
x = x[:, newaxis, :]
|
|
84
|
+
|
|
77
85
|
ldp = trilinear_interpolation_set(self.profiles, x[:, 0, 0], x[:, 0, 1], x[:, 0, 2],
|
|
78
86
|
self.teff0, self.dteff, self.nteff,
|
|
79
87
|
self.logg0, self.dlogg, self.nlogg,
|
|
@@ -580,12 +580,45 @@ def oblate_model_s(t, k, t0, p, a, aa, i, e, w, ldc,
|
|
|
580
580
|
return flux
|
|
581
581
|
|
|
582
582
|
|
|
583
|
-
def map_osm(rstar,
|
|
584
|
-
|
|
585
|
-
|
|
583
|
+
def map_osm(rstar, dstar, rperiod, phi):
|
|
584
|
+
"""
|
|
585
|
+
Parameters
|
|
586
|
+
----------
|
|
587
|
+
rstar : float
|
|
588
|
+
Stellar radius [R_Sun]
|
|
589
|
+
|
|
590
|
+
dstar : float
|
|
591
|
+
Stellar density [g/cm^3]
|
|
592
|
+
|
|
593
|
+
rperiod : float
|
|
594
|
+
Stellar rotation period [days]
|
|
595
|
+
|
|
596
|
+
phi : float
|
|
597
|
+
Latitude of the point on the stellar surface [radians]
|
|
598
|
+
|
|
599
|
+
Returns
|
|
600
|
+
-------
|
|
601
|
+
mstar : float
|
|
602
|
+
Stellar mass [kg]
|
|
603
|
+
|
|
604
|
+
omega : float
|
|
605
|
+
Stellar rotation rate [rad/s]
|
|
606
|
+
|
|
607
|
+
gpole : float
|
|
608
|
+
Surface gravity at the pole [m/s^2]
|
|
609
|
+
|
|
610
|
+
f : float
|
|
611
|
+
Stellar oblateness
|
|
612
|
+
|
|
613
|
+
feff : float
|
|
614
|
+
Projected stellar oblateness
|
|
615
|
+
|
|
616
|
+
"""
|
|
617
|
+
omega = 2*pi/(rperiod*d2sec) # Stellar rotation rate [rad/s]
|
|
618
|
+
dstar = 1e3*dstar # Stellar density [kg/m^3]
|
|
586
619
|
|
|
587
|
-
f = stellar_oblateness(omega,
|
|
620
|
+
f = stellar_oblateness(omega, dstar) # Stellar oblateness
|
|
588
621
|
feff = 1 - sqrt((1 - f)**2*cos(phi)**2 + sin(phi)**2) # Projected stellar oblateness
|
|
589
|
-
mstar =
|
|
622
|
+
mstar = dstar*4*pi/3*rstar**2*rstar*(1 - f) # Stellar mass [kg]
|
|
590
623
|
gpole = G*mstar/(rstar*(1 - f))**2 # Surface gravity at the pole [m/s^2]
|
|
591
624
|
return mstar, omega, gpole, f, feff
|
|
@@ -80,8 +80,7 @@ def uniform_model_simple(times, k, t0, p, a, i, e, w, with_derivatives):
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
@njit
|
|
83
|
-
def uniform_model_v(times, k, t0, p, dkdp, cfs, dcfs, with_derivatives,
|
|
84
|
-
lcids, pbids, epids, nsamples, exptimes):
|
|
83
|
+
def uniform_model_v(times, k, t0, p, dkdp, cfs, dcfs, with_derivatives, lcids, pbids, epids, nsamples, exptimes):
|
|
85
84
|
k = atleast_1d(asarray(k))
|
|
86
85
|
dkdp = atleast_1d(asarray(dkdp))
|
|
87
86
|
t0 = atleast_1d(asarray(t0))
|
|
@@ -93,8 +93,8 @@ def tsmodel_parallel(times: ndarray,
|
|
|
93
93
|
weights: ndarray, dk: float, kmin: float, kmax: float, ng: int, dg: float, z_edges: ndarray,
|
|
94
94
|
nthreads: int) -> ndarray:
|
|
95
95
|
|
|
96
|
-
nthreads_current = get_num_threads()
|
|
97
|
-
set_num_threads(nthreads)
|
|
96
|
+
#nthreads_current = get_num_threads()
|
|
97
|
+
#set_num_threads(nthreads)
|
|
98
98
|
|
|
99
99
|
if k.ndim != 2:
|
|
100
100
|
raise ValueError(" The radius ratios must be given as a 2D array with shape (npv, npb)")
|
|
@@ -115,7 +115,7 @@ def tsmodel_parallel(times: ndarray,
|
|
|
115
115
|
ldm = zeros((npb, ng)) # Limb darkening means
|
|
116
116
|
xyc = zeros((2, 5)) # Taylor series coefficients for the (x, y) position
|
|
117
117
|
|
|
118
|
-
for ipv in
|
|
118
|
+
for ipv in prange(npv):
|
|
119
119
|
if isnan(a[ipv]) or (a[ipv] <= 1.0) or (e[ipv] < 0.0):
|
|
120
120
|
flux[ipv, :, :] = nan
|
|
121
121
|
continue
|
|
@@ -133,8 +133,8 @@ def tsmodel_parallel(times: ndarray,
|
|
|
133
133
|
ldm[ipb, :] = (1.0 - ak) * dot(weights[ik], ldp[ipv, ipb, :]) + ak * dot(weights[ik + 1],
|
|
134
134
|
ldp[ipv, ipb, :])
|
|
135
135
|
else:
|
|
136
|
-
|
|
137
|
-
for ipb in
|
|
136
|
+
_, dg, wg = calculate_weights_2d(kmean, z_edges, ng)
|
|
137
|
+
for ipb in range(npb):
|
|
138
138
|
ldm[ipb, :] = dot(wg, ldp[ipv, ipb, :])
|
|
139
139
|
|
|
140
140
|
# -----------------------------------------------------#
|
|
@@ -151,19 +151,16 @@ def tsmodel_parallel(times: ndarray,
|
|
|
151
151
|
# --------------------------#
|
|
152
152
|
# Calculate the light curve #
|
|
153
153
|
# --------------------------#
|
|
154
|
-
for ipt in
|
|
154
|
+
for ipt in range(npt):
|
|
155
155
|
epoch = floor((times[ipt] - t0[ipv] + 0.5 * p[ipv]) / p[ipv])
|
|
156
156
|
tc = times[ipt] - (t0[ipv] + epoch * p[ipv])
|
|
157
157
|
if fabs(tc) > hww:
|
|
158
158
|
flux[ipv, :, ipt] = 1.0
|
|
159
159
|
else:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
flux[ipv, ipb, ipt] += (istar[ipv, ipb] - iplanet * aplanet * afac[ipb]) / istar[ipv, ipb]
|
|
167
|
-
flux[ipv, :, ipt] /= nsamples[0]
|
|
168
|
-
set_num_threads(nthreads_current)
|
|
160
|
+
z = pd_t15sc(tc, xyc)
|
|
161
|
+
aplanet = ccia(1.0, kmean, z)[0]
|
|
162
|
+
for ipb in range(npb):
|
|
163
|
+
iplanet = interpolate_mean_limb_darkening_s(z / (1.0 + kmean), dg, ldm[ipb])
|
|
164
|
+
flux[ipv, ipb, ipt] += (istar[ipv, ipb] - iplanet * aplanet * afac[ipb]) / istar[ipv, ipb]
|
|
165
|
+
#set_num_threads(nthreads_current)
|
|
169
166
|
return flux
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# PyTransit: fast and easy exoplanet transit modelling in Python.
|
|
2
|
-
# Copyright (C) 2010-2019 Hannu Parviainen
|
|
3
|
-
#
|
|
4
|
-
# This program is free software: you can redistribute it and/or modify
|
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
|
6
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
-
# (at your option) any later version.
|
|
8
|
-
#
|
|
9
|
-
# This program is distributed in the hope that it will be useful,
|
|
10
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
# GNU General Public License for more details.
|
|
13
|
-
#
|
|
14
|
-
# You should have received a copy of the GNU General Public License
|
|
15
|
-
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
-
#
|
|
17
|
-
# This program is free software: you can redistribute it and/or modify
|
|
18
|
-
# it under the terms of the GNU General Public License as published by
|
|
19
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
20
|
-
# (at your option) any later version.
|
|
21
|
-
#
|
|
22
|
-
# This program is distributed in the hope that it will be useful,
|
|
23
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
25
|
-
# GNU General Public License for more details.
|
|
26
|
-
#
|
|
27
|
-
# You should have received a copy of the GNU General Public License
|
|
28
|
-
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
29
|
-
from typing import Tuple, Callable, Union, List, Optional
|
|
30
|
-
|
|
31
|
-
from numpy import ndarray, linspace, isscalar, unique, atleast_1d
|
|
32
|
-
from scipy.integrate import trapz
|
|
33
|
-
|
|
34
|
-
from ..ldmodel import LDModel
|
|
35
|
-
from ..numba.ldmodels import *
|
|
36
|
-
|
|
37
|
-
from .opmodel_full import opmodel
|
|
38
|
-
from .rrmodel import RoadRunnerModel
|
|
39
|
-
|
|
40
|
-
__all__ = ['OblatePlanetModel']
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
class OblatePlanetModel(RoadRunnerModel):
|
|
44
|
-
def evaluate(self, k: Union[float, ndarray], f: Union[float, ndarray], alpha: Union[float, ndarray],
|
|
45
|
-
ldc: Union[ndarray, List],
|
|
46
|
-
t0: Union[float, ndarray], p: Union[float, ndarray], a: Union[float, ndarray],
|
|
47
|
-
i: Union[float, ndarray], e: Union[float, ndarray] = 0.0, w: Union[float, ndarray] = 0.0,
|
|
48
|
-
copy: bool = True) -> ndarray:
|
|
49
|
-
"""Evaluate the transit model for a set of scalar or vector parameters.
|
|
50
|
-
|
|
51
|
-
Parameters
|
|
52
|
-
----------
|
|
53
|
-
k
|
|
54
|
-
Radius ratio(s) either as a single float, 1D vector, or 2D array.
|
|
55
|
-
ldc
|
|
56
|
-
Limb darkening coefficients as a 1D or 2D array.
|
|
57
|
-
t0
|
|
58
|
-
Transit center(s) as a float or a 1D vector.
|
|
59
|
-
p
|
|
60
|
-
Orbital period(s) as a float or a 1D vector.
|
|
61
|
-
a
|
|
62
|
-
Orbital semi-major axis (axes) divided by the stellar radius as a float or a 1D vector.
|
|
63
|
-
i
|
|
64
|
-
Orbital inclination(s) as a float or a 1D vector.
|
|
65
|
-
e : optional
|
|
66
|
-
Orbital eccentricity as a float or a 1D vector.
|
|
67
|
-
w : optional
|
|
68
|
-
Argument of periastron as a float or a 1D vector.
|
|
69
|
-
|
|
70
|
-
Notes
|
|
71
|
-
-----
|
|
72
|
-
The model can be evaluated either for one set of parameters or for many sets of parameters simultaneously. In
|
|
73
|
-
the first case, the orbital parameters should all be given as floats. In the second case, the orbital parameters
|
|
74
|
-
should be given as a 1D array-like.
|
|
75
|
-
|
|
76
|
-
Returns
|
|
77
|
-
-------
|
|
78
|
-
ndarray
|
|
79
|
-
Modelled flux either as a 1D or 2D ndarray.
|
|
80
|
-
"""
|
|
81
|
-
|
|
82
|
-
npv = 1 if isscalar(p) else p.size
|
|
83
|
-
ldc = atleast_1d(ldc)
|
|
84
|
-
|
|
85
|
-
if isinstance(self.ldmodel, LDModel):
|
|
86
|
-
ldp, istar = self.ldmodel(self.mu, ldc)
|
|
87
|
-
else:
|
|
88
|
-
ldp = evaluate_ld(self.ldmodel, self.mu, ldc)
|
|
89
|
-
|
|
90
|
-
if self.ldmmean is not None:
|
|
91
|
-
istar = evaluate_ldi(self.ldmmean, ldc)
|
|
92
|
-
else:
|
|
93
|
-
istar = zeros((npv, self.npb))
|
|
94
|
-
ldpi = evaluate_ld(self.ldmodel, self._ldmu, ldc)
|
|
95
|
-
for ipv in range(npv):
|
|
96
|
-
for ipb in range(self.npb):
|
|
97
|
-
istar[ipv, ipb] = 2 * pi * trapz(self._ldz * ldpi[ipv, ipb], self._ldz)
|
|
98
|
-
|
|
99
|
-
flux = opmodel(self.time, k, f, alpha, t0, p, a, i, e, w, self.parallel,
|
|
100
|
-
self.nlc, self.npb, self.nep, 100,
|
|
101
|
-
self.lcids, self.pbids, self.epids, self.nsamples, self.exptimes,
|
|
102
|
-
ldp, istar, self.weights, self.dk, self.klims[0], self.klims[1], self.dg, self.ze)
|
|
103
|
-
|
|
104
|
-
return flux
|