IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 25, 2013, 12:08:56 PM (13 years ago)
Author:
eugene
Message:

convert SERSIC to use pmModelCP_SersicSubpix; clean up DEV and EXP versions; add pmPCMMakeModel, pmSersicKappa, pmSersicNorm functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130711/psModules/src/objects/models/pmModel_EXP.c

    r35966 r36021  
    7979static float *paramsMinUse = paramsMinLax;
    8080static float *paramsMaxUse = paramsMaxLax;
    81 static float betaUse[] = { 1000, 3e6, 5, 5, 1.0, 1.0, 0.5};
     81static float betaUse[] = { 2, 3e6, 5, 5, 10.0, 10.0, 0.5};
    8282
    8383static bool limitsApply = true;         // Apply limits?
     
    115115    psF32 f0 = exp(-q);
    116116
    117     psF32 f1 = PAR[PM_PAR_I0]*f0;
    118     psF32 f = PAR[PM_PAR_SKY] + f1;
    119 
    120117    assert (isfinite(q));
    121     assert (isfinite(f0));
    122     assert (isfinite(f1));
    123     assert (isfinite(f));
    124118
    125119    // only worry about the central 4 pixels at most
     
    127121    if (radius <= 1.5) {
    128122        f0 = pmModelCP_SersicSubpix (X, Y, PAR[PM_PAR_SXX], PAR[PM_PAR_SXY], PAR[PM_PAR_SYY], 1.0, 51);
    129         f1 = PAR[PM_PAR_I0]*f0;
    130         f = PAR[PM_PAR_SKY] + f1;
    131     }
     123    }
     124    assert (isfinite(f0));
     125
     126    psF32 f1 = PAR[PM_PAR_I0]*f0;
     127    psF32 f = PAR[PM_PAR_SKY] + f1;
     128
     129    assert (isfinite(f1));
     130    assert (isfinite(f));
    132131
    133132    if (deriv != NULL) {
     
    298297    // f = Io exp(-kappa*sqrt(z)) -> sqrt(z) = ln(Io/f) / kappa
    299298    psF64 zn = log(PAR[PM_PAR_I0] / flux) / kappa;
    300     psF64 radius = axes.major * sqrt (2.0) * zn;
     299    psF64 radius = axes.major * zn;
    301300
    302301    psAssert (isfinite(radius), "fix this code: radius should not be nan for Io = %f, flux = %f, major = %f (%f, %f, %f)",
Note: See TracChangeset for help on using the changeset viewer.