Changeset 42078 for trunk/Ohana/src/opihi/cmd.astro/imfit-qgauss.c
- Timestamp:
- Feb 28, 2022, 12:10:28 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.astro/imfit-qgauss.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/imfit-qgauss.c
r39457 r42078 25 25 par[4] = get_variable_default ("SXYg", 0); 26 26 par[5] = get_variable_default ("Zpk", 10000); 27 par[6] = get_variable_default ("Sg", 0.0); 27 par[6] = get_variable_default ("Sg", 0.0); // sky 28 28 par[7] = get_variable_default ("Sr", 1.0); 29 29 fpar[0] = get_variable_default ("Npow", 2.25); … … 40 40 set_variable ("Zpk", par[5]); 41 41 set_variable ("Sg", par[6]); 42 set_variable ("Sr", par[7]);42 set_variable ("Sr", par[7]); 43 43 } 44 44 45 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky, sr */45 /* qgauss: (1 + Sr*z + z^Npow)^(-1) -- x, y, sx, sy, sxy, I, sky, sr */ 46 46 opihi_flt qgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) { 47 47 OHANA_UNUSED_PARAM(Npar); … … 60 60 r = 1.0 / (1 + par[7]*z + pow(z,fpar[0])); 61 61 f = par[5]*r + par[6]; 62 q = par[5]*SQ(r)*(par[7] + fpar[0]*pow(z,(fpar[0]-1)));63 62 64 63 if (dpar != NULL) { 64 q = par[5]*SQ(r)*(par[7] + fpar[0]*pow(z,(fpar[0]-1))); 65 65 dpar[0] = q*(2*px*par[2] + par[4]*Y); 66 66 dpar[1] = q*(2*py*par[3] + par[4]*X); … … 75 75 } 76 76 77 /****************************************************************************** 78 * this file defines the QGAUSS source shape model. Note that these model functions are 79 * loaded by pmModelClass.c using 'include', and thus need no 'include' statements of 80 * their own. The models use a psVector to represent the set of parameters, with the 81 * sequence used to specify the meaning of the parameter. The meaning of the parameters 82 * may thus vary depending on the specifics of the model. All models which are used as a 83 * PSF representations share a few parameters, for which # define names are listed in 84 * pmModel.h: 85 86 power-law with fitted linear term 87 1 / (1 + kz + z^2.25) 88 89 * PM_PAR_SKY 0 - local sky : note that this is unused and may be dropped in the future 90 * PM_PAR_I0 1 - central intensity 91 * PM_PAR_XPOS 2 - X center of object 92 * PM_PAR_YPOS 3 - Y center of object 93 * PM_PAR_SXX 4 - X^2 term of elliptical contour (SigmaX / sqrt(2)) 94 * PM_PAR_SYY 5 - Y^2 term of elliptical contour (SigmaY / sqrt(2)) 95 * PM_PAR_SXY 6 - X*Y term of elliptical contour 96 * PM_PAR_7 7 - amplitude of the linear component (k) 97 *****************************************************************************/
Note:
See TracChangeset
for help on using the changeset viewer.
