Functions

src/forward/forwardMain.c File Reference

Functions

BOOLEAN DimensionsOkFwd (MAP_DEPTH_MATRIX K, MAP_DEPTH_MATRIX b, MAP_DEPTH_MATRIX A, MATRIX Theta, BOOLEAN useFourierTransform)
void ForwardCalc (InversionData *inversionData)
void setSeed (BaseDirectory *outputBaseDir, const LambdaSet *lambdaSet)
InversionDataForwardInit (InputParms inputParms, char *commandLineOutputDir, BOOLEAN debug)
void ForwardAddNoise (InversionData *inversionData)
void ForwardComplete (InversionData *inversionData)
void ForwardDestroy (InversionData *inversionData)
BOOLEAN ForwardMoreParameterSteps (InversionData *inversionData)
void ForwardNextParameter (InversionData *inversionData)
int run (InputParms inputParms, char *commandLineOutputDir, BOOLEAN debug)

Function Documentation

BOOLEAN DimensionsOkFwd ( MAP_DEPTH_MATRIX  K,
MAP_DEPTH_MATRIX  b,
MAP_DEPTH_MATRIX  A,
MATRIX  Theta,
BOOLEAN  useFourierTransform 
)

Check dimensions of matrices before performing calculations

Parameters:
[in] K kernel matrix
[in] b model matrix
[in] A noise amplitude matrix
[in] Theta dz matrix
[in] useFourierTransform True if matrices are in frequency domain.
Returns:
True if dimensions are ok, false otherwise.
void ForwardAddNoise ( InversionData inversionData  ) 

Add noise to maps and stuff them into dTilde in the output model. Setup the output files with the parameter steps. Record parameter values in model and inversion data structure.

Parameters:
[in,out] inversionData Pointer to InversionData structure, which contains all input data, temporary data, parameters and result data.
void ForwardCalc ( InversionData inversionData  ) 

Perform forward calculation using the input matrices and intermediate matrices. NOTE: Kernels must already have overlap matrix applied. Put the noise free maps (dTilda) in intermediate values, so they may be reused when adding noise.

Parameters:
[in,out] inversionData Pointer to structure containing all inversion data.
void ForwardComplete ( InversionData inversionData  ) 

Complete forward calculation by writing d~ matrix.

Parameters:
[in] inversionData Pointer to data: K 4D-matrix containing Kernel data in wavespace. b 4D-matrix containing model data, b, in wavespace. d~ 4D-matrix containing estimate of travel-time map, in wavespace. baseDir BaseDirectory structure which manages the output filenames. debug Boolean flag: true if writing intermediate matrix values during inversion.
void ForwardDestroy ( InversionData inversionData  ) 

Free memory after forward calculation is complete.

Parameters:
[in,out] inversionData Pointer to InversionData structure.
InversionData* ForwardInit ( InputParms  inputParms,
char *  commandLineOutputDir,
BOOLEAN  debug 
)

Fill InversionData structure with data from input file. Read kernels, model, and noise level parameter

Parameters:
[in] inputParms InputParms structure filled with filenames, directories and parameters extracted from input file.
[in] commandLineOutputDir character string with new output directory specified on command line.
[in] debug Boolean flag for writing intermediate matrix values.
Returns:
InversionData structure filled with input data.
BOOLEAN ForwardMoreParameterSteps ( InversionData inversionData  ) 
void ForwardNextParameter ( InversionData inversionData  ) 
int run ( InputParms  inputParms,
char *  commandLineOutputDir,
BOOLEAN  debug 
)

Performs OLA inversions on 2D, 3D scalar and 3D vector data.

Parameters:
[in] inputParms InputParms structure which contains input file names, directories, and parameters for the inversion.
[in] commandLineOutputDir Character string to override the output base directory specified in the input file. This parameter is used to create successive versions of the output base directory.
[in] debug Boolean flag signaling the output of intermediate matrix values.
Returns:
0 for success and 1 for error.
void setSeed ( BaseDirectory outputBaseDir,
const LambdaSet lambdaSet 
)

Set random generator seed from input file if possible, otherwise, use the system time. Write the seed to an output file

Parameters:
[in] outputBaseDir The BaseDirectory for all output files.
[in] lambdaSet The random seed comes from the input parameter file as the minimum value in a LambdaSet.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines