/* FILE: fmodel.c * PURPOSE: Compute the model * AUTHOR: Kenneth J. Mighell (mighell@noao.edu) * LANGUAGE: ANSI C * DATE: 2001SEP10 * COPYRIGHT: (C) 2001 Assoc. of Universities for Research in Astronomy Inc. * * COMMENT: * * MXNPARL=7 * * and * * ad[0] is B0 (=B_0 constant value of background ) * ad[1] is BX (=B_X X slope value of background ) * ad[2] is BY (=B_Y Y slope value of background ) * ad[3] is S0 (=I_0 intensity of 2-d Gaussian ) * ad[4] is SX (=X_0 X coordinate of 2-d Gaussian ) * ad[5] is SY (=Y_0 Y coordiante of 2-d Gaussian ) * ad[6] is SS (=SIGMA_0 standard deviation of 2-d Gaussian ) * * where * * Z = B_0 + + (X*B_X) + (Y*B_Y) + I_0*Gaussian( X, Y; X_0, Y_0, SIGMA_0) * * is a Gaussian centered at (X_0,Y_0) on a tilted background * */ #include "mx.h" #include "inc.h" int fmodel_i7( double **matrix, double **psfmatrix, double **xmatrix, double **ymatrix, int nx, int ny, double ad[] ){ int status, xi, yi; const int res=5; double xd, yd, psfd, md, b0, bx, by, s0; s0 = ad[3]; b0 = ad[0]; bx = ad[1]; by = ad[2]; for (yi=0; yi