bayesmithDocumentation0.10.0 source

bayesmith.cumulants.fourier

Source-derived signatures and contracts. See the reference index for coverage and conventions.

Experimental composition surface. These primitives do not certify evidence, convergence, global density validity or reference-target overlap. Read the experimental guide before use.

Module contract
Optional Fourier constructions. No graph or inference code imports these.

PeriodicNormal

Defined in bayesmith.cumulants.fourier, line 22.

PeriodicNormal(loc, power, *, event_ndim=None, validate_args=None)
Real Gaussian field with a periodic covariance diagonalized by FFT.

``power`` contains covariance eigenvalues on the FULL FFT grid (orthonormal
convention), not an rFFT half-grid or a continuum power spectrum. It must
be real, positive, finite and exactly even under simultaneous mode reversal.
``loc`` and power broadcast; the last ``event_ndim`` axes form one field.
The default makes all axes of loc one event. No global settings change.

PeriodicNormal.support

support(self)

PeriodicNormal.log_prob

log_prob(self, value)

PeriodicNormal.sample

sample(self, key, sample_shape=())

PeriodicNormal.mean

mean(self)

PeriodicNormal.variance

variance(self)
pytree_data_fields = ('loc', 'power')
pytree_aux_fields = ('field_ndim',)

low_rank_from_fourier

Defined in bayesmith.cumulants.fourier, line 108.

low_rank_from_fourier(coefficients, cumulants, *, event_shape)
Build real-coordinate CP cumulants from full-grid Fourier directions.

The trailing axes have ``event_shape``; the preceding axis is CP rank.
Inverts an orthonormal full FFT, keeping the coefficients at each cumulant
order unchanged. This transforms every tensor index through its direction
factors. It is NOT a change of the observed random variable or a general
arbitrary-polyspectrum factorization algorithm.

Reality is checked with a 64-epsilon, amplitude-relative numerical allowance
for FFT roundoff (a practical allowance, not a certified FFT error bound).
Only that roundoff imaginary residue is discarded; complex fields and
unpaired complex modes are rejected, including under JIT.

Type a concept or API name.