mart

esis.data.inversion.moses_mart.sampling_issue.moses.mart(DataArr, mArr, Nlambda, j0, maxiter=40, AntiAlias=True, Verbose=True, InitGuess=None, maxouter=1, Filter=None, Maximize=None, LGOF=False)

MART: NEW VERSION WITH OPTIONAL LOCALIZED GOF (LGOF)

Multiplicative Algebraic Reconstruction Technique, using MOSES-style projections into an arbitrary number of spectral orders. Infinite order is not (yet?) supported, but an initial guess based on the infinite order can be used.

When used without the maxouter, Filter, or Maximize keywords, this is the simplest possible MART. Up to maxiter multiplicative corrections are performed. The loop exits when the reduced “chi square” drops below unity. I say “chi square” in quotes because DoFs are not counted honestly (how do you do that when the inversion has more degress of freedom than the data?). If we reach maxiter iterations without convergence of chisquare, an error is thrown.

The maxouter and Filter keywords are designed to allow iterative filtering in an outer loop (“outeration”) that encloses the MART iterations described above. Before each run of MART, the guess is put through the specified Filter function. The maxouter value gives the maximum number of outerations.

The Maximize keyword adds a convergence criterion to the outer loop. Supply the name of some figure of merit, perhaps a “norm,” of the guess. The concept here is that the Filter drives the “norm” to increase until its maximum is reached. If the value of “norm” is seen to decrease, this is interpreted as having reached the maximum, and we terminate the outerations.

Arguments: DataArr = (Nx,Nm) array of data in Nm projections. mArr = (Nm) array of integer spectral orders. Nlambda = integer number of wavelength pixels in the inversion. j0 = index of the nominal line center wavelength. This column of the spectrum

will not be shifted when projecting in the forward model (see fomod).

Keywords: maxiter = maximum number of (inner) multiplicative inverse iterations allowed to

get the reduced “chi square” down below unity.

AntiAlias = if true, then antialias filtering is done on the nonzero spectral

orders. Recommended for numerical stability, and to prevent the nonintersection anomaly which can sometimes cause horrible aliasing and unusually bad plaid artifacts.

InitGuess = initial guess (by default, a flat initial guess is used). This is

useful either for handing off a guess from a previous inversion effort or for other preconditioning of the inversion result.

maxouter = maximum number of outer loop iterations (“outerations”). Filter = filter function for iterative filtering of the guess. Maximize = criterion (“norm”) function for evaluating the guess and judging

convergence of the outerations.