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

    r31451 r32347  
    229229}
    230230
     231// integrate the model to get the full flux
    231232psF64 PM_MODEL_FLUX (const psVector *params)
    232233{
    233     float norm, z;
     234    float z, norm;
    234235    psEllipseShape shape;
    235236
     
    240241    shape.sxy = PAR[PM_PAR_SXY];
    241242
    242     // Area is equivalent to 2 pi sigma^2
    243243    psEllipseAxes axes = psEllipseShapeToAxes (shape, 20.0);
    244     psF64 Area = 2.0 * M_PI * axes.major * axes.minor;
    245 
    246     // the area needs to be multiplied by the integral of f(z)
     244    float AspectRatio = axes.minor / axes.major;
     245
     246    // flux = 2 \pi \int f(r) r dr
    247247    norm = 0.0;
    248248
    249     # define DZ 0.25
    250 
    251     float f0 = 1.0;
     249    # define DR 0.25
     250
     251    // f = f(r) * r
     252    float f0 = 0.0;
    252253    float f1, f2;
    253     for (z = DZ; z < 150; z += DZ) {
    254         f1 = 1.0 / (1 + z + pow(z, PAR[PM_PAR_7]));
    255         z += DZ;
    256         f2 = 1.0 / (1 + z + pow(z, PAR[PM_PAR_7]));
     254    for (float r = DR; r < 150; r += DR) {
     255        z = 0.5 * PS_SQR(r / axes.major);
     256        f1 = r / (1 + z + pow(z, PAR[PM_PAR_7]));
     257        r += DR;
     258        z = 0.5 * PS_SQR(r / axes.major);
     259        f2 = r / (1 + z + pow(z, PAR[PM_PAR_7]));
    257260        norm += f0 + 4*f1 + f2;
    258261        f0 = f2;
    259262    }
    260     norm *= DZ / 3.0;
    261 
    262     psF64 Flux = PAR[PM_PAR_I0] * Area * norm;
     263    norm *= DR / 3.0;
     264
     265    psF64 Flux = PAR[PM_PAR_I0] * norm * 2.0 * M_PI * AspectRatio;
    263266
    264267    return(Flux);
Note: See TracChangeset for help on using the changeset viewer.