exovetter 0.0.8__py3-none-any.whl → 0.0.10__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.
- exovetter/centroid/centroid.py +27 -1
- exovetter/centroid/covar.py +1 -1
- exovetter/version.py +1 -1
- {exovetter-0.0.8.dist-info → exovetter-0.0.10.dist-info}/METADATA +14 -12
- {exovetter-0.0.8.dist-info → exovetter-0.0.10.dist-info}/RECORD +8 -8
- {exovetter-0.0.8.dist-info → exovetter-0.0.10.dist-info}/WHEEL +1 -1
- {exovetter-0.0.8.dist-info → exovetter-0.0.10.dist-info}/LICENSE.rst +0 -0
- {exovetter-0.0.8.dist-info → exovetter-0.0.10.dist-info}/top_level.txt +0 -0
exovetter/centroid/centroid.py
CHANGED
|
@@ -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])
|
exovetter/centroid/covar.py
CHANGED
|
@@ -105,7 +105,7 @@ def diagnostic_plot(x, y, kept_transits, flag=None):
|
|
|
105
105
|
plt.legend()
|
|
106
106
|
|
|
107
107
|
offset, signif = compute_offset_and_signif(x[~idx], y[~idx])
|
|
108
|
-
msg = "Offset
|
|
108
|
+
msg = "Offset %.2f pixels\nProb Transit on Target: %.2f" % (offset, signif)
|
|
109
109
|
plt.title(msg)
|
|
110
110
|
return plt.gcf()
|
|
111
111
|
|
exovetter/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: exovetter
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.10
|
|
4
4
|
Summary: Exoplanet vetting package
|
|
5
5
|
Home-page: https://github.com/spacetelescope/exovetter
|
|
6
6
|
Author: Susan Mullally et al.
|
|
@@ -10,20 +10,22 @@ Requires-Python: >=3.7
|
|
|
10
10
|
Description-Content-Type: text/x-rst
|
|
11
11
|
License-File: LICENSE.rst
|
|
12
12
|
Requires-Dist: numpy
|
|
13
|
-
Requires-Dist: astropy
|
|
13
|
+
Requires-Dist: astropy>=3
|
|
14
14
|
Requires-Dist: scipy
|
|
15
15
|
Provides-Extra: all
|
|
16
|
-
Requires-Dist: matplotlib
|
|
17
|
-
Requires-Dist: scikit-learn
|
|
18
|
-
Requires-Dist: lightkurve
|
|
19
|
-
Requires-Dist: lpproj
|
|
16
|
+
Requires-Dist: matplotlib; extra == "all"
|
|
17
|
+
Requires-Dist: scikit-learn; extra == "all"
|
|
18
|
+
Requires-Dist: lightkurve>=2; extra == "all"
|
|
19
|
+
Requires-Dist: lpproj; extra == "all"
|
|
20
20
|
Provides-Extra: docs
|
|
21
|
-
Requires-Dist: sphinx-astropy
|
|
22
|
-
Requires-Dist: sphinx-rtd-theme
|
|
21
|
+
Requires-Dist: sphinx-astropy; extra == "docs"
|
|
22
|
+
Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
|
23
23
|
Provides-Extra: test
|
|
24
|
-
Requires-Dist: pytest-cov
|
|
25
|
-
Requires-Dist: pytest-remotedata
|
|
26
|
-
Requires-Dist: pytest-doctestplus
|
|
24
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
25
|
+
Requires-Dist: pytest-remotedata; extra == "test"
|
|
26
|
+
Requires-Dist: pytest-doctestplus; extra == "test"
|
|
27
|
+
Requires-Dist: oktopus; extra == "test"
|
|
28
|
+
Requires-Dist: autograd; extra == "test"
|
|
27
29
|
|
|
28
30
|
exovetter: Exoplanet Vetting
|
|
29
31
|
============================
|
|
@@ -32,7 +34,7 @@ exovetter: Exoplanet Vetting
|
|
|
32
34
|
:target: https://exovetter.readthedocs.io/en/latest/?badge=latest
|
|
33
35
|
:alt: Documentation Status
|
|
34
36
|
|
|
35
|
-
.. image:: https://github.com/spacetelescope/exovetter/workflows/
|
|
37
|
+
.. image:: https://github.com/spacetelescope/exovetter/actions/workflows/ci_workflows.yml/badge.svg
|
|
36
38
|
:target: https://github.com/spacetelescope/exovetter/actions
|
|
37
39
|
:alt: Github Actions CI Status
|
|
38
40
|
|
|
@@ -10,19 +10,19 @@ exovetter/tce.py,sha256=5JFKkbKoKCtdhm5EuW6FMAvp0LiaHLuqpFUbY0joyLI,7302
|
|
|
10
10
|
exovetter/transit_coverage.py,sha256=Wix6TaQmEgRxlEZKB6WF3OFQVXqtJN1tBkltFaMDrHM,2194
|
|
11
11
|
exovetter/trapezoid_fit.py,sha256=Dok-H0zRsfigh4zfVO4R6Wi2TgK6hQXh4EIIYGouxiQ,31097
|
|
12
12
|
exovetter/utils.py,sha256=1K34N6sQ7iomf4oFHyqGubcDhNwTa2lF_uKEOGJGrCk,24909
|
|
13
|
-
exovetter/version.py,sha256=
|
|
13
|
+
exovetter/version.py,sha256=Vkob9J5v8PZ7JQ_jf3gstZP71dMTETD1NfQnvhu4t_o,338
|
|
14
14
|
exovetter/vetters.py,sha256=muqjSzFRs5gCrOV1OAjnTd2y7y_dU9hWJfKpqUK_9RY,37732
|
|
15
15
|
exovetter/viz_transits.py,sha256=FUc8DEedaQQ8YDoeVvR1QyGPmh2oPGmVg27W3WrVguQ,5648
|
|
16
16
|
exovetter/centroid/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
17
|
-
exovetter/centroid/centroid.py,sha256=
|
|
18
|
-
exovetter/centroid/covar.py,sha256=
|
|
17
|
+
exovetter/centroid/centroid.py,sha256=p7KWo12FgFmNUaBCzfAupMZjyco45U8wUoc5bKdZLZo,12125
|
|
18
|
+
exovetter/centroid/covar.py,sha256=Ot_gLmVtuJ9T9REThOdOKzGPhHAT-AmE4mWaAcI8pic,8975
|
|
19
19
|
exovetter/centroid/disp.py,sha256=Y7UeecpHuhzEyNb6F6_FoureXdIttongS_L4jbdNYgE,3692
|
|
20
20
|
exovetter/centroid/fastpsffit.py,sha256=eRMxYUJ_4hsCxso4u1d1zQvFSJQlJ_gRzhNa2PXkKuE,4532
|
|
21
21
|
exovetter/modshift/__init__.py,sha256=j5665q0RHVzbzdPBXv_jUozGB4sex8ANXtzB41EYzRQ,68
|
|
22
22
|
exovetter/modshift/modshift.py,sha256=VEnj7ITvYRfqICyRiNeCZ9tqQ4d4fPOw8avB6TTbhIU,14773
|
|
23
23
|
exovetter/modshift/plotmodshift.py,sha256=MMLkvxkOqBGIYGPN97_WtrHgTZsDzY_XRRNswhz5YQI,2452
|
|
24
|
-
exovetter-0.0.
|
|
25
|
-
exovetter-0.0.
|
|
26
|
-
exovetter-0.0.
|
|
27
|
-
exovetter-0.0.
|
|
28
|
-
exovetter-0.0.
|
|
24
|
+
exovetter-0.0.10.dist-info/LICENSE.rst,sha256=uhiFz7eEG8WszLtRtYIT89FNMI3ijy1aACnvl5BOz2Y,1492
|
|
25
|
+
exovetter-0.0.10.dist-info/METADATA,sha256=Hu6Q353m2oscJ7YFuCVlEah3kP8BbSxnEmSkH5wYWAE,3799
|
|
26
|
+
exovetter-0.0.10.dist-info/WHEEL,sha256=WnJ8fYhv8N4SYVK2lLYNI6N0kVATA7b0piVUNvqIIJE,91
|
|
27
|
+
exovetter-0.0.10.dist-info/top_level.txt,sha256=wh0_U5IPEspONX8zhGRaFUqfuovCGkgYjAmWuQe0w6Q,10
|
|
28
|
+
exovetter-0.0.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|