Software Structure

The main data types in the inversion code are MATRIX, MAP_DEPTH_MATRIX, Model, and BaseDirectory. Only three dimensional problems use MAP_DEPTH_MATRIX. All inversions use MATRIX, Model, and BaseDirectory.

MATRIX

MATRIX is a structure that contains 2D data as either double or double complex numbers.

MAP_DEPTH_MATRIX

MAP_DEPTH_MATRIX is a four-dimensional matrix and it keeps input and output data. This is a main data type for the 2D and 3D problems. The input kernel data, input map data, solution data, averaging kernel data and covariance data are all kept in a MAP_DEPTH_MATRIX object. During the inversion, pointers to 2D sub-matrices are passed around and accumulated to make full solutions. Map-depth data are kept in contiguous memory in order to make the inversion run faster. This is done at the expense of data in the xy-plane. Since input and output to FITS files use the xy-plane, the expense is incurred during I/O which is inherently slow. Input files are read only once while the inversion calculations are performed many times.

Model

The Model data type represents a solution to an inversion. Solutions at each (kx,ky) accumulate into full solutions. If the problem is 1D, then there is only one kx and one ky. If the problem is 2D or 3D, then the code aggregates solutions at each (kx,ky) into a full model. When a model is complete, all the results are written to FITS files.

BaseDirectory

The BaseDirectory structure is a single instance and it manages the string manipulations needed to generate the various output file names.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines