exovetter 0.0.9__tar.gz → 0.0.10__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.
- {exovetter-0.0.9 → exovetter-0.0.10}/PKG-INFO +1 -1
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/centroid/centroid.py +27 -1
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/version.py +1 -1
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter.egg-info/PKG-INFO +1 -1
- {exovetter-0.0.9 → exovetter-0.0.10}/.bandit.yaml +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/.github/workflows/ci_workflows.yml +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/.github/workflows/publish.yml +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/.gitignore +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/.readthedocs.yml +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/CHANGES.rst +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/LICENSE.rst +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/MANIFEST.in +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/README.rst +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/docs/Makefile +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/docs/conf.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/docs/index.rst +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/docs/install.rst +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/docs/make.bat +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/docs/utils.rst +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/docs/vetters.rst +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/docs/vetters_low_level.rst +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/__init__.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/centroid/__init__.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/centroid/covar.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/centroid/disp.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/centroid/fastpsffit.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/const.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/leo.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/lightkurve_utils.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/lpp.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/model.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/modshift/__init__.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/modshift/modshift.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/modshift/plotmodshift.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/odd_even.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/sweet.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/tce.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/transit_coverage.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/trapezoid_fit.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/utils.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/vetters.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter/viz_transits.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter.egg-info/SOURCES.txt +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter.egg-info/dependency_links.txt +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter.egg-info/not-zip-safe +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter.egg-info/requires.txt +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/exovetter.egg-info/top_level.txt +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/licenses/DAVE_LICENSE +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/licenses/README.rst +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/licenses/TEMPLATE_LICENCE.rst +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/pyproject.toml +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/requirements.txt +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/setup.cfg +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/setup.py +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/100100827.pdf +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/Centroid.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/LPP.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/LeoTransitEvents.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/OddEven.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/SWEET.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/TCEs.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/TransitPhaseCoverage.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/VizTransits.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/lightcurves.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/modshift.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/run_all.ipynb +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/wasp18b.fits +0 -0
- {exovetter-0.0.9 → exovetter-0.0.10}/tutorial_notebooks/wasp18b_tce +0 -0
|
@@ -4,6 +4,7 @@ import exovetter.centroid.disp as disp
|
|
|
4
4
|
import exovetter.utils as utils
|
|
5
5
|
import matplotlib.pyplot as plt
|
|
6
6
|
import numpy as np
|
|
7
|
+
import warnings
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
def compute_diff_image_centroids(
|
|
@@ -12,7 +13,7 @@ def compute_diff_image_centroids(
|
|
|
12
13
|
period_days,
|
|
13
14
|
epoch,
|
|
14
15
|
duration_days,
|
|
15
|
-
remove_transits,
|
|
16
|
+
remove_transits=None,
|
|
16
17
|
max_oot_shift_pix=1.5,
|
|
17
18
|
starloc_pix = None,
|
|
18
19
|
plot=False
|
|
@@ -71,6 +72,9 @@ def compute_diff_image_centroids(
|
|
|
71
72
|
OOT from In-transit.
|
|
72
73
|
"""
|
|
73
74
|
|
|
75
|
+
if remove_transits is None:
|
|
76
|
+
remove_transits = []
|
|
77
|
+
|
|
74
78
|
isnan = np.isnan(time)
|
|
75
79
|
time = time[~isnan]
|
|
76
80
|
cube = cube[~isnan]
|
|
@@ -135,7 +139,18 @@ def measure_centroid_shift(centroids, kept_transits, plot=False):
|
|
|
135
139
|
dcol = centroids[:, 4] - centroids[:, 0]
|
|
136
140
|
drow = centroids[:, 5] - centroids[:, 1]
|
|
137
141
|
|
|
142
|
+
if centroids.size == 0:
|
|
143
|
+
raise RuntimeError("No difference-image centroids could be computed for this target.")
|
|
144
|
+
|
|
138
145
|
flags = centroids[:, -1].astype(bool)
|
|
146
|
+
N_use = np.sum(~flags) # Check if there are enough TPFs left to actually centroid
|
|
147
|
+
|
|
148
|
+
if N_use < 2:
|
|
149
|
+
raise RuntimeError("TPF data quality flagged too many difference-image centroids "
|
|
150
|
+
"(<2 usable transits); centroid significance cannot be computed.")
|
|
151
|
+
elif N_use == 2:
|
|
152
|
+
warnings.warn("Only 2 usable difference-image centroids available; "
|
|
153
|
+
"centroid significance is not statistically reliable.", RuntimeWarning, stacklevel=2)
|
|
139
154
|
|
|
140
155
|
offset_pix, signif = covar.compute_offset_and_signif(
|
|
141
156
|
dcol[~flags], drow[~flags])
|
|
@@ -179,7 +194,18 @@ def measure_centroid_shift_cat(centroids, kept_transits, starloc_pix, plot=False
|
|
|
179
194
|
dcol = centroids[:, 4] - starloc_pix[0]
|
|
180
195
|
drow = centroids[:, 5] - starloc_pix[1]
|
|
181
196
|
|
|
197
|
+
if centroids.size == 0:
|
|
198
|
+
raise RuntimeError("No difference-image centroids could be computed for this target.")
|
|
199
|
+
|
|
182
200
|
flags = centroids[:, -1].astype(bool)
|
|
201
|
+
N_use = np.sum(~flags)
|
|
202
|
+
|
|
203
|
+
if N_use < 2:
|
|
204
|
+
raise RuntimeError("TPF data quality flagged too many difference-image centroids "
|
|
205
|
+
"(<2 usable transits); centroid significance cannot be computed.")
|
|
206
|
+
elif N_use == 2:
|
|
207
|
+
warnings.warn("Only 2 usable difference-image centroids available; "
|
|
208
|
+
"centroid significance is not statistically reliable.", RuntimeWarning, stacklevel=2)
|
|
183
209
|
|
|
184
210
|
offset_pix, signif = covar.compute_offset_and_signif(
|
|
185
211
|
dcol[~flags], drow[~flags])
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|