exovetter 0.0.2__py3-none-any.whl → 0.0.4__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/__init__.py +1 -0
- exovetter/centroid/centroid.py +29 -14
- exovetter/centroid/covar.py +5 -3
- exovetter/leo.py +227 -0
- exovetter/lightkurve_utils.py +1 -1
- exovetter/lpp.py +2 -1
- exovetter/sweet.py +6 -3
- exovetter/tce.py +6 -0
- exovetter/trapezoid_fit.py +2 -1
- exovetter/utils.py +58 -18
- exovetter/version.py +1 -1
- exovetter/vetters.py +524 -119
- exovetter/viz_transits.py +17 -9
- {exovetter-0.0.2.dist-info → exovetter-0.0.4.dist-info}/METADATA +5 -4
- exovetter-0.0.4.dist-info/RECORD +28 -0
- {exovetter-0.0.2.dist-info → exovetter-0.0.4.dist-info}/WHEEL +1 -1
- exovetter/__init__.py.mine +0 -11
- exovetter/centroid/untitled0.py +0 -24
- exovetter/junk +0 -89
- exovetter-0.0.2.dist-info/RECORD +0 -29
- {exovetter-0.0.2.dist-info → exovetter-0.0.4.dist-info}/LICENSE.rst +0 -0
- {exovetter-0.0.2.dist-info → exovetter-0.0.4.dist-info}/top_level.txt +0 -0
exovetter/viz_transits.py
CHANGED
|
@@ -4,6 +4,7 @@ import matplotlib.pyplot as plt
|
|
|
4
4
|
from astropy.convolution import convolve, Box1DKernel
|
|
5
5
|
from exovetter import utils
|
|
6
6
|
|
|
7
|
+
__all__ = ['plot_all_transits', 'plot_fold_transit']
|
|
7
8
|
|
|
8
9
|
def plot_all_transits(time, flux, period, epoch, dur, depth, max_transits=20,
|
|
9
10
|
transit_only=False, plot=True, units="d"):
|
|
@@ -67,10 +68,10 @@ def plot_all_transits(time, flux, period, epoch, dur, depth, max_transits=20,
|
|
|
67
68
|
|
|
68
69
|
#step_size = 6*np.std(flux[~intransit])
|
|
69
70
|
step_size = depth * 1.25
|
|
70
|
-
if 3 * np.std(flux[~intransit]) > step_size:
|
|
71
|
-
step_size =
|
|
71
|
+
if 3 * np.std(flux[~intransit]) > step_size:
|
|
72
|
+
step_size = 10 * np.std(flux[~intransit])
|
|
72
73
|
|
|
73
|
-
nsteps = len(np.unique(ntransit)) #np.ceil(np.max(ntransit))
|
|
74
|
+
nsteps = len(np.unique(ntransit)) # np.ceil(np.max(ntransit))
|
|
74
75
|
|
|
75
76
|
if nsteps > max_transits:
|
|
76
77
|
nsteps = max_transits
|
|
@@ -78,10 +79,10 @@ def plot_all_transits(time, flux, period, epoch, dur, depth, max_transits=20,
|
|
|
78
79
|
if plot:
|
|
79
80
|
plt.figure(figsize=(figwid, nsteps))
|
|
80
81
|
transits = np.floor(np.unique(ntransit[intransit]))
|
|
81
|
-
print(transits[0:nsteps])
|
|
82
|
-
print(nsteps)
|
|
83
|
-
print(ntransit)
|
|
84
|
-
|
|
82
|
+
# print(transits[0:nsteps])
|
|
83
|
+
# print(nsteps)
|
|
84
|
+
# print(ntransit)
|
|
85
|
+
|
|
85
86
|
for i, nt in enumerate(transits[0:nsteps]):
|
|
86
87
|
|
|
87
88
|
ph = phases[ntransit == nt]
|
|
@@ -91,9 +92,14 @@ def plot_all_transits(time, flux, period, epoch, dur, depth, max_transits=20,
|
|
|
91
92
|
|
|
92
93
|
plt.plot(ph, fl + step_size * i, '.--',
|
|
93
94
|
c=color, ms=5, lw=1)
|
|
95
|
+
|
|
94
96
|
plt.annotate("Transit %i" % nt,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
(xmin, np.median(fl) + step_size * (i+0.15)), c=color)
|
|
98
|
+
# Added buffer between transit and annotation
|
|
99
|
+
|
|
100
|
+
# plt.annotate("Transit %i" % nt,
|
|
101
|
+
# (xmin, np.median(fl) + step_size * i),
|
|
102
|
+
# c=color)
|
|
97
103
|
|
|
98
104
|
plt.xlim(xmin, xmax)
|
|
99
105
|
plt.axvspan(
|
|
@@ -102,6 +108,8 @@ def plot_all_transits(time, flux, period, epoch, dur, depth, max_transits=20,
|
|
|
102
108
|
alpha=0.15)
|
|
103
109
|
plt.xlabel("Phased Time [%s]" % units)
|
|
104
110
|
|
|
111
|
+
|
|
112
|
+
|
|
105
113
|
return n_has_data
|
|
106
114
|
|
|
107
115
|
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: exovetter
|
|
3
|
-
Version: 0.0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.0.4
|
|
4
|
+
Summary: Exoplanet vetting package
|
|
5
5
|
Home-page: https://github.com/spacetelescope/exovetter
|
|
6
6
|
Author: Susan Mullally et al.
|
|
7
7
|
Author-email: smullally@stsci.edu
|
|
8
|
+
License: BSD 3-Clause
|
|
8
9
|
Requires-Python: >=3.7
|
|
9
10
|
Description-Content-Type: text/x-rst
|
|
10
11
|
License-File: LICENSE.rst
|
|
11
12
|
Requires-Dist: numpy
|
|
12
|
-
Requires-Dist: astropy
|
|
13
|
+
Requires-Dist: astropy >=3
|
|
13
14
|
Requires-Dist: scipy
|
|
14
15
|
Provides-Extra: all
|
|
15
16
|
Requires-Dist: matplotlib ; extra == 'all'
|
|
16
17
|
Requires-Dist: scikit-learn ; extra == 'all'
|
|
17
|
-
Requires-Dist: lightkurve
|
|
18
|
+
Requires-Dist: lightkurve >=2 ; extra == 'all'
|
|
18
19
|
Requires-Dist: lpproj ; extra == 'all'
|
|
19
20
|
Provides-Extra: docs
|
|
20
21
|
Requires-Dist: sphinx-astropy ; extra == 'docs'
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
exovetter/__init__.py,sha256=79wPvKodLvzu1QiCX8tYpm7WcxST0mx-CWorfUz3D-c,278
|
|
2
|
+
exovetter/const.py,sha256=aKBZmiZYlia2EuMDarzHpIRFYFKz-Vk81TJK2o2lUEE,996
|
|
3
|
+
exovetter/leo.py,sha256=03kYnhwlbNU5pXmuIXwFRJ9CpSxrfQlWMOYtCJCY_mw,9345
|
|
4
|
+
exovetter/lightkurve_utils.py,sha256=3cKkQpubFNT7nid2OKHrhezcJlZHYBRAUBZXPKKIL8g,1121
|
|
5
|
+
exovetter/lpp.py,sha256=3U6PWGeY-TimeKmHhOHCJw1Pv7k1jU-NgTWesBKahaE,12978
|
|
6
|
+
exovetter/model.py,sha256=ZRMoSLf_4V0Mgftpi_4A0iRgoEYHSdc96tWB8MjDH8k,2817
|
|
7
|
+
exovetter/odd_even.py,sha256=g8TTd2JpwxLuTfYlonw2pbcVqnj2a7QvEAzL4qkxso4,6910
|
|
8
|
+
exovetter/sweet.py,sha256=prbuteEaahFWhAoCtQCVP47SbA6h4pYJn1Wn9JkEalc,3066
|
|
9
|
+
exovetter/tce.py,sha256=5JFKkbKoKCtdhm5EuW6FMAvp0LiaHLuqpFUbY0joyLI,7302
|
|
10
|
+
exovetter/transit_coverage.py,sha256=Y4Muj7lKRsa0Sn6hD70O5On-2Aae1p5i-VTfJt5tsOw,2154
|
|
11
|
+
exovetter/trapezoid_fit.py,sha256=Dok-H0zRsfigh4zfVO4R6Wi2TgK6hQXh4EIIYGouxiQ,31097
|
|
12
|
+
exovetter/utils.py,sha256=EeP4_jRsPWGiFoOwmdGf7IgZhLz1Kve_nGqjlZqyRDc,17976
|
|
13
|
+
exovetter/version.py,sha256=SLdro-VW9GFWjSUPvxHnmIQgPaSWyx6-CbUu_R_I9UA,337
|
|
14
|
+
exovetter/vetters.py,sha256=70Douz_igYXslJ0HJcmaCIQ8ni8_JwIvH0N2QCNdRf4,30975
|
|
15
|
+
exovetter/viz_transits.py,sha256=SGUP-LLKN8030xGGqqk47OgrO4Gwk_ladIUqH5wT8_8,5651
|
|
16
|
+
exovetter/centroid/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
17
|
+
exovetter/centroid/centroid.py,sha256=LWqjn-Oerdw5j2wDCFYqB6omE4K9gckIwAA0-WZvgkY,8655
|
|
18
|
+
exovetter/centroid/covar.py,sha256=suSgPjOVVEOclIi7rnhqc7wBbcSVsPOrdad91NXjX3Y,8973
|
|
19
|
+
exovetter/centroid/disp.py,sha256=scVCRj16mNSqugHY28_uLt5bOkcdumIlJeFG3BXfldU,3674
|
|
20
|
+
exovetter/centroid/fastpsffit.py,sha256=eRMxYUJ_4hsCxso4u1d1zQvFSJQlJ_gRzhNa2PXkKuE,4532
|
|
21
|
+
exovetter/modshift/__init__.py,sha256=j5665q0RHVzbzdPBXv_jUozGB4sex8ANXtzB41EYzRQ,68
|
|
22
|
+
exovetter/modshift/modshift.py,sha256=cAYT0zcWsJYcGRDyfVPUjHsk7l8zQdecP0LY0hTdjOw,14531
|
|
23
|
+
exovetter/modshift/plotmodshift.py,sha256=U0XKxVDKlNDXknj1g1to5dkIr0bQ_FqGp__BHhIQ2FQ,2400
|
|
24
|
+
exovetter-0.0.4.dist-info/LICENSE.rst,sha256=uhiFz7eEG8WszLtRtYIT89FNMI3ijy1aACnvl5BOz2Y,1492
|
|
25
|
+
exovetter-0.0.4.dist-info/METADATA,sha256=kXfBbYmve3Tn_N_wZObJzLw6wmXi2ktrSS3gjrFBgUw,3706
|
|
26
|
+
exovetter-0.0.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
27
|
+
exovetter-0.0.4.dist-info/top_level.txt,sha256=wh0_U5IPEspONX8zhGRaFUqfuovCGkgYjAmWuQe0w6Q,10
|
|
28
|
+
exovetter-0.0.4.dist-info/RECORD,,
|
exovetter/__init__.py.mine
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
|
|
2
|
-
|
|
3
|
-
try:
|
|
4
|
-
from .version import version as __version__
|
|
5
|
-
except ImportError:
|
|
6
|
-
__version__ = ''
|
|
7
|
-
|
|
8
|
-
from . import lpp # noqa
|
|
9
|
-
from . import tce # noqa
|
|
10
|
-
from . import trapezoid_fit # noqa
|
|
11
|
-
#from . import vetters # noqa
|
exovetter/centroid/untitled0.py
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
|
-
"""
|
|
4
|
-
Created on Fri Jul 23 21:09:54 2021
|
|
5
|
-
|
|
6
|
-
@author: smullally
|
|
7
|
-
"""
|
|
8
|
-
|
|
9
|
-
import numpy
|
|
10
|
-
import matplotlib
|
|
11
|
-
import exovetter as exo
|
|
12
|
-
from exovetter import const
|
|
13
|
-
from exovetter import utils
|
|
14
|
-
import exovetter.vetters as vet
|
|
15
|
-
import lightkurve as lk
|
|
16
|
-
|
|
17
|
-
candidate = "TOI 565.01"
|
|
18
|
-
tce = utils.get_mast_tce(candidate)
|
|
19
|
-
lc = lk.search_lightcurve(candidate, exptime=120)[0].download()
|
|
20
|
-
lc.plot()
|
|
21
|
-
tpf = lk.search_targetpixelfile(candidate, exptime=120)[0].download()
|
|
22
|
-
|
|
23
|
-
cent = vet.Centroid()
|
|
24
|
-
cent.run(tce[0],tpf, plot=True)
|
exovetter/junk
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
#Code to plot and evaluate individual transits.
|
|
2
|
-
import numpy as np
|
|
3
|
-
import matplotlib.pyplot as plt
|
|
4
|
-
from astropy.convolution import convolve, Box1DKernel
|
|
5
|
-
from exovetter import utils
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def all_transits(time, flux, period, epoch, dur, max_transits = 10):
|
|
9
|
-
"""
|
|
10
|
-
|
|
11
|
-
Parameters
|
|
12
|
-
----------
|
|
13
|
-
time : numpy array
|
|
14
|
-
times of measurements
|
|
15
|
-
flux : numpy array
|
|
16
|
-
brightness changes
|
|
17
|
-
period : float
|
|
18
|
-
period in same units as time
|
|
19
|
-
epoch : float
|
|
20
|
-
epoch of transits in same units and offset as time.
|
|
21
|
-
dur : float
|
|
22
|
-
duration of the transit in same units as the time.
|
|
23
|
-
max_transits : integer, optional
|
|
24
|
-
maximum number of transits to plot. The default is 10.
|
|
25
|
-
|
|
26
|
-
Returns
|
|
27
|
-
-------
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
intransit = utils.mark_transit_cadences(time, period, epoch, dur,
|
|
33
|
-
num_durations=1, flags=None)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
def plot_fold_transit(time,flux,period,epoch,depth,dur,smooth = None):
|
|
37
|
-
"""
|
|
38
|
-
Bins set to None will show not show the binned points. Otherwise
|
|
39
|
-
the binning is chosen
|
|
40
|
-
|
|
41
|
-
Parameters
|
|
42
|
-
----------
|
|
43
|
-
time : TYPE
|
|
44
|
-
DESCRIPTION.
|
|
45
|
-
flux : TYPE
|
|
46
|
-
DESCRIPTION.
|
|
47
|
-
period : TYPE
|
|
48
|
-
DESCRIPTION.
|
|
49
|
-
epoch : TYPE
|
|
50
|
-
DESCRIPTION.
|
|
51
|
-
depth : TYPE
|
|
52
|
-
DESCRIPTION.
|
|
53
|
-
duration : TYPE
|
|
54
|
-
DESCRIPTION.
|
|
55
|
-
smooth : integer, optional
|
|
56
|
-
DESCRIPTION. The default is None.
|
|
57
|
-
|
|
58
|
-
Returns
|
|
59
|
-
-------
|
|
60
|
-
None.
|
|
61
|
-
|
|
62
|
-
"""
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
phases = utils.compute_phases(time, period, epoch, offset=0.25)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
intransit = utils.mark_transit_cadences(time, period, epoch, dur,
|
|
69
|
-
num_durations=1, flags=None)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if smooth is not None:
|
|
73
|
-
N = int(np.floor(len(phases[intransit])/smooth))
|
|
74
|
-
sort_index = np.argsort(phases)
|
|
75
|
-
smoothed_signal = convolve(flux[sort_index], Box1DKernel(N))
|
|
76
|
-
|
|
77
|
-
plt.figure(figsize=(10,6))
|
|
78
|
-
|
|
79
|
-
plt.plot(phases*period, flux, 'k.', ms = 3, label="Folded")
|
|
80
|
-
|
|
81
|
-
if smooth is not None:
|
|
82
|
-
sort_phases = phases[sort_index]
|
|
83
|
-
plt.plot(sort_phases[N:-N]*period, smoothed_signal[N:-N], 'r--',
|
|
84
|
-
lw=1.5, label="Box1DSmooth")
|
|
85
|
-
|
|
86
|
-
#med_flux = np.median(flux)
|
|
87
|
-
#plt.ylim(med_flux-1.7*depth, med_flux+1.2*depth)
|
|
88
|
-
plt.legend(loc="upper right")
|
|
89
|
-
plt.xlabel('Phased Times')
|
exovetter-0.0.2.dist-info/RECORD
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
exovetter/__init__.py,sha256=79wPvKodLvzu1QiCX8tYpm7WcxST0mx-CWorfUz3D-c,278
|
|
2
|
-
exovetter/__init__.py.mine,sha256=qkfZ03KtSVp6v4eJKNyhLIb7Ob8IBjLH9DusHpwg2qM,279
|
|
3
|
-
exovetter/const.py,sha256=aKBZmiZYlia2EuMDarzHpIRFYFKz-Vk81TJK2o2lUEE,996
|
|
4
|
-
exovetter/junk,sha256=zHyh5mWkuj14Gwz9fHlgLq6CS-KNavx0zTvJNdYPsik,2294
|
|
5
|
-
exovetter/lightkurve_utils.py,sha256=2F8vWjpabIzI0-Vs7xq5c6T3JKmqe92OBOWDzb5DZdQ,1107
|
|
6
|
-
exovetter/lpp.py,sha256=qZ-TeHjShNCeyX99JgPNuoOQQ4P2DPVqoRYeTJIW2Lk,12951
|
|
7
|
-
exovetter/model.py,sha256=ZRMoSLf_4V0Mgftpi_4A0iRgoEYHSdc96tWB8MjDH8k,2817
|
|
8
|
-
exovetter/odd_even.py,sha256=g8TTd2JpwxLuTfYlonw2pbcVqnj2a7QvEAzL4qkxso4,6910
|
|
9
|
-
exovetter/sweet.py,sha256=9nuagC4sMG7-vHR__iYCzyc9gmdGsIAvgGTnixYWtDk,2883
|
|
10
|
-
exovetter/tce.py,sha256=m1yfVNjjsPX36REXCWB_TPhklQ6xyEQ831O4g2rRFe4,7195
|
|
11
|
-
exovetter/transit_coverage.py,sha256=Y4Muj7lKRsa0Sn6hD70O5On-2Aae1p5i-VTfJt5tsOw,2154
|
|
12
|
-
exovetter/trapezoid_fit.py,sha256=eMw0Z7DvJoyCcTXEtVTLh356DI1gD8DqOrpsulOoC8k,30977
|
|
13
|
-
exovetter/utils.py,sha256=kuxUMbvp69CnyVWqT30GItJk1U7zclrHEqTzyxc8sh4,16555
|
|
14
|
-
exovetter/version.py,sha256=X3C4BtKCe_sMyuqyUb8QmenyhJrDeGFQ_wtLFIJbPsQ,337
|
|
15
|
-
exovetter/vetters.py,sha256=lPjU2DXR0pK2-hIpgxVD_OHFSlty3wF-p-vschzkHwQ,16667
|
|
16
|
-
exovetter/viz_transits.py,sha256=yUox9_2prKxPAv2OopkY36yqfHmI5Z_uHZlZN149t-w,5402
|
|
17
|
-
exovetter/centroid/centroid.py,sha256=LxGRGqFHBFQSO7hNI4bB31dIyJxWyegx8NNcHSubeVA,8117
|
|
18
|
-
exovetter/centroid/covar.py,sha256=2OwG4lBw9puV9hMNm6iGGukHW1Q1_P4LLk6WDhtUpIo,8923
|
|
19
|
-
exovetter/centroid/disp.py,sha256=scVCRj16mNSqugHY28_uLt5bOkcdumIlJeFG3BXfldU,3674
|
|
20
|
-
exovetter/centroid/fastpsffit.py,sha256=eRMxYUJ_4hsCxso4u1d1zQvFSJQlJ_gRzhNa2PXkKuE,4532
|
|
21
|
-
exovetter/centroid/untitled0.py,sha256=a6t54TK1ADPfPIwXk6uoqBLZnvHiaKgSDJIF-GeCbww,539
|
|
22
|
-
exovetter/modshift/__init__.py,sha256=j5665q0RHVzbzdPBXv_jUozGB4sex8ANXtzB41EYzRQ,68
|
|
23
|
-
exovetter/modshift/modshift.py,sha256=cAYT0zcWsJYcGRDyfVPUjHsk7l8zQdecP0LY0hTdjOw,14531
|
|
24
|
-
exovetter/modshift/plotmodshift.py,sha256=U0XKxVDKlNDXknj1g1to5dkIr0bQ_FqGp__BHhIQ2FQ,2400
|
|
25
|
-
exovetter-0.0.2.dist-info/LICENSE.rst,sha256=uhiFz7eEG8WszLtRtYIT89FNMI3ijy1aACnvl5BOz2Y,1492
|
|
26
|
-
exovetter-0.0.2.dist-info/METADATA,sha256=n0n-_dlrNy8H1zDZ2yhnxYzdXV7iEMT5RnM6BWQtMy0,3719
|
|
27
|
-
exovetter-0.0.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
28
|
-
exovetter-0.0.2.dist-info/top_level.txt,sha256=wh0_U5IPEspONX8zhGRaFUqfuovCGkgYjAmWuQe0w6Q,10
|
|
29
|
-
exovetter-0.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|