Functions |
bool | checkTargetDim (MATRIX *f, int Nz) |
void | newTarget (MATRIX f, int N, int Ny, int Nz, BaseDirectory *baseDir, bool debug, bool useFourierTransform) |
MAP_DEPTH_MATRIX * | constructTarget (void(*NormalizeFz)(), void(*Buildup)(int, int, MAP_DEPTH_MATRIX *, FloatComplex *, FloatComplex **)) |
void | writeTarget (Float sigmah, int sigmaStep) |
void | resetTarget (Float sigmah, int sigmaStep) |
MATRIX | readFullTarget (char *inputFilename, MultiDimFits targetInfo, int N, int Ny, int Nz, Float sigmaCurrentValue, Float sigmaCurrentStep, BaseDirectory *baseDir, bool debug, bool useFourierTransform) |
void | readTarget (TargetInfo targetInfo, int N, int Ny, int Nz, Float sigmaCurrentValue, Float sigmaCurrentStep, BaseDirectory *baseDir, bool debug, bool 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
bool checkTargetDim |
( |
MATRIX * |
f, |
|
|
int |
Nz | |
|
) |
| | |
Verify the dimensions of the target function are compatible with the dimensions of the kernels. Oh, but if the inversion is NOT OLA, then only allow (1xNz) ... so don't use this function.
- Parameters:
-
[in,out] | f | 1D function f(z) for target function when z > 1. This parameter is in/out because it is NFz0 x Nz, and if the FITS file is Nz x NFz0, then we can easily take the transpose and still run the inversions. |
[in] | Nz | Size of the z-dimension of the kernels. |
- Returns:
- bool Returns true if dimensions are compatible, false otherwise.
Construct target for multiple depths
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, |
|
|
bool |
debug, |
|
|
bool |
useFourierTransform | |
|
) |
| | |
Set new parameters for Target function.
- Parameters:
-
[in] | f | A MATRIX that contains a 1D function for z-dimension; but it can contain multiple 1D functions, one for each target depth. |
[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. |
MATRIX readFullTarget |
( |
char * |
inputFilename, |
|
|
MultiDimFits |
targetInfo, |
|
|
int |
N, |
|
|
int |
Ny, |
|
|
int |
Nz, |
|
|
Float |
sigmaCurrentValue, |
|
|
Float |
sigmaCurrentStep, |
|
|
BaseDirectory * |
baseDir, |
|
|
bool |
debug, |
|
|
bool |
useFourierTransform | |
|
) |
| | |
readFullTarget Read the full target function from a fits file, not just the depth function, f(z,z0).
- Parameters:
-
[in] | inputFilename | Full path the to fits file containing the target function. |
[in] | targetInfo | Read the two types of input data for a target function. First type is a matrix (Nfz0 x Nz) containing the z-dimension for possibly multiple target depth functions, f(z;z_0). The second type is a complete target function of dimension (Nx x Ny x Nz x Nbeta). Multiple target functions are only for OLA inversions. |
[in] | inputFilename | Character string for name of file containing target function. |
[in] | targetInfo | Internal structure (MultiDimFits) that contains information about an open fits file. |
[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 readTarget |
( |
TargetInfo |
targetInfo, |
|
|
int |
N, |
|
|
int |
Ny, |
|
|
int |
Nz, |
|
|
Float |
sigmaCurrentValue, |
|
|
Float |
sigmaCurrentStep, |
|
|
BaseDirectory * |
baseDir, |
|
|
bool |
debug, |
|
|
bool |
useFourierTransform | |
|
) |
| | |
Read the two types of input data for a target function. First type is a matrix (Nfz0 x Nz) containing the z-dimension for possibly multiple target depth functions, f(z;z_0). The second type is a complete target function of dimension (Nx x Ny x Nz x Nbeta). Multiple target functions are only for OLA inversions.
- Parameters:
-
[in] | targetInfo | Internal structure containing info about the target function. |
[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 |
( |
Float |
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 |
( |
Float |
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. |