Functions |
BOOLEAN | checkTargetDim (MATRIX *f, int Nz) |
void | newTarget (MATRIX f, int N, int Ny, int Nz, BaseDirectory *baseDir, BOOLEAN debug, BOOLEAN useFourierTransform) |
MAP_DEPTH_MATRIX * | constructTarget () |
void | writeTarget (double sigmah, int sigmaStep) |
void | resetTarget (double sigmah, int sigmaStep) |
void | readTarget (char *inputFilename, int N, int Ny, int Nz, double sigmaCurrentValue, double sigmaCurrentStep, BaseDirectory *baseDir, BOOLEAN debug, BOOLEAN useFourierTransform) |
MAP_DEPTH_MATRIX * | getTarget () |
void | freeTarget () |
Detailed Description
The target function is implemented as a 2-D Gaussian in x and y, multiplied by a a 1-D function of z. The 1-D function is an input parameter. The Gaussian has an input parameter, sigma_h, which specifies the horizontal full-width at half-maximum (FWHM) of the function.
The target function is precalculated for x, y and z values, then Fourier transformed.
Function Documentation
BOOLEAN checkTargetDim |
( |
MATRIX * |
f, |
|
|
int |
Nz | |
|
) |
| | |
Verify the dimensions of the target function are compatible with the dimensions of the kernels.
- Parameters:
-
[in,out] | f | 1D function f(z) for target function when z > 1. This parameter is in/out because it is Zx1, and if the FITS file is 1xZ, then we can easily take the transpose and still run the inversions. |
[in] | Nz | Size of the z-dimension of the kernels. |
- Returns:
- BOOLEAN Returns TRUE if dimensions are compatible, false otherwise.
Construct Target function from preset parameters (Gaussian keeps sigma_h, Target_f should already be set to f(z;z0) using newTarget() function).
- Returns:
- Target function stored in a 4-D MAP_DEPTH_MATRIX in wavespace.
Free space associated with target function.
Returns a pointer to target function represented by a Map-Depth matrix.
- Returns:
- Pointer to MAP_DEPTH_MATRIX representing the generated target function.
void newTarget |
( |
MATRIX |
f, |
|
|
int |
N, |
|
|
int |
Ny, |
|
|
int |
Nz, |
|
|
BaseDirectory * |
baseDir, |
|
|
BOOLEAN |
debug, |
|
|
BOOLEAN |
useFourierTransform | |
|
) |
| | |
Set new parameters for Target function.
- Parameters:
-
[in] | f | A MATRIX that contains a 1D function for z-dimension; |
[in] | N | X-dimension of target function in frequency space. |
[in] | Ny | Y-dimension in frequency space if useFourierTransform is true; different than Nx because of Fourier Transform; otherwise, Y-dimension in real space. |
[in] | Nz | Z-dimension. |
[in] | baseDir | Output base directory. |
[in] | debug | True if running with debug flag; False otherwise. |
[in] | useFourierTransform | True if transforming target function to wavespace; False otherwise. Multiply 2D Gaussian by this function to get 3D Target function. |
void readTarget |
( |
char * |
inputFilename, |
|
|
int |
N, |
|
|
int |
Ny, |
|
|
int |
Nz, |
|
|
double |
sigmaCurrentValue, |
|
|
double |
sigmaCurrentStep, |
|
|
BaseDirectory * |
baseDir, |
|
|
BOOLEAN |
debug, |
|
|
BOOLEAN |
useFourierTransform | |
|
) |
| | |
Read the two types of input data for a target function. First type is a matrix (Nz x 1) containing the z-dimension for the target function. The second type is a complete target function of dimension (Nx x Ny x Nz x Nbeta).
- Parameters:
-
[in] | inputFilename | pointer to target file name. |
[in] | N | Size of Nx dimension of kernels |
[in] | Ny | Size of Ny dimension of kernels |
[in] | Nz | Size of Nz dimension of kernels |
[in] | sigmaCurrentValue | Current value of sigma_h parameter (FWHM). |
[in] | sigmaCurrentStep | sigmaStep The nth sigma step in the parameter range. |
[in] | baseDir | pointer to BaseDirectory containing the base directory for all output from the inversion. |
[in] | debug | When set to TRUE, intermediate values are written to output directory. |
[in] | useFourierTransform | TRUE if Fourier transforming the target function on input. |
void resetTarget |
( |
double |
sigmah, |
|
|
int |
sigmaStep | |
|
) |
| | |
Change the target function by recalculating with sigmah.
- Parameters:
-
[in] | sigmah | Full-width at half maximum of function. |
[in] | sigmaStep | The nth sigma step in the parameter range. |
void writeTarget |
( |
double |
sigmah, |
|
|
int |
sigmaStep | |
|
) |
| | |
Write target function to output FITS file. Note: the output filename is assumed to be set using newTarget.
- Parameters:
-
[in] | sigmah | Current value for sigmah parameter, where sigmah is the full-width at half-maximum (FWHM) of the Gaussian. |
[in] | sigmaStep | The nth parameter value for sigmah. |