IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5129


Ignore:
Timestamp:
Sep 25, 2005, 9:25:59 PM (21 years ago)
Author:
eugene
Message:

moved exponent to #define

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/models/pmModel_QGAUSS.c

    r4977 r5129  
    1515*****************************************************************************/
    1616
     17/* XXX EAM : we need a way to have user-set values for fix parameters */
     18# define QG_S1  2.5
     19# define dQG_S1 1.5
     20/* dQG_S1 is QG_S1 - 1.0 */
     21
    1722psF32 pmModelFunc_QGAUSS(psVector *deriv,
    1823                         const psVector *params,
     
    2732    psF32 z  = 0.5*PS_SQR(px) + 0.5*PS_SQR(py) + PAR[6]*X*Y;
    2833
    29     psF32 r  = 1.0 / (1 + PAR[7]*z + pow(z, 2.25));
     34    psF32 r  = 1.0 / (1 + PAR[7]*z + pow(z, QG_S1));
    3035    psF32 f  = PAR[1]*r + PAR[0];
    3136
     
    3338        // note difference from a pure gaussian: q = params->data.F32[1]*r
    3439        psF32 t = PAR[1]*r*r;
    35         psF32 q = t*(PAR[7] + 2.25*pow(z, 1.25));
     40        psF32 q = t*(PAR[7] + QG_S1*pow(z, dQG_S1));
    3641
    3742        deriv->data.F32[0] = +1.0;
     
    115120    norm = 0.0;
    116121    for (z = 0.005; z < 50; z += 0.01) {
    117         f = 1.0 / (1 + PAR[7]*z + pow(z, 2.25));
     122        f = 1.0 / (1 + PAR[7]*z + pow(z, QG_S1));
    118123        norm += f;
    119124    }
     
    143148    // we can do this much better with intelligent choices here
    144149    for (z = 0.0; z < 20.0; z += dz) {
    145         f = 1.0 / (1 + PAR[7]*z + pow(z, 2.25));
     150        f = 1.0 / (1 + PAR[7]*z + pow(z, QG_S1));
    146151        if (f < limit) break;
    147152    }
Note: See TracChangeset for help on using the changeset viewer.