Skip to content
Oakfield Operator Calculus Function Reference Site

Oakfield API Documentation

Oakfield exposes a composable operator calculus through Lua. A script creates a simulation context, adds fields and operators, assigns an integrator, then advances time. All APIs documented here are verified against the current source.

Oakfield ships 69 built-in operators across 10 categories. Click any operator name to jump directly to its documentation.

Coupling

Field–field mixing and gating. Full reference →

OperatorDescriptionFunction
MaskGate a field by a mask with optional soft featheringadd_mask_operator
MixerBlend two fields: linear, AM/FM/PM, ring-mod, feedback, and moreadd_mixer_operator
Metal Mix experimentalMetal-safe mixer subset with linear and crossfade modesadd_metal_mix_operator

Measurement

Extract observables and derived quantities from fields. Full reference →

OperatorDescriptionFunction
Phase FeatureExtract instantaneous frequency, phase, envelope, and coherenceadd_phase_feature_operator
Minimal ConvolutionCompact FIR convolution with symmetric or asymmetric kernelsadd_minimal_convolution_operator
SieveThreshold-based conditional field gating and reductionadd_sieve_operator
Sound Observation experimentalAcoustic field monitoradd_sound_observation_operator

Noise

Stochastic perturbations and noise injection. Several operators use add_stimulus_operator with a type key — see the Function column. Full reference →

OperatorDescriptionFunction
Stochastic NoiseAdditive white noise drawn from a uniform or normal distributionadd_stochastic_noise_operator
Ornstein-UhlenbeckMean-reverting stochastic dynamics for real or complex fieldsadd_ornstein_uhlenbeck_operator
Random FourierSpectral noise via random-phase Fourier modesadd_stimulus_operator "stimulus_random_fourier"
White NoiseFlat-spectrum white noise injectionadd_stimulus_operator "stimulus_white_noise"
Spectral ShellsBand-limited noise confined to annular spectral shellsadd_stimulus_operator "stimulus_spectral_shells"
Fractional Brownian MotionCorrelated noise with configurable Hurst exponentadd_stimulus_operator "stimulus_fbm"
Worley NoiseCellular noise from nearest-feature distancesadd_stimulus_operator "stimulus_worley_noise"
TurbulenceBillowy fractal cascade with centered absolute-value octavesadd_stimulus_operator "stimulus_turbulence"
MultifractalMultiplicative cascade noise with octave-to-octave couplingadd_stimulus_operator "stimulus_multifractal"
Hybrid fBmHybrid fractal Brownian motion with bounded cascade weightsadd_stimulus_operator "stimulus_hybrid_fbm"
Ridged NoiseRidged multifractal noise for crest-like structuresadd_stimulus_operator "stimulus_ridged_noise"

Stimulus

External driving and spatial pattern generation. Most operators use add_stimulus_operator with a type key — see the Function column. Full reference →

OperatorDescriptionFunction
SineTraveling or standing sinusoidal plane waveadd_stimulus_operator "stimulus_sine"
Standing WaveTwo counter-propagating sine waves forming a standing patternadd_stimulus_operator "stimulus_standing_wave"
ChirpFrequency-swept sinusoid (linear or exponential)add_stimulus_operator "stimulus_chirp"
Gaussian PulseSpatiotemporal Gaussian envelopeadd_stimulus_operator "stimulus_gaussian_pulse"
Heat KernelDiffusing Gaussian heat packet with optional mass preservationadd_stimulus_operator "stimulus_heat_kernel"
Spectral LinesSuperposition of sinusoids at specified frequenciesadd_stimulus_operator "stimulus_spectral_lines"
Fourier WaveformArbitrary waveform synthesized from Fourier coefficientsadd_stimulus_operator "stimulus_fourier_waveform"
Checkerboard2D spatial checkerboard patternadd_stimulus_operator "stimulus_checkerboard"
LissajousGaussian ridge pattern around coupled sinusoidal tracesadd_stimulus_operator "stimulus_lissajous"
Gabor KernelLocalized sinusoid in a Gaussian envelope (oriented)add_stimulus_operator "stimulus_gabor_kernel"
Digamma SquareDeformable digamma waveform with optional field-driven warp mixadd_digamma_square_operator
MoiréInterference pattern from overlapping spatial gridsadd_stimulus_operator "stimulus_moire"
Log-Polar experimentalRings-and-spokes pattern built from log-radius and angleadd_stimulus_operator "stimulus_log_polar"
Positional EncodingMulti-scale sinusoidal position encoding (transformer-style)add_stimulus_operator "stimulus_positional_encoding"
Log Spectral GridLogarithmically spaced spectral grid stimulusadd_stimulus_operator "stimulus_log_spectral_grid"
Morlet Wavelet Field2D Morlet wavelet spatial patternadd_stimulus_operator "stimulus_morlet_wavelet"
Steerable WaveletOrientation-steerable wavelet basis functionadd_stimulus_operator "stimulus_steerable_wavelet"
Optical VortexPhase-singular beam with topological chargeadd_stimulus_operator "stimulus_optical_vortex"
Bessel BeamCylindrical Bessel beam with configurable orderadd_stimulus_operator "stimulus_bessel_beam"
Airy BeamFinite-energy Airy beam with apodized lobesadd_stimulus_operator "stimulus_airy_beam"
Hermite-Gaussian BeamSeparable transverse beam modes in a Gaussian envelopeadd_stimulus_operator "stimulus_hermite_gaussian_beam"
ChladniNodal-line plate pattern from vibrating rectangular modesadd_stimulus_operator "stimulus_chladni"
Wave ModesFixed-boundary standing modes of the wave equationadd_stimulus_operator "stimulus_wave_modes"
Traveling Wave PacketGaussian-envelope packet with drifting carrieradd_stimulus_operator "stimulus_traveling_wave_packet"
Cylindrical Wave EmitterRegularized cylindrical wave radiating from a moving sourceadd_stimulus_operator "stimulus_cylindrical_wave_emitter"
Laplace-BeltramiAnalytic eigenmodes on rectangles, cylinders, and flat toriadd_stimulus_operator "stimulus_laplace_beltrami"
Zone PlateFresnel-style quadratic radial phase plateadd_stimulus_operator "stimulus_zone_plate"
RD SeedReaction-diffusion seed pattern initializeradd_stimulus_operator "stimulus_rd_seed"

Reaction

Local nonlinear reaction terms. Full reference →

OperatorDescriptionFunction
RemainderPointwise modulo (remainder) of field valuesadd_remainder_operator

Thermostat

Energy regulation and power control. Full reference →

OperatorDescriptionFunction
ThermostatRescale field energy toward a target RMS or total poweradd_thermostat_operator

Advection

Spatial warps, analytic deformations, and finite-difference derivatives. Full reference →

OperatorDescriptionFunction
Analytic WarpNonlinear field deformation using special function profiles (digamma, tanh, power, …)add_analytic_warp_operator
Spatial DerivativeFirst-order ∂u/∂x or ∂u/∂y via finite difference stencilsadd_spatial_derivative_operator
GradientFull 2D gradient (∂u/∂x, ∂u/∂y) to separate output fieldsadd_gradient_operator
DivergenceScalar divergence ∂vx/∂x + ∂vy/∂y from vector componentsadd_divergence_operator
CurlScalar 2D curl ∂vy/∂x - ∂vx/∂y from vector componentsadd_curl_operator

Diffusion & Dissipation

Laplacian, spectral dissipation, and fractional operators. Full reference →

OperatorDescriptionFunction
Linear DissipativeExponential decay with optional frequency-dependent dampingadd_linear_dissipative_operator
Linear Spectral FusionSpectral-domain weighted blend and dissipationadd_linear_spectral_fusion_operator
DispersionFrequency-dependent phase velocity (dispersive propagation)add_dispersion_operator
Fractional MemoryLong-range temporal memory via fractional integrationadd_fractional_memory_operator
LaplacianStandard and fractional Laplacian (hyper-diffusion)add_laplacian_operator

Nonlinear

Pointwise nonlinear operations and discrete chaotic maps. Full reference →

OperatorDescriptionFunction
Elementwise MathDiscrete math: floor, fract, mod, step, comparisons, conditional selectadd_elementwise_math_operator
Complex MathComplex arithmetic, transcendentals, and component extractionadd_complex_math_operator
Chaos MapDiscrete chaotic maps: standard (Chirikov), Ikeda, exponentialadd_chaos_map_operator
HystereticStateful hysteresis: Schmitt trigger, play model, Bouc-Wenadd_hysteretic_operator
Neural Infer experimentalInference-only learned operator with explicit execution contractadd_neural_infer_operator
Neural Hybrid experimentalAnalytic baseline plus learned residual correctionadd_neural_hybrid_operator

Utility

Field manipulation, routing, and coordinate generation. Full reference →

OperatorDescriptionFunction
CoordinateWrite index or spatial coordinates into a field (axis, radial, angle, separable)add_coordinate_operator
Phase RotateApply a uniform complex rotation at a given angular rateadd_phase_rotate_operator
CopyCopy one field to another, with optional accumulationadd_copy_operator
ScaleMultiply field samples by a constant factoradd_scale_operator
Zero FieldZero all samples in a fieldadd_zero_field_operator

Custom Operators

Extend Oakfield with your own Lua-implemented operators registered into the simulation plan. Full reference →