cuperiod.Periodogram¶
- class cuperiod.Periodogram(method, backend, frequency, period, power, objective_sense, n_samples, baseline, extras=<factory>, meta=<factory>)[source]¶
Bases:
objectA computed periodogram for a single light curve and method.
- Parameters:
method (str)
backend (str)
frequency (NDArray[float64])
period (NDArray[float64])
power (NDArray[float64])
objective_sense (Literal['max', 'min'])
n_samples (int)
baseline (float)
extras (Mapping[str, NDArray[float64]])
meta (Mapping[str, Any])
- method, backend
The method name and the concrete backend that produced this spectrum.
- Type:
str
- frequency, period, power
The raw spectrum, ascending in frequency (
period = 1/frequency).- Type:
numpy.ndarray
- objective_sense¶
Whether peaks are maxima or minima of
power.- Type:
{"max", "min"}
- n_samples¶
Number of finite light-curve points used.
- Type:
int
- baseline¶
Time baseline in days (sets the Rayleigh resolution
1/baseline).- Type:
float
- extras¶
Per-grid method-specific arrays, aligned with
frequency.- Type:
Mapping[str,numpy.ndarray]
- meta¶
Free-form metadata carried from the light curve.
- Type:
Mapping
- classmethod from_spectrum(*, method, backend, frequency, power, objective_sense, n_samples, baseline, extras=None, meta=None)[source]¶
Build a
Periodogram, sorting everything into ascending frequency.- Parameters:
method (str)
backend (str)
frequency (NDArray[float64])
power (NDArray[float64])
objective_sense (Literal['max', 'min'])
n_samples (int)
baseline (float)
extras (Mapping[str, NDArray[float64]] | None)
meta (Mapping[str, Any] | None)
- Return type:
- property size: int¶
Number of grid samples.
- best_periods(n=10, *, min_separation_rayleigh=3.0, alias_diverse=False, harmonic_max=8)[source]¶
Return the
nmost significant peaks.- Parameters:
n (
int, default10) – Maximum number of peaks.min_separation_rayleigh (
float, default3.0) – Minimum peak separation in Rayleigh widths (1/baseline).alias_diverse (
bool, defaultFalse) – If True, skip candidates alias- or harmonic-related to a chosen peak (recommended for box searches).harmonic_max (
int, default8) – Highest harmonic order considered whenalias_diverseis set.
- Returns:
listofPeak– Ranked most-significant first.- Return type:
list[Peak]
- best_period()[source]¶
The single most significant period in days (NaN if none is finite).
- Return type:
float