gputls 2.2.2__tar.gz → 2.2.3__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.
- {gputls-2.2.2/src/gputls.egg-info → gputls-2.2.3}/PKG-INFO +7 -1
- {gputls-2.2.2 → gputls-2.2.3}/README.md +6 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/core.py +3 -2
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/stats.py +1 -1
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/version.py +1 -1
- {gputls-2.2.2 → gputls-2.2.3/src/gputls.egg-info}/PKG-INFO +7 -1
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls.egg-info/SOURCES.txt +1 -0
- gputls-2.2.3/tests/test_snr_units.py +34 -0
- {gputls-2.2.2 → gputls-2.2.3}/LICENSE +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/pyproject.toml +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/setup.cfg +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/__init__.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/constants.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/grid.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/helpers.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/interpolation.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/kernels.cu +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/main.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/results.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/screening.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/transit.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/validate.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls/workspace.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls.egg-info/dependency_links.txt +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls.egg-info/requires.txt +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/src/gputls.egg-info/top_level.txt +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/tests/test_bucket_sort.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/tests/test_candidate_screening.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/tests/test_gtls.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/tests/test_patch_scan.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/tests/test_stats.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/tests/test_tls_compare.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/tests/test_window_reuse.py +0 -0
- {gputls-2.2.2 → gputls-2.2.3}/tests/test_workspace.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gputls
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: GPU-accelerated Transit Least Squares (TLS) for periodic transit detection
|
|
5
5
|
Author-email: Quanquan Hu <huqq1917@outlook.com>
|
|
6
6
|
Maintainer-email: Quanquan Hu <huqq1917@outlook.com>
|
|
@@ -59,6 +59,12 @@ in parallel on an NVIDIA GPU, which makes it several times faster than CPU TLS.
|
|
|
59
59
|
|
|
60
60
|
## Features
|
|
61
61
|
|
|
62
|
+
Version 2.2.3 corrects the out-of-transit noise masks used by `snr` and
|
|
63
|
+
`snrPink`: their duration is now expressed in days, matching the time array.
|
|
64
|
+
Earlier versions passed a fractional duration, which could bias the reported
|
|
65
|
+
signal-to-noise ratios. Period searches, periodograms, and the default 0.01
|
|
66
|
+
epoch-search margins are unchanged by this correction.
|
|
67
|
+
|
|
62
68
|
- Drop-in replacement for the `transitleastsquares` search API
|
|
63
69
|
- Limb-darkened transit templates (default, grazing and box-shaped)
|
|
64
70
|
- Batches trial periods automatically to fit the free GPU memory
|
|
@@ -12,6 +12,12 @@ in parallel on an NVIDIA GPU, which makes it several times faster than CPU TLS.
|
|
|
12
12
|
|
|
13
13
|
## Features
|
|
14
14
|
|
|
15
|
+
Version 2.2.3 corrects the out-of-transit noise masks used by `snr` and
|
|
16
|
+
`snrPink`: their duration is now expressed in days, matching the time array.
|
|
17
|
+
Earlier versions passed a fractional duration, which could bias the reported
|
|
18
|
+
signal-to-noise ratios. Period searches, periodograms, and the default 0.01
|
|
19
|
+
epoch-search margins are unchanged by this correction.
|
|
20
|
+
|
|
15
21
|
- Drop-in replacement for the `transitleastsquares` search API
|
|
16
22
|
- Limb-darkened transit templates (default, grazing and box-shaped)
|
|
17
23
|
- Batches trial periods automatically to fit the free GPU memory
|
|
@@ -767,7 +767,7 @@ def search_single_period(search, period, t, y, dy):
|
|
|
767
767
|
t=t,
|
|
768
768
|
y=y,
|
|
769
769
|
period=period,
|
|
770
|
-
duration=
|
|
770
|
+
duration=transit_duration_in_days,
|
|
771
771
|
T0=T0,
|
|
772
772
|
transit_times=transit_times,
|
|
773
773
|
transit_duration_in_days=transit_duration_in_days,
|
|
@@ -776,7 +776,8 @@ def search_single_period(search, period, t, y, dy):
|
|
|
776
776
|
)
|
|
777
777
|
|
|
778
778
|
all_flux_intransit = np.concatenate([all_flux_intransit_odd, all_flux_intransit_even])
|
|
779
|
-
|
|
779
|
+
# The mask uses the same time units as t; rawDuration is a fraction of P.
|
|
780
|
+
intransit = transit_mask(t, period, 2 * transit_duration_in_days, T0)
|
|
780
781
|
flux_ootr = y[~intransit]
|
|
781
782
|
depth_mean = np.mean(all_flux_intransit)
|
|
782
783
|
snr = ((1 - depth_mean) / np.std(flux_ootr)) * len(all_flux_intransit) ** (0.5)
|
|
@@ -136,7 +136,7 @@ def pink_noise(data, width, window_std=None):
|
|
|
136
136
|
|
|
137
137
|
def snr_stats(t, y, period, duration, T0, transit_times, transit_duration_in_days, per_transit_count,
|
|
138
138
|
window_std=None):
|
|
139
|
-
"""Return
|
|
139
|
+
"""Return per-transit pink-noise SNR; both duration arguments are in days."""
|
|
140
140
|
|
|
141
141
|
snr_pink_per_transit = np.zeros([len(transit_times)])
|
|
142
142
|
intransit = transit_mask(t, period, 2 * duration, T0)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "2.2.
|
|
1
|
+
__version__ = "2.2.3"
|
|
2
2
|
__date__ = "Nov-2026"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gputls
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: GPU-accelerated Transit Least Squares (TLS) for periodic transit detection
|
|
5
5
|
Author-email: Quanquan Hu <huqq1917@outlook.com>
|
|
6
6
|
Maintainer-email: Quanquan Hu <huqq1917@outlook.com>
|
|
@@ -59,6 +59,12 @@ in parallel on an NVIDIA GPU, which makes it several times faster than CPU TLS.
|
|
|
59
59
|
|
|
60
60
|
## Features
|
|
61
61
|
|
|
62
|
+
Version 2.2.3 corrects the out-of-transit noise masks used by `snr` and
|
|
63
|
+
`snrPink`: their duration is now expressed in days, matching the time array.
|
|
64
|
+
Earlier versions passed a fractional duration, which could bias the reported
|
|
65
|
+
signal-to-noise ratios. Period searches, periodograms, and the default 0.01
|
|
66
|
+
epoch-search margins are unchanged by this correction.
|
|
67
|
+
|
|
62
68
|
- Drop-in replacement for the `transitleastsquares` search API
|
|
63
69
|
- Limb-darkened transit templates (default, grazing and box-shaped)
|
|
64
70
|
- Batches trial periods automatically to fit the free GPU memory
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""End-to-end regression for day vs fractional-period noise-mask durations."""
|
|
2
|
+
import numpy as np
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from gputls import gtls, stats
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@pytest.mark.parametrize("period", [0.73, 7.31])
|
|
9
|
+
def test_native_noise_statistics_use_duration_in_days(period):
|
|
10
|
+
rng = np.random.default_rng(223)
|
|
11
|
+
t = np.arange(1.001, 81., .02)
|
|
12
|
+
epoch, duration = 1.213, .08
|
|
13
|
+
distance = (t - epoch + period / 2) % period - period / 2
|
|
14
|
+
y = 1 - .005 * (np.abs(distance) < duration / 2)
|
|
15
|
+
y += rng.normal(0, .0003, len(t))
|
|
16
|
+
result = gtls(t, y, np.full(len(t), .0003), verbose=False).power(
|
|
17
|
+
periods=np.linspace(period * .999, period * 1.001, 101),
|
|
18
|
+
T0_fit_margin=.01, T0_refine_margin=.01)
|
|
19
|
+
|
|
20
|
+
# Independent masks in time units, and direct per-event sample selection.
|
|
21
|
+
distance = (t - result.T0 + result.period / 2) % result.period - result.period / 2
|
|
22
|
+
oot = y[np.abs(distance) >= result.duration]
|
|
23
|
+
events = [y[(t > mid - result.duration / 2) &
|
|
24
|
+
(t < mid + result.duration / 2)] for mid in result.transitTimes]
|
|
25
|
+
inside = np.concatenate(events[1::2] + events[::2])
|
|
26
|
+
expected = (1 - inside.mean()) / oot.std() * np.sqrt(len(inside))
|
|
27
|
+
assert result.snr == pytest.approx(expected, rel=1e-12)
|
|
28
|
+
|
|
29
|
+
# CPU pink_noise is independently fed the correctly excluded OOT sample.
|
|
30
|
+
width = int(np.mean([len(event) for event in events]))
|
|
31
|
+
pink = stats.pink_noise(oot, width)
|
|
32
|
+
per_event = [(1 - event.mean()) / pink if len(event) else 0 for event in events]
|
|
33
|
+
expected_pink = np.mean(per_event) * np.sqrt(len(events))
|
|
34
|
+
assert result.snrPink == pytest.approx(expected_pink, rel=1e-10)
|
|
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
|