point_spectrum — ONED signal op

• Data kinds: positions → table

• Call: import fullseye as fs; fs.ledger.point_spectrum(positions, extent=None, n_freq=2048, f_max=None, method='direct', weights=None, bins_per_period=8) (implementation को सीधे call करना हो तो import dsp; dsp.point_spectrum(positions, extent=None, n_freq=2048, f_max=None, method='direct', weights=None, bins_per_period=8), registry से लेना हो तो ops1d.get("point_spectrum"))

उपयोग

event की position का periodogram — defect, impact, count, arrival।

> नीचे का विस्तृत विवरण मूल text में है — सारांश और headings का अनुवाद हो चुका है।

spectrum needs an evenly sampled signal, but a great deal of industrial data arrives as a *list of positions*: where each defect was on the web, when each particle was counted, at what angle each dent sits. The usual workaround is to histogram the positions and FFT the histogram, which works but hides two choices — bin width and record length — that decide the answer. This operator makes both explicit and returns them.

*method* picks the estimator:

"direct"

the point-process (Bartlett) periodogram

|sum_j w_j exp(-2 pi i f x_j) - rate * integral|^2 / sum_j w_j,

evaluated at each requested frequency. No binning at all, so no bin

width to choose and no aliasing from one. The subtracted term is the

contribution a *uniform* process of the same rate would make; without it

every spectrum peaks at f -> 0 simply because events exist.

"binned"

histogram the positions, then rfft, with the bin width set so the

finest frequency asked for still gets bins_per_period samples per

cycle. Cheaper for very many events, and the result is what a

histogram-and-FFT pipeline would have produced.

The frequency resolution is a property of the record, not of the method. Two periods closer than 1/extent apart cannot be told apart by either estimator, and the returned dict says so in resolution: read it before reading a peak, not after.

A periodic train of events is a comb, not a line. Its harmonics at k/period are as tall as the fundamental, so argmax of this spectrum routinely returns period/k rather than the period. Measured on 93 events (43 spaced 471.24 apart with 1.5 of jitter, plus 50 uniformly random) over a record of 20000: the global maximum lands on 58.90 with direct (the 8th harmonic) and 52.35 with binned (the 9th), while the fundamental is present and prominent in both — direct puts 0.947 of the maximum power at 1/471.24, binned 0.379. Take the lowest frequency whose first few harmonics *all* stand, rather than the tallest line — see examples/poc_web_roll_periodicity.py, which is what this operator was added for.

Returns a dict: freq (cycles per unit of *positions*), power, resolution (1/extent), extent, n_events, method, and bin_width (None for "direct").

Fail-closed: fewer than two events raises ValueError — a periodogram of one point is not a weak measurement, it is not a measurement.

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• poc_web_roll_periodicity — py -3.11 examples/poc_web_roll_periodicity.py

वे अगले ops जिनसे type जुड़ता है (table को input के रूप में लेते हैं)

—

इसी category के (signal)

lowpass · highpass · bandpass · envelope · rms · local_std · quantize · companding_mu_law


*Provenance: dsp.py — ONED operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.