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_PS1_V1.c

    r31670 r32347  
    1414   * PM_PAR_XPOS 2  - X center of object
    1515   * PM_PAR_YPOS 3  - Y center of object
    16    * PM_PAR_SXX 4   - X^2 term of elliptical contour (sqrt(2) / SigmaX)
    17    * PM_PAR_SYY 5   - Y^2 term of elliptical contour (sqrt(2) / SigmaY)
     16   * PM_PAR_SXX 4   - X^2 term of elliptical contour (SigmaX / sqrt(2))
     17   * PM_PAR_SYY 5   - Y^2 term of elliptical contour (SigmaY / sqrt(2))
    1818   * PM_PAR_SXY 6   - X*Y term of elliptical contour
    1919   * PM_PAR_7   7   - amplitude of the linear component (k)
     
    239239}
    240240
     241// integrate the model to get the full flux
    241242psF64 PM_MODEL_FLUX (const psVector *params)
    242243{
     
    250251    shape.sxy = PAR[PM_PAR_SXY];
    251252
    252     // Area is equivalent to 2 pi sigma^2
    253253    psEllipseAxes axes = psEllipseShapeToAxes (shape, 20.0);
    254     psF64 Area = 2.0 * M_PI * axes.major * axes.minor;
    255 
    256     // the area needs to be multiplied by the integral of f(z)
     254    float AspectRatio = axes.minor / axes.major;
     255
     256    // flux = 2 \pi \int f(r) r dr
    257257    norm = 0.0;
    258258
    259     # define DZ 0.25
    260 
    261     float f0 = 1.0;
     259    # define DR 0.25
     260
     261    // f = f(r) * r
     262    float f0 = 0.0;
    262263    float f1, f2;
    263     for (z = DZ; z < 150; z += DZ) {
    264         f1 = 1.0 / (1 + PAR[PM_PAR_7]*z + pow(z, ALPHA));
    265         z += DZ;
    266         f2 = 1.0 / (1 + PAR[PM_PAR_7]*z + pow(z, ALPHA));
     264    for (float r = DR; r < 150; r += DR) {
     265        z = 0.5 * PS_SQR(r / axes.major);
     266        f1 = r / (1 + PAR[PM_PAR_7]*z + pow(z, ALPHA));
     267        r += DR;
     268        z = 0.5 * PS_SQR(r / axes.major);
     269        f2 = r / (1 + PAR[PM_PAR_7]*z + pow(z, ALPHA));
    267270        norm += f0 + 4*f1 + f2;
    268271        f0 = f2;
    269272    }
    270     norm *= DZ / 3.0;
    271 
    272     psF64 Flux = PAR[PM_PAR_I0] * Area * norm;
     273    norm *= DR / 3.0;
     274
     275    psF64 Flux = PAR[PM_PAR_I0] * norm * 2.0 * M_PI * AspectRatio;
    273276
    274277    return(Flux);
Note: See TracChangeset for help on using the changeset viewer.