IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2011, 1:02:53 PM (15 years ago)
Author:
eugene
Message:
  • add concept of saddlePoints to peaks (not actually used in the end)
  • add tmp flags to mark sources for analysis or not in psphotStack
  • autocode the pmSourceIO_CMF_PS1_* functions
  • use 1D gauss approx for convolution in PCM fitting
  • added pmSourceExtFitPars (not actually used)
  • in model guess, use 1st radial moments to define size (if it exists)
  • include PSF_INST_MAG, AP_MAG, KRON_MAG in xfit output
  • fix the position for extended source fits (avoid instability)
  • Sersic-like models (incl. Exp and Dev) use Reff, not sigma; conversion tools need to respect this
  • only use a single pass on the centroid (unwindowed, but limited to 1.5 sigma radius) - this avoids moving the centroid because of nearby neighbors
  • use symmetrical averaging (geometric mean) to calculated 1st radial moment (and avoid neighbor biases), do not use symm. averaging for the flux
  • fix the integration of the sersic, pgauss, and related model functions.
  • fix the central pixel to have the full flux for sersic-like models (interpolated value)
Location:
trunk/psModules/src/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects

    • Property svn:ignore
      •  

        old new  
        55*.la
        66*.lo
         7pmSourceIO_CMF_PS1_V1.c
         8pmSourceIO_CMF_PS1_V2.c
         9pmSourceIO_CMF_PS1_V3.c
  • trunk/psModules/src/objects/models/pmModel_PGAUSS.c

    r31451 r32347  
    217217}
    218218
    219 psF64 PM_MODEL_FLUX(const psVector *params)
    220 {
    221     float norm, z;
     219// integrate the model to get the full flux
     220psF64 PM_MODEL_FLUX (const psVector *params)
     221{
     222    float z, norm;
    222223    psEllipseShape shape;
    223224
     
    228229    shape.sxy = PAR[PM_PAR_SXY];
    229230
    230     // Area is equivalent to 2 pi sigma^2
    231231    psEllipseAxes axes = psEllipseShapeToAxes (shape, 20.0);
    232     psF64 Area = 2.0 * M_PI * axes.major * axes.minor;
    233 
    234     // the area needs to be multiplied by the integral of f(z)
     232    float AspectRatio = axes.minor / axes.major;
     233
     234    // flux = 2 \pi \int f(r) r dr
    235235    norm = 0.0;
    236236
    237     # define DZ 0.25
    238 
    239     float f0 = 1.0;
     237    # define DR 0.25
     238
     239    // f = f(r) * r
     240    float f0 = 0.0;
    240241    float f1, f2;
    241     for (z = DZ; z < 150; z += DZ) {
    242         f1 = 1.0 / (1 + z + z*z/2.0 + z*z*z/6.0);
    243         z += DZ;
    244         f2 = 1.0 / (1 + z + z*z/2.0 + z*z*z/6.0);
     242    for (float r = DR; r < 150; r += DR) {
     243        z = 0.5 * PS_SQR(r / axes.major);
     244        f1 = r / (1 + z + z*z/2.0 + z*z*z/6.0);
     245        r += DR;
     246        z = 0.5 * PS_SQR(r / axes.major);
     247        f2 = r / (1 + z + z*z/2.0 + z*z*z/6.0);
    245248        norm += f0 + 4*f1 + f2;
    246249        f0 = f2;
    247250    }
    248     norm *= DZ / 3.0;
    249 
    250     psF64 Flux = PAR[PM_PAR_I0] * Area * norm;
     251    norm *= DR / 3.0;
     252
     253    psF64 Flux = PAR[PM_PAR_I0] * norm * 2.0 * M_PI * AspectRatio;
    251254
    252255    return(Flux);
Note: See TracChangeset for help on using the changeset viewer.