Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.

entropypf

Fast entropy-based period finder for unevenly sampled astronomical time series.

Implements the minimum Shannon entropy method introduced by Cincotta, Méndez & Núñez (1995, ApJ 449, 231) for detecting periodicity in variable-star light curves and other time series with irregular sampling.

Installation

pip install entropypf

Quick start

import numpy as np
from entropypf import find_best_period, get_entropies

# t: observation times (days), u: magnitudes
periods, entropies = find_best_period(t, u, p0=0.1, p1=10.0, p_num=5000)
print(f"Best period: {periods[0]:.4f} days  (entropy={entropies[0]:.4f})")

To inspect the full entropy periodogram:

trial_periods = np.linspace(0.1, 10.0, 5000)
S = get_entropies(t, u, trial_periods, L=7, K=7)
best = trial_periods[np.argmin(S)]

How it works

For each trial period p, the observations are folded into a phase–magnitude diagram on the unit square and divided into an L × K grid. The Shannon entropy of the resulting occupation-probability matrix is computed:

S = -∑ μᵢ ln(μᵢ)

When p equals the true period the light curve is ordered and entropy is low; otherwise the diagram is disordered and entropy is high. The true period corresponds to the deepest minimum of the entropy periodogram.

API

Function Description
find_best_period(t, u, p0, p1, p_num, ...) Full pipeline: builds period grid, removes aliases, returns top candidates
get_entropies(t, u, p, L, K) Vectorized entropy at each trial period
get_test_periods(p0, p1, n, ...) Non-uniform period grid (dense at short periods, sparse at long)
get_phases(t, u, period) Fold times into phases in [0, 1)
get_entropy(Mu) Shannon entropy of an occupation-probability matrix

See each function's docstring for full parameter details.

Reference

Cincotta, P. M., Méndez, M., & Núñez, J. A. (1995). Astronomical Time Series Analysis. I. A Search for Periodicity Using Information Entropy. ApJ, 449, 231. ADS

License

MIT

Metadata

Release files for entropypf 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for entropypf 0.1.0
File Size Uploaded Provenance Actions
entropypf-0.1.0.tar.gz 10.2 kB Without provenance Details for entropypf-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for entropypf 0.1.0
File Interpreter ABI Platform Actions
entropypf-0.1.0-py3-none-any.whl Python 3 none any Details for entropypf-0.1.0-py3-none-any.whl

Total release size: 18.1 kB

Release files / entropypf-0.1.0.tar.gz

Download URL entropypf-0.1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dac9fabd58b137883742a414e114985d237562a9a107134a9c6b5389910b0103
BLAKE2b-256 checksum
How to use checksums
53a7d36539f42f78fdd70e9914132f5e645571e8c7144548f8aaab1cfe370879
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / entropypf-0.1.0-py3-none-any.whl

Download URL entropypf-0.1.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e6e7969a78c171d5a8c78d917b2b9a6f71baf593e59231b8cca5f8017ccf318
BLAKE2b-256 checksum
How to use checksums
732828438ea6f8d494c94be54b55b98918e86e11423019226ad0e8d6c42231ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for entropypf 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page