Variable density sampling
Variable density sampling: a support-point generator that densifies the sampling in parameter space according to an interest function.
Overview
quatm/utils/vds.py provides variable density sampling (VDS) tools: it generates support points
(sample points) that are randomly distributed and densified in the regions of interest according to a
given interest function, so as to optimise the limited experiment time.
Functions
| Function | Description |
|---|---|
create_support_points_stochastic(start, stop, steps, interest_fn, ...) | Generates randomly distributed support points densified in the ROI |
gauss_prime_norm(x, mu, sigma) | Normalised form of the derivative of a Gaussian function (peak normalised to 1) |
gauss_prime_norm_abs(x, mu, sigma) | Normalised form of the absolute value of the Gaussian derivative |
Usage
from quatm.utils.vds import create_support_points_stochastic
# interest_fn returns a weight (0-1) that determines the sampling density at each position
points = create_support_points_stochastic(
start=0, stop=100, steps=200,
interest_fn=lambda x: gauss_prime_norm_abs(x, mu=50, sigma=10),
)