ExoIris 0.23.0__py3-none-any.whl → 0.23.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- exoiris/exoiris.py +1 -1
- exoiris/tslpf.py +11 -7
- {exoiris-0.23.0.dist-info → exoiris-0.23.1.dist-info}/METADATA +1 -1
- {exoiris-0.23.0.dist-info → exoiris-0.23.1.dist-info}/RECORD +7 -7
- {exoiris-0.23.0.dist-info → exoiris-0.23.1.dist-info}/WHEEL +0 -0
- {exoiris-0.23.0.dist-info → exoiris-0.23.1.dist-info}/licenses/LICENSE +0 -0
- {exoiris-0.23.0.dist-info → exoiris-0.23.1.dist-info}/top_level.txt +0 -0
exoiris/exoiris.py
CHANGED
|
@@ -163,7 +163,7 @@ class ExoIris:
|
|
|
163
163
|
|
|
164
164
|
def __init__(self, name: str, ldmodel, data: TSDataGroup | TSData, nk: int = 50, nldc: int = 10, nthreads: int = 1,
|
|
165
165
|
tmpars: dict | None = None, noise_model: Literal["white", "fixed_gp", "free_gp"] = 'white',
|
|
166
|
-
interpolation: Literal['nearest', 'linear', 'pchip', 'makima', 'bspline', 'bspline-quadratic'] = '
|
|
166
|
+
interpolation: Literal['nearest', 'linear', 'pchip', 'makima', 'bspline', 'bspline-quadratic', 'bspline-cubic'] = 'linear'):
|
|
167
167
|
"""
|
|
168
168
|
Parameters
|
|
169
169
|
----------
|
exoiris/tslpf.py
CHANGED
|
@@ -40,8 +40,9 @@ from numpy import (
|
|
|
40
40
|
dstack,
|
|
41
41
|
diff,
|
|
42
42
|
ascontiguousarray,
|
|
43
|
+
nan,
|
|
43
44
|
)
|
|
44
|
-
from numpy.linalg import lstsq
|
|
45
|
+
from numpy.linalg import lstsq, LinAlgError
|
|
45
46
|
from numpy.random import default_rng
|
|
46
47
|
from pytransit.lpf.logposteriorfunction import LogPosteriorFunction
|
|
47
48
|
from pytransit.orbits import as_from_rhop, i_from_ba
|
|
@@ -133,11 +134,11 @@ def add_knots(x_new, x_old):
|
|
|
133
134
|
return sort(concatenate([x_new, x_old]))
|
|
134
135
|
|
|
135
136
|
|
|
136
|
-
interpolator_choices = ("bspline", "pchip", "makima", "nearest", "linear", "bspline-quadratic")
|
|
137
|
+
interpolator_choices = ("bspline", "pchip", "makima", "nearest", "linear", "bspline-quadratic", "bspline-cubic")
|
|
137
138
|
|
|
138
139
|
|
|
139
|
-
interpolators = {'bspline': ip_bspline, 'bspline-
|
|
140
|
-
'makima': ip_makima, 'nearest': ip_nearest, 'linear': ip_linear}
|
|
140
|
+
interpolators = {'bspline': ip_bspline, 'bspline-cubic': ip_bspline, 'bspline-quadratic': ip_bspline_quadratic,
|
|
141
|
+
'pchip': ip_pchip, 'makima': ip_makima, 'nearest': ip_nearest, 'linear': ip_linear}
|
|
141
142
|
|
|
142
143
|
|
|
143
144
|
def clean_knots(knots, min_distance, lmin=0, lmax=inf):
|
|
@@ -181,7 +182,7 @@ def clean_knots(knots, min_distance, lmin=0, lmax=inf):
|
|
|
181
182
|
class TSLPF(LogPosteriorFunction):
|
|
182
183
|
def __init__(self, runner, name: str, ldmodel, data: TSDataGroup, nk: int = 50, nldc: int = 10, nthreads: int = 1,
|
|
183
184
|
tmpars = None, noise_model: Literal["white", "fixed_gp", "free_gp"] = 'white',
|
|
184
|
-
interpolation: Literal['nearest', 'linear', 'pchip', 'makima', 'bspline', 'bspline-quadratic'] = '
|
|
185
|
+
interpolation: Literal['nearest', 'linear', 'pchip', 'makima', 'bspline', 'bspline-quadratic', 'bspline-cubic'] = 'linear'):
|
|
185
186
|
super().__init__(name)
|
|
186
187
|
self._runner = runner
|
|
187
188
|
self._original_data: TSDataGroup | None = None
|
|
@@ -749,8 +750,11 @@ class TSLPF(LogPosteriorFunction):
|
|
|
749
750
|
for i, d in enumerate(self.data):
|
|
750
751
|
for ipv in range(npv):
|
|
751
752
|
res = d.fluxes / mtransit[i][ipv]
|
|
752
|
-
|
|
753
|
-
|
|
753
|
+
try:
|
|
754
|
+
coeffs = nlstsq(d.covs, res, d.mask, d._wlmask, d._wls_with_nan)
|
|
755
|
+
self._baseline_models[i][ipv, :, :] = (d.covs @ coeffs).T
|
|
756
|
+
except LinAlgError:
|
|
757
|
+
self._baseline_models[i][ipv, :, :] = nan
|
|
754
758
|
return self._baseline_models
|
|
755
759
|
|
|
756
760
|
def flux_model(self, pv):
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
exoiris/__init__.py,sha256=LU5jAE7_OVPLHFO0UAOGS0e0wuWV6rdSD0Qveet11K8,1147
|
|
2
2
|
exoiris/binning.py,sha256=-Y9hdK0jZj8DOS82keaprneid2lZ4rCx-keWlKi0LP8,6455
|
|
3
3
|
exoiris/ephemeris.py,sha256=dthBkJztT5yAP6VnnO7jGvxikboFUQBUGPUfBCFrA3w,1316
|
|
4
|
-
exoiris/exoiris.py,sha256
|
|
4
|
+
exoiris/exoiris.py,sha256=9vFUgF_lpvDPQsjCyAnDjKsiXZuqVUO6BhvkbtEGhwA,60973
|
|
5
5
|
exoiris/ldtkld.py,sha256=7H1r1xail3vSKdsNKorMTqivnRKU9WrOVH-uE4Ky2jM,3495
|
|
6
6
|
exoiris/loglikelihood.py,sha256=lVm7kMyzy-xxP5VvZMV7kJY3KovbhlEz3u_6O7R6zgI,6309
|
|
7
7
|
exoiris/spotmodel.py,sha256=9-DxvVzGzxf6AjQfrzZreyJB4Htw0gsIAD3nWl0tQMc,7160
|
|
8
8
|
exoiris/tsdata.py,sha256=s3R6sByy7Ud26F3TdaRaXNQi-rYeJHnm7XHk2FLd1Go,36622
|
|
9
|
-
exoiris/tslpf.py,sha256=
|
|
9
|
+
exoiris/tslpf.py,sha256=LFMvEwMAX2e82iGYqDmhXyvB-U9l6WPnlWU9kX5CqjM,33555
|
|
10
10
|
exoiris/tsmodel.py,sha256=6NaGY48fWHUT_7ti6Ao618PN-LgyoIhfQd8lZQqZ7hU,5160
|
|
11
11
|
exoiris/util.py,sha256=uNv_c3Kuv1lml8MuDAuyElO4s3f1tRIQ1QMlLaI7Yak,5921
|
|
12
12
|
exoiris/wlpf.py,sha256=g6h1cLk2-nKD8u_FzwXNVVGFK4dry8fBr0A70LA5gJw,6281
|
|
13
|
-
exoiris-0.23.
|
|
14
|
-
exoiris-0.23.
|
|
15
|
-
exoiris-0.23.
|
|
16
|
-
exoiris-0.23.
|
|
17
|
-
exoiris-0.23.
|
|
13
|
+
exoiris-0.23.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
14
|
+
exoiris-0.23.1.dist-info/METADATA,sha256=nuTkHp9xVukH48p9BIn-5_YKJM09NkeSbd7UndqpmJs,5084
|
|
15
|
+
exoiris-0.23.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
exoiris-0.23.1.dist-info/top_level.txt,sha256=EoNxT6c5mQDcM0f_LUQB-ETsYg03lNaV3o2L_Yc6-aE,8
|
|
17
|
+
exoiris-0.23.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|