Oakfield API Documentation 1.0.0
Numerical core APIs
Loading...
Searching...
No Matches
gabor.h File Reference

Gabor kernel stimulus (Gaussian-windowed sinusoid) for 1D/2D fields. More...

#include "coords.h"
#include "oakfield/operator_split.h"
#include <stdbool.h>
#include <stddef.h>
Include dependency graph for gabor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SimStimulusGaborConfig
 Configuration for a Gaussian-windowed Gabor kernel stimulus. More...
 

Typedefs

typedef struct SimStimulusGaborConfig SimStimulusGaborConfig
 Configuration for a Gaussian-windowed Gabor kernel stimulus.
 

Functions

SimResult sim_add_stimulus_gabor_operator (struct SimContext *context, const SimStimulusGaborConfig *config, size_t *out_index)
 Register a Gaussian-windowed Gabor stimulus operator.
 
SimResult sim_stimulus_gabor_config (struct SimContext *context, size_t operator_index, SimStimulusGaborConfig *out_config)
 Copy the current Gabor configuration from a registered operator.
 
SimResult sim_stimulus_gabor_update (struct SimContext *context, size_t operator_index, const SimStimulusGaborConfig *config)
 Replace or renormalize a registered Gabor stimulus configuration.
 

Detailed Description

Gabor kernel stimulus (Gaussian-windowed sinusoid) for 1D/2D fields.

Supports real and complex fields. For complex fields, the kernel is written with an additional global phase rotation.

Function Documentation

◆ sim_add_stimulus_gabor_operator()

SimResult sim_add_stimulus_gabor_operator ( struct SimContext context,
const SimStimulusGaborConfig config,
size_t *  out_index 
)

Register a Gaussian-windowed Gabor stimulus operator.

The implementation copies and normalizes config, prepares envelope storage, and registers the operator on the configured target field.

Parameters
contextSimulation context that will own the operator.
configOptional Gabor configuration; NULL selects normalized defaults.
[out]out_indexOptional destination for the registered operator index.
Returns
SIM_RESULT_OK on success, or an error code from validation, allocation, buffer setup, or split-operator registration.

◆ sim_stimulus_gabor_config()

SimResult sim_stimulus_gabor_config ( struct SimContext context,
size_t  operator_index,
SimStimulusGaborConfig out_config 
)

Copy the current Gabor configuration from a registered operator.

Parameters
contextSimulation context containing the operator.
operator_indexIndex returned by sim_add_stimulus_gabor_operator().
[out]out_configReceives the operator's normalized configuration.
Returns
SIM_RESULT_OK on success, SIM_RESULT_INVALID_ARGUMENT for NULL pointers, SIM_RESULT_NOT_FOUND for a missing operator, or SIM_RESULT_INVALID_STATE when the operator has no stimulus state.

◆ sim_stimulus_gabor_update()

SimResult sim_stimulus_gabor_update ( struct SimContext context,
size_t  operator_index,
const SimStimulusGaborConfig config 
)

Replace or renormalize a registered Gabor stimulus configuration.

Passing NULL for config keeps the existing configuration and reapplies normalization. A successful update refreshes envelope and symbolic state, then invalidates the scheduler plan.

Parameters
contextSimulation context containing the operator.
operator_indexIndex of the Gabor operator to update.
configOptional replacement configuration.
Returns
SIM_RESULT_OK on success, or an error code if lookup, buffer setup, or state validation fails.