Synthetic: Gwyddion Library Reference Manual

## Synthetic Synthetic — Synthetic data generation |

## Functions

void | gwy_field_synth_gaussian_displacement ()

## Includes

    #include <libgwyddion/gwyddion.h>

## Description

## Functions

### gwy_field_synth_gaussian_displacement()

    void
    gwy_field_synth_gaussian_displacement (GwyField *field,
                                           gdouble sigma,
                                           gdouble tau,
                                           GRand *rng);

Fills a data field with correlated Gaussian noise, suitable as displacement field.

The number of calls to `rng` is unspecified; it will not be left in any defined state. However, the noise is filled from the data field centre. Meaning that changing `tau` will zoom in or out the Gaussian noise, preserving the centr (whereas changing `sigma` simply changes the amplitude).

#### Parameters

field | A data field. |
sigma | Amplitude of displacement (in units of 1, usually meaning pixels). |
tau | Lateral scale of displacement variation (in pixels). |
rng | Random number generator. |