ExoIris 0.23.0__tar.gz → 0.23.2__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.
- {exoiris-0.23.0 → exoiris-0.23.2}/CHANGELOG.md +7 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/ExoIris.egg-info/PKG-INFO +1 -1
- {exoiris-0.23.0 → exoiris-0.23.2}/PKG-INFO +1 -1
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/exoiris.py +11 -1
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/tslpf.py +19 -8
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/wlpf.py +1 -1
- {exoiris-0.23.0 → exoiris-0.23.2}/.github/workflows/python-package.yml +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/.gitignore +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/.readthedocs.yaml +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/CODE_OF_CONDUCT.md +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/ExoIris.egg-info/SOURCES.txt +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/ExoIris.egg-info/dependency_links.txt +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/ExoIris.egg-info/requires.txt +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/ExoIris.egg-info/top_level.txt +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/LICENSE +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/README.md +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/Makefile +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/make.bat +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/requirements.txt +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/_static/css/custom.css +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/api/binning.rst +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/api/exoiris.rst +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/api/tsdata.rst +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/conf.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/01a_not_so_short_intro.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/01b_short_intro.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/02_increasing_knot_resolution.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/03_increasing_data_resolution.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/04_gaussian_processes.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/05a_ldtkldm.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/A2_full_data_resolution.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/appendix_1_data_preparation.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/data/README.txt +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/data/nirHiss_order_1.h5 +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/data/nirHiss_order_2.h5 +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/example1.png +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/plot_1.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/figures.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/friendly_introduction.ipynb +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/index.rst +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/k_knot_example.svg +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/setup_multiprocessing.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/index.rst +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/doc/source/install.rst +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/__init__.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/binning.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/ephemeris.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/ldtkld.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/loglikelihood.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/spotmodel.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/tsdata.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/tsmodel.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/exoiris/util.py +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/pyproject.toml +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/requirements.txt +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/setup.cfg +0 -0
- {exoiris-0.23.0 → exoiris-0.23.2}/tests/test_binning.py +0 -0
|
@@ -5,6 +5,13 @@ All notable changes to ExoIris will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.23.1] - 2025-12-18
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fixed least-squares baseline fitting for transit models with NaNs.
|
|
12
|
+
- Added "bspline-cubic" interpolation option as an alias for "bspline". The "bspline" option will be removed in a future
|
|
13
|
+
release.
|
|
14
|
+
|
|
8
15
|
## [0.23.0] - 2025-12-16
|
|
9
16
|
|
|
10
17
|
### 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
|
----------
|
|
@@ -529,6 +529,16 @@ class ExoIris:
|
|
|
529
529
|
"""
|
|
530
530
|
self._tsa.set_k_knots(knot_wavelengths)
|
|
531
531
|
|
|
532
|
+
def free_radius_ratio_knot_locations(self, knot_ids: list[int] | ndarray) -> None:
|
|
533
|
+
"""Add the wavelength locations of chosen radius ratio knots to the model as free parameters.
|
|
534
|
+
|
|
535
|
+
Parameters
|
|
536
|
+
----------
|
|
537
|
+
knot_ids
|
|
538
|
+
List of radius ratio knot indices to be made free parameters.
|
|
539
|
+
"""
|
|
540
|
+
self._tsa.free_k_knot_locations(knot_ids)
|
|
541
|
+
|
|
532
542
|
def create_dense_radius_ratio_block(self, wlmin: float, wlmax: float) -> None:
|
|
533
543
|
"""Create a block of radius ratio knots using the full data resolution.
|
|
534
544
|
|
|
@@ -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
|
|
@@ -549,7 +550,14 @@ class TSLPF(LogPosteriorFunction):
|
|
|
549
550
|
self._mc_chains = fmcn.reshape([mco.shape[0], mco.shape[1], ndn])
|
|
550
551
|
self.sampler = None
|
|
551
552
|
|
|
552
|
-
def set_free_k_knots(self, ids):
|
|
553
|
+
def set_free_k_knots(self, ids: list[int] | ndarray) -> None:
|
|
554
|
+
"""Add the wavelength locations of chosen radius ratio knots as free model parameters.
|
|
555
|
+
|
|
556
|
+
Parameters
|
|
557
|
+
----------
|
|
558
|
+
ids : list of int
|
|
559
|
+
List of radius ratio knot indices to be made free parameters.
|
|
560
|
+
"""
|
|
553
561
|
self.free_k_knot_ids = ids
|
|
554
562
|
|
|
555
563
|
# Remove existing parameter block if one exists
|
|
@@ -749,8 +757,11 @@ class TSLPF(LogPosteriorFunction):
|
|
|
749
757
|
for i, d in enumerate(self.data):
|
|
750
758
|
for ipv in range(npv):
|
|
751
759
|
res = d.fluxes / mtransit[i][ipv]
|
|
752
|
-
|
|
753
|
-
|
|
760
|
+
try:
|
|
761
|
+
coeffs = nlstsq(d.covs, res, d.mask, d._wlmask, d._wls_with_nan)
|
|
762
|
+
self._baseline_models[i][ipv, :, :] = (d.covs @ coeffs).T
|
|
763
|
+
except LinAlgError:
|
|
764
|
+
self._baseline_models[i][ipv, :, :] = nan
|
|
754
765
|
return self._baseline_models
|
|
755
766
|
|
|
756
767
|
def flux_model(self, pv):
|
|
@@ -128,7 +128,7 @@ class WhiteLPF(BaseLPF):
|
|
|
128
128
|
pv = self._local_minimization.x
|
|
129
129
|
a = as_from_rhop(pv[1], pv[0])
|
|
130
130
|
i = i_from_ba(pv[2], a)
|
|
131
|
-
t14 = d_from_pkaiews(pv[0], sqrt(pv[
|
|
131
|
+
t14 = d_from_pkaiews(pv[0], sqrt(pv[self._start_k2]), a, i, 0., 0., 1, 14)
|
|
132
132
|
return t14
|
|
133
133
|
|
|
134
134
|
def plot(self, axs=None, figsize=None, ncols=2) -> Figure:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/02_increasing_knot_resolution.ipynb
RENAMED
|
File without changes
|
{exoiris-0.23.0 → exoiris-0.23.2}/doc/source/examples/e01/03_increasing_data_resolution.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|