objfun_prf

msaexp.utils.objfun_prf(params, waves, sci2d, wht2d, ycenter, sigma, bkg_offset, bkg_parity, fit_type, ret, verbose)[source]

Objective function for fitting the 2D profile

Parameters
paramsarray_like

The parameters for the fit

wavesarray_like

The wavelength values.

sci2darray_like

The 2D science data.

wht2darray_like

The 2D weight data.

ycenterfloat

The y-coordinate of the center of the profile.

sigmafloat

The standard deviation of the profile.

bkg_offsetfloat

The background offset, pixels.

bkg_parityint

Parity of the nod offsets, multiplied to bkg_offset

fit_typeint

Fit behavior

retint

Control fit outputs for either fitting or returning the model given params

Returns
normfloat

The normalization factor. (ret == 1)

modelarray_like

The model profile. (ret == 1)

chiarray_like

The chi values. (ret == 2)

chi2float

The chi-squared value. (ret == 3)