cuperiod 1.0.0__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.
- cuperiod-1.0.0/.gitignore +220 -0
- cuperiod-1.0.0/CHANGELOG.md +64 -0
- cuperiod-1.0.0/CITATION.cff +27 -0
- cuperiod-1.0.0/LICENSE +674 -0
- cuperiod-1.0.0/PKG-INFO +193 -0
- cuperiod-1.0.0/README.md +133 -0
- cuperiod-1.0.0/pyproject.toml +156 -0
- cuperiod-1.0.0/src/cuperiod/__init__.py +85 -0
- cuperiod-1.0.0/src/cuperiod/api.py +187 -0
- cuperiod-1.0.0/src/cuperiod/batch/__init__.py +7 -0
- cuperiod-1.0.0/src/cuperiod/batch/io.py +232 -0
- cuperiod-1.0.0/src/cuperiod/batch/runner.py +453 -0
- cuperiod-1.0.0/src/cuperiod/batch/sizing.py +57 -0
- cuperiod-1.0.0/src/cuperiod/cli/__init__.py +7 -0
- cuperiod-1.0.0/src/cuperiod/cli/app.py +224 -0
- cuperiod-1.0.0/src/cuperiod/core/__init__.py +54 -0
- cuperiod-1.0.0/src/cuperiod/core/_typing.py +22 -0
- cuperiod-1.0.0/src/cuperiod/core/backend.py +158 -0
- cuperiod-1.0.0/src/cuperiod/core/columns.py +309 -0
- cuperiod-1.0.0/src/cuperiod/core/config.py +445 -0
- cuperiod-1.0.0/src/cuperiod/core/device.py +162 -0
- cuperiod-1.0.0/src/cuperiod/core/errors.py +47 -0
- cuperiod-1.0.0/src/cuperiod/core/grid.py +192 -0
- cuperiod-1.0.0/src/cuperiod/core/lightcurve.py +416 -0
- cuperiod-1.0.0/src/cuperiod/core/peaks.py +215 -0
- cuperiod-1.0.0/src/cuperiod/core/result.py +299 -0
- cuperiod-1.0.0/src/cuperiod/methods/__init__.py +36 -0
- cuperiod-1.0.0/src/cuperiod/methods/_bls_core.py +728 -0
- cuperiod-1.0.0/src/cuperiod/methods/base.py +248 -0
- cuperiod-1.0.0/src/cuperiod/methods/bls.py +239 -0
- cuperiod-1.0.0/src/cuperiod/methods/conditional_entropy.py +311 -0
- cuperiod-1.0.0/src/cuperiod/methods/gls.py +438 -0
- cuperiod-1.0.0/src/cuperiod/methods/mhaov.py +325 -0
- cuperiod-1.0.0/src/cuperiod/methods/pdm.py +345 -0
- cuperiod-1.0.0/src/cuperiod/methods/string_length.py +180 -0
- cuperiod-1.0.0/src/cuperiod/methods/tls.py +475 -0
- cuperiod-1.0.0/src/cuperiod/multiband/__init__.py +5 -0
- cuperiod-1.0.0/src/cuperiod/multiband/bls_mb.py +137 -0
- cuperiod-1.0.0/src/cuperiod/multiband/gls_mb.py +87 -0
- cuperiod-1.0.0/src/cuperiod/multiband/mhaov_mb.py +87 -0
- cuperiod-1.0.0/src/cuperiod/py.typed +0 -0
- cuperiod-1.0.0/tests/conftest.py +21 -0
- cuperiod-1.0.0/tests/synth.py +49 -0
- cuperiod-1.0.0/tests/test_api.py +62 -0
- cuperiod-1.0.0/tests/test_batch.py +114 -0
- cuperiod-1.0.0/tests/test_bls.py +105 -0
- cuperiod-1.0.0/tests/test_cli.py +89 -0
- cuperiod-1.0.0/tests/test_columns.py +133 -0
- cuperiod-1.0.0/tests/test_conditional_entropy.py +72 -0
- cuperiod-1.0.0/tests/test_config.py +44 -0
- cuperiod-1.0.0/tests/test_device.py +19 -0
- cuperiod-1.0.0/tests/test_gls.py +89 -0
- cuperiod-1.0.0/tests/test_grid.py +54 -0
- cuperiod-1.0.0/tests/test_lightcurve.py +77 -0
- cuperiod-1.0.0/tests/test_mhaov.py +99 -0
- cuperiod-1.0.0/tests/test_pdm.py +94 -0
- cuperiod-1.0.0/tests/test_peaks.py +46 -0
- cuperiod-1.0.0/tests/test_registry.py +68 -0
- cuperiod-1.0.0/tests/test_result.py +120 -0
- cuperiod-1.0.0/tests/test_string_length.py +70 -0
- cuperiod-1.0.0/tests/test_tls.py +120 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
# autosummary stub pages are regenerated on every build (autosummary_generate=True)
|
|
74
|
+
docs/api/generated/
|
|
75
|
+
|
|
76
|
+
# PyBuilder
|
|
77
|
+
.pybuilder/
|
|
78
|
+
target/
|
|
79
|
+
|
|
80
|
+
# Jupyter Notebook
|
|
81
|
+
.ipynb_checkpoints
|
|
82
|
+
|
|
83
|
+
# IPython
|
|
84
|
+
profile_default/
|
|
85
|
+
ipython_config.py
|
|
86
|
+
|
|
87
|
+
# pyenv
|
|
88
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
89
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
90
|
+
# .python-version
|
|
91
|
+
|
|
92
|
+
# pipenv
|
|
93
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
94
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
95
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
96
|
+
# install all needed dependencies.
|
|
97
|
+
# Pipfile.lock
|
|
98
|
+
|
|
99
|
+
# UV
|
|
100
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
101
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
102
|
+
# commonly ignored for libraries.
|
|
103
|
+
# uv.lock
|
|
104
|
+
|
|
105
|
+
# poetry
|
|
106
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
107
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
108
|
+
# commonly ignored for libraries.
|
|
109
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
110
|
+
# poetry.lock
|
|
111
|
+
# poetry.toml
|
|
112
|
+
|
|
113
|
+
# pdm
|
|
114
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
115
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
116
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
117
|
+
# pdm.lock
|
|
118
|
+
# pdm.toml
|
|
119
|
+
.pdm-python
|
|
120
|
+
.pdm-build/
|
|
121
|
+
|
|
122
|
+
# pixi
|
|
123
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
124
|
+
# pixi.lock
|
|
125
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
126
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
127
|
+
.pixi
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
201
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
203
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to cuPeriod are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [1.0.0] — 2026-06-30
|
|
8
|
+
|
|
9
|
+
First public release.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Seven period-search methods, each with an optimized CPU backend and a CUDA GPU backend:
|
|
14
|
+
- **GLS** — generalized (floating-mean) Lomb–Scargle via non-uniform FFT
|
|
15
|
+
(finufft / cufinufft).
|
|
16
|
+
- **BLS** — box least squares, with a multicore `numba` CPU search (`[fast]` extra) and
|
|
17
|
+
a CUDA kernel.
|
|
18
|
+
- **PDM** — phase dispersion minimization (Stellingwerf).
|
|
19
|
+
- **CE** — conditional entropy (Graham et al. 2013).
|
|
20
|
+
- **String-Length** — Dworetsky / Lafler–Kinman.
|
|
21
|
+
- **MHAOV** — multiharmonic analysis of variance (Schwarzenberg-Czerny).
|
|
22
|
+
- **TLS** — transit least squares, a limb-darkened matched filter.
|
|
23
|
+
- Single-light-curve entry point `cuperiod.periodogram` and the batch sibling
|
|
24
|
+
`cuperiod.batch_periodograms` (CPU process pool or GPU, resumable Parquet/CSV output).
|
|
25
|
+
- Multi-band joint modelling for GLS, BLS, and MHAOV.
|
|
26
|
+
- Frictionless inputs: arrays, dicts, pandas/astropy/pyarrow tables, and
|
|
27
|
+
CSV/ECSV/FITS/Parquet files, with case-insensitive, **survey-aware** column
|
|
28
|
+
auto-detection (`ColumnMap` — ASAS-SN, ASAS-3, ATLAS, CRTS/CSS, ZTF, Pan-STARRS, LSST,
|
|
29
|
+
TESS, Kepler, Gaia, MACHO) and domain-aware error pairing, plus automatic
|
|
30
|
+
magnitude/flux handling.
|
|
31
|
+
- N-best-period peak finding with alias- and harmonic-aware selection.
|
|
32
|
+
- `cuperiod` command-line interface: `run`, `batch`, `methods`, `gpu-info`, `grid-info`.
|
|
33
|
+
- Per-method settings models with `CUPERIOD_<METHOD>_<FIELD>` environment overrides, and
|
|
34
|
+
GPU worker auto-sizing.
|
|
35
|
+
- Full Sphinx documentation (hosted on Read the Docs), a worked-example Jupyter notebook
|
|
36
|
+
(`examples/cuperiod_tour.ipynb`), and a reproducible validation + benchmark suite under
|
|
37
|
+
`benchmarks/`.
|
|
38
|
+
|
|
39
|
+
### Robustness
|
|
40
|
+
|
|
41
|
+
- Peak selection returns the true peak even when it sits at a frequency-grid edge (a
|
|
42
|
+
signal whose period is comparable to the observing baseline), and never reports a
|
|
43
|
+
non-finite period or NaN-power sample.
|
|
44
|
+
- Settings reject transposed frequency / period / duration-fraction bounds at
|
|
45
|
+
construction; the CLI's `--out` JSON is always standard JSON (no `NaN`/`Infinity`).
|
|
46
|
+
- GPU kernels opt into larger shared memory where the device allows, and otherwise raise
|
|
47
|
+
a clear error naming the setting to reduce — instead of a raw CUDA driver error.
|
|
48
|
+
- Batch sinks are correct across re-runs: a file sink is keyed by `(key, method)`, a
|
|
49
|
+
directory sink refuses a mismatched `chunk_size` on resume, and a CSV sink asked to
|
|
50
|
+
store raw spectra fails loudly rather than dropping the columns.
|
|
51
|
+
- The batch process pool uses the `spawn` start method on every platform, so a CPU/GPU
|
|
52
|
+
pool no longer deadlocks on Linux (the default `fork` copies parent native thread pools
|
|
53
|
+
/ CUDA contexts into the workers).
|
|
54
|
+
- Method-name lookup ignores case and non-alphanumeric separators, so `"String-Length"`,
|
|
55
|
+
`"StringLength"` and `"STRINGLENGTH"` all resolve (as documented).
|
|
56
|
+
|
|
57
|
+
### Validated
|
|
58
|
+
|
|
59
|
+
- Every method matches an established reference (astropy `LombScargle` / `BoxLeastSquares`,
|
|
60
|
+
PyAstronomy, and textbook implementations) to floating-point round-off, with CPU↔GPU
|
|
61
|
+
parity, on 72 real ASAS-SN light curves across six variability classes and on confirmed
|
|
62
|
+
Kepler transits.
|
|
63
|
+
|
|
64
|
+
[1.0.0]: https://github.com/tjayasinghe/cuPeriod/releases/tag/v1.0.0
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use cuPeriod in your research, please cite it as below."
|
|
3
|
+
title: cuPeriod
|
|
4
|
+
abstract: >-
|
|
5
|
+
Optimized, GPU-accelerated periodograms for astronomy: seven period-search methods
|
|
6
|
+
(GLS, BLS, PDM, CE, String-Length, MHAOV, TLS) with fast CPU and CUDA backends, scaling
|
|
7
|
+
from a single light curve to millions.
|
|
8
|
+
type: software
|
|
9
|
+
authors:
|
|
10
|
+
- given-names: Tharindu
|
|
11
|
+
family-names: Jayasinghe
|
|
12
|
+
# Add your ORCID here to make the citation unambiguous, e.g.:
|
|
13
|
+
# orcid: "https://orcid.org/0000-0000-0000-0000"
|
|
14
|
+
version: 1.0.0
|
|
15
|
+
date-released: "2026-06-30"
|
|
16
|
+
license: GPL-3.0-or-later
|
|
17
|
+
repository-code: "https://github.com/tjayasinghe/cuPeriod"
|
|
18
|
+
url: "https://cuperiod.readthedocs.io"
|
|
19
|
+
keywords:
|
|
20
|
+
- astronomy
|
|
21
|
+
- periodogram
|
|
22
|
+
- lomb-scargle
|
|
23
|
+
- box-least-squares
|
|
24
|
+
- variable-stars
|
|
25
|
+
- time-series
|
|
26
|
+
- gpu
|
|
27
|
+
- cuda
|