The Flutter Shutter Code Optimizer
 All Files Functions Macros Pages
Macros | Functions
flutter_optimiser_gaussian.cpp File Reference

Routines for flutter shutter code optimization, gaussian model. The functions in this file implement equation (17). More...

#include <math.h>
#include "flutter_optimiser_gaussian.h"
Include dependency graph for flutter_optimiser_gaussian.cpp:

Go to the source code of this file.

Macros

#define eps   0.001
 
#define ABS(x)   (((x) > 0) ? (x) : (-(x)))
 
#define M_PI   3.14159265358979323846
 

Functions

void gaussian_optimiser (double *code, double sigma, int code_length, double deltat)
 Computes the a_k coefficients of the code; gaussian motion model. More...
 
double gaussian_integrand (double sigma, double deltat, double xi, int k)
 Function to integrate in order to compute the a_k coefficient of the code; gaussian motion model. This is the integrand in equation (17): {[4]{{}^{4{ N}} ({{-v^2}{2{ N}^2}}) {{1}_{[-|v|,|v| ]} ({}{ t} )}{|v|} dv} (k) } {{{sinc}({}{2 })}} (Recall that: sinc(x):={( x)}{ x}.) More...
 
double gaussian_w (double sigma, double xi)
 Computes the W() function; gaussian motion model. This is equation (15): W():={}^{4{ N}} ({{-v^2}{2{ N}^2}}) {{1}_{[-|v|,|v| ]}()}{|v|} dv. More...
 
double gaussian_w_integrand (double velocity, double sigma, double xi)
 Function to integrate in velocity to get the W function; gaussian motion model. This is the integrand in equation (13): ({{-v^2}{2{ N}^2}}) {{1}_{[-|v|,|v| ]}()}{|v|}. More...
 

Detailed Description

Routines for flutter shutter code optimization, gaussian model. The functions in this file implement equation (17).

Author
Yohann Tendero tende.nosp@m.ro@m.nosp@m.ath.u.nosp@m.cla..nosp@m.edu

Definition in file flutter_optimiser_gaussian.cpp.

Macro Definition Documentation

#define ABS (   x)    (((x) > 0) ? (x) : (-(x)))

absolute value definition.

Definition at line 39 of file flutter_optimiser_gaussian.cpp.

#define eps   0.001

epsilon definition.

Definition at line 33 of file flutter_optimiser_gaussian.cpp.

#define M_PI   3.14159265358979323846

M_PI is a POSIX definition for Pi

Definition at line 47 of file flutter_optimiser_gaussian.cpp.

Function Documentation

gaussian_integrand ( double  sigma,
double  deltat,
double  xi,
int  k 
)

Function to integrate in order to compute the a_k coefficient of the code; gaussian motion model. This is the integrand in equation (17): {[4]{{}^{4{ N}} ({{-v^2}{2{ N}^2}}) {{1}_{[-|v|,|v| ]} ({}{ t} )}{|v|} dv} (k) } {{{sinc}({}{2 })}} (Recall that: sinc(x):={( x)}{ x}.)

Parameters
doubles : motion model parameter (sdt-dev here);
doubledeltat : the temporal sampling of the flutter shutter function;
doublexi : frequency;
intk : the k-th coefficient of the code;
Returns
double.

Definition at line 156 of file flutter_optimiser_gaussian.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

gaussian_optimiser ( double *  code,
double  s,
int  code_length,
double  deltat 
)

Computes the a_k coefficients of the code; gaussian motion model.

Functions for the gaussian case :

Parameters
double*code : array of doubles where code[k] contains the This function implements equation (17): = {0}^{4{ N} t } {[4]{{}^{4{ N}} ({{-v^2}{2{ N}^2}}) {{1}_{[-|v|,|v| ]} ({}{ t} )}{|v|} dv} (k)} {{{sinc}({}{2 })}}d. (Recall that: sinc(x):={( x)}{ x}.)
doublesigma : motion model parameter (sdt-dev here);
intcode_length : length of the code L;
doubledeltat : double deltat : the temporal sampling of the flutter shutter function;
Returns
void.

This function calls "gaussian_integrand" with the approriate parameters : k, deltat, velocity_{max}, etc.

Main loop for the computation of a_k (code coefficient)

Initalization for integral evaluation

init so the first iteration of the main loop is always done.

Main loop for the integral evaluation

Definition at line 75 of file flutter_optimiser_gaussian.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

gaussian_w ( double  sigma,
double  xi 
)

Computes the W() function; gaussian motion model. This is equation (15): W():={}^{4{ N}} ({{-v^2}{2{ N}^2}}) {{1}_{[-|v|,|v| ]}()}{|v|} dv.

Parameters
doublesigma : motion model parameter (sdt-dev here);
doublexi : frequency;
Returns
double W().

init so the first iteration of the main loop is always done.

Definition at line 198 of file flutter_optimiser_gaussian.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

gaussian_w_integrand ( double  velocity,
double  sigma,
double  xi 
)

Function to integrate in velocity to get the W function; gaussian motion model. This is the integrand in equation (13): ({{-v^2}{2{ N}^2}}) {{1}_{[-|v|,|v| ]}()}{|v|}.

Parameters
doublevelocity : velocity;
doubles : motion model parameter (sdt-dev here);
doublexi : frequency;
Returns
double {exp(-velocity*velocity/(2*s*s)) {1]{[-M_PI*velocity,M_PI*velocity]}(velocity) }{|velocity s|}.

Notice that the normalization is

not required since the code is defined up to a constant multiplication. See also the integrand of (13) and remark 2, page 8.

Definition at line 258 of file flutter_optimiser_gaussian.cpp.

Here is the caller graph for this function: