tkmatrix 0.8.0__tar.gz → 0.8.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.
- {tkmatrix-0.8.0/tkmatrix.egg-info → tkmatrix-0.8.2}/PKG-INFO +1 -1
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/setup.py +1 -1
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/custom_algorithms/BlsCustomSearchAlgorithm.py +4 -4
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/custom_algorithms/custom_search.py +2 -1
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/tkmatrix_class.py +2 -2
- {tkmatrix-0.8.0 → tkmatrix-0.8.2/tkmatrix.egg-info}/PKG-INFO +1 -1
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/LICENSE +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/MANIFEST.in +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/README.md +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/setup.cfg +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/__init__.py +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/__main__.py +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/custom_algorithms/__init__.py +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/inject_model.py +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/inject_rv_model.py +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/properties.yaml +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/rv.py +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/tests/__init__.py +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix/tests/test_tkmatrix.py +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix.egg-info/SOURCES.txt +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix.egg-info/dependency_links.txt +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix.egg-info/requires.txt +0 -0
- {tkmatrix-0.8.0 → tkmatrix-0.8.2}/tkmatrix.egg-info/top_level.txt +0 -0
|
@@ -20,7 +20,7 @@ class BlsCustomSearchAlgorithm(CustomSearchAlgorithm):
|
|
|
20
20
|
|
|
21
21
|
def search(self, time, flux, rstar, rstar_min, rstar_max, mass, mstar_min, mstar_max,
|
|
22
22
|
ab, epoch, period, min_period, max_period, min_snr, cores, transit_template, detrend_method, ws,
|
|
23
|
-
transits_min_count, signal_selection_mode, run_limit):
|
|
23
|
+
transits_min_count, signal_selection_mode, run_limit, oversampling):
|
|
24
24
|
|
|
25
25
|
snr = 1e12
|
|
26
26
|
found_signal = False
|
|
@@ -37,7 +37,6 @@ class BlsCustomSearchAlgorithm(CustomSearchAlgorithm):
|
|
|
37
37
|
periods = []
|
|
38
38
|
t0s = []
|
|
39
39
|
while snr >= min_snr and not found_signal and (run_limit > 0 and run < run_limit):
|
|
40
|
-
oversampling = 1
|
|
41
40
|
star_info = StarInfo(mass=mass, radius=rstar)
|
|
42
41
|
tls_period_grid, oversampling = LcbuilderHelper.calculate_period_grid(time, min_period, max_period,
|
|
43
42
|
oversampling, star_info,
|
|
@@ -45,13 +44,14 @@ class BlsCustomSearchAlgorithm(CustomSearchAlgorithm):
|
|
|
45
44
|
lc = lightkurve.LightCurve(time=time, flux=flux)
|
|
46
45
|
results = lc.to_periodogram(method='bls', period=tls_period_grid)
|
|
47
46
|
max_power_index = np.argmax(results.power)
|
|
48
|
-
snr = results.snr[max_power_index].value / np.nanmedian(results.snr).value
|
|
49
47
|
sde = results.power[max_power_index].value / np.nanmedian(results.power).value
|
|
50
48
|
t0 = results.transit_time_at_max_power.value
|
|
51
49
|
duration = results.duration_at_max_power.value
|
|
52
50
|
found_period = results.period_at_max_power.value
|
|
51
|
+
intransit_result = transit_mask(time, found_period, 2 * duration, t0)
|
|
52
|
+
oot_flux = flux[~intransit_result]
|
|
53
|
+
snr = results.snr[max_power_index].value / np.nanstd(oot_flux)
|
|
53
54
|
if snr >= min_snr:
|
|
54
|
-
intransit_result = transit_mask(time, found_period, 2 * duration, t0)
|
|
55
55
|
time = time[~intransit_result]
|
|
56
56
|
flux = flux[~intransit_result]
|
|
57
57
|
time, flux = cleaned_array(time, flux)
|
|
@@ -12,7 +12,7 @@ class CustomSearchAlgorithm(ABC):
|
|
|
12
12
|
def search(self, time, flux, rstar, rstar_min, rstar_max, mass, mstar_min, mstar_max,
|
|
13
13
|
ab, epoch, period, min_period, max_period, min_snr, cores,
|
|
14
14
|
transit_template, detrend_method, ws, transits_min_count,
|
|
15
|
-
signal_selection_mode, run_limit):
|
|
15
|
+
signal_selection_mode, run_limit, oversampling):
|
|
16
16
|
|
|
17
17
|
"""
|
|
18
18
|
Searches for a signal with a given epoch and period in the signal given by time and flux.
|
|
@@ -38,5 +38,6 @@ class CustomSearchAlgorithm(ABC):
|
|
|
38
38
|
:param transits_min_count: the minimum number of transits for a signal to be valid
|
|
39
39
|
:param signal_selection_mode: the way for retrieving the signal
|
|
40
40
|
:param run_limit: the number of runs to limit the search
|
|
41
|
+
:param oversampling: the density of the period grid
|
|
41
42
|
"""
|
|
42
43
|
pass
|
|
@@ -405,7 +405,7 @@ class MATRIX:
|
|
|
405
405
|
bigger ones.
|
|
406
406
|
"""
|
|
407
407
|
assert detrend_ws is not None and isinstance(detrend_ws, (int, float))
|
|
408
|
-
assert transit_template in ('tls', 'bls')
|
|
408
|
+
assert transit_template in ('tls', 'bls', 'bls-periodogram')
|
|
409
409
|
assert inject_dir is not None and isinstance(inject_dir, str)
|
|
410
410
|
assert detrend_method == self.DETREND_GP or detrend_method == self.DETREND_BIWEIGHT
|
|
411
411
|
if transit_template == 'tls':
|
|
@@ -662,7 +662,7 @@ class MATRIX:
|
|
|
662
662
|
.search(time, flux, rstar, rstar_min, rstar_max, mass, mstar_min, mstar_max,
|
|
663
663
|
ab, epoch, period, min_period, max_period, min_snr, self.cores,
|
|
664
664
|
transit_template, detrend_method, ws, transits_min_count,
|
|
665
|
-
signal_selection_mode, run_limit)
|
|
665
|
+
signal_selection_mode, run_limit, oversampling)
|
|
666
666
|
else:
|
|
667
667
|
return self.__tls_search(time, flux, rstar, rstar_min, rstar_max, mass, mstar_min, mstar_max, ab, epoch,
|
|
668
668
|
period, min_period, max_period, min_snr, self.cores, transit_template,
|
|
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
|