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/pmSourceOutputs.c

    r31451 r32347  
    107107        }
    108108        if (isfinite(PAR[PM_PAR_SXX]) && isfinite(PAR[PM_PAR_SXY]) && isfinite(PAR[PM_PAR_SYY])) {
    109             axes = pmPSF_ModelToAxes (PAR, 20.0);
     109            axes = pmPSF_ModelToAxes (PAR, 20.0, model->type);
    110110            outputs->psfMajor = axes.major;
    111111            outputs->psfMinor = axes.minor;
     
    178178    moments->KronCore    = source->moments ? source->moments->KronCore : NAN;
    179179    moments->KronCoreErr = source->moments ? source->moments->KronCoreErr : NAN;
    180 
    181     return true;
    182 }
     180    moments->KronPSF    = source->moments ? source->moments->KronFluxPSF : NAN;
     181    moments->KronPSFErr = source->moments ? source->moments->KronFluxPSFErr : NAN;
     182
     183    return true;
     184}
     185
     186bool pmSourceLocalAstrometry (psSphere *ptSky, float *posAngle, float *pltScale, pmChip *chip, float xPos, float yPos) {
     187
     188    pmFPA *fpa = chip->parent;
     189
     190    if (!chip->toFPA) goto escape;
     191    if (!fpa->toTPA) goto escape;
     192    if (!fpa->toSky) goto escape;
     193
     194    // generate RA,DEC
     195    psPlane ptCH, ptFP, ptTP_o, ptTP_x, ptTP_y;
     196
     197    // calculate the astrometry for the coordinate of interest
     198    ptCH.x = xPos;
     199    ptCH.y = yPos;
     200    psPlaneTransformApply (&ptFP, chip->toFPA, &ptCH);
     201    psPlaneTransformApply (&ptTP_o, fpa->toTPA, &ptFP);
     202    psDeproject (ptSky, &ptTP_o, fpa->toSky);
     203
     204    // calculate the astrometry for the coordinate + 1pix in X
     205    ptCH.x = xPos + 1.0;
     206    ptCH.y = yPos;
     207    psPlaneTransformApply (&ptFP, chip->toFPA, &ptCH);
     208    psPlaneTransformApply (&ptTP_x, fpa->toTPA, &ptFP);
     209
     210    // calculate the astrometry for the coordinate + 1pix in Y
     211    ptCH.x = xPos;
     212    ptCH.y = yPos + 1.0;
     213    psPlaneTransformApply (&ptFP, chip->toFPA, &ptCH);
     214    psPlaneTransformApply (&ptTP_y, fpa->toTPA, &ptFP);
     215
     216    // the resulting Tangent Plane coordinates are in TP pixels; convert to local Tangent Plane
     217    // degrees
     218
     219    float dTPx_dCHx = fpa->toSky->Xs * (ptTP_x.x - ptTP_o.x);
     220    float dTPy_dCHx = fpa->toSky->Ys * (ptTP_x.y - ptTP_o.y);
     221
     222    float dTPx_dCHy = fpa->toSky->Xs * (ptTP_y.x - ptTP_o.x);
     223    float dTPy_dCHy = fpa->toSky->Ys * (ptTP_y.y - ptTP_o.y);
     224
     225    float pltScale_x = hypot(dTPx_dCHx, dTPy_dCHx);
     226    float pltScale_y = hypot(dTPx_dCHy, dTPy_dCHy);
     227    *pltScale = 0.5*(pltScale_x + pltScale_y);
     228
     229    float posAngle_x = atan2 (+dTPy_dCHx, +dTPx_dCHx);
     230    float posAngle_y = atan2 (-dTPy_dCHy, +dTPx_dCHy);
     231    *posAngle = 0.5*(posAngle_x + posAngle_y);
     232
     233    return true;
     234
     235escape:
     236    // no astrometry calibration, give up
     237    ptSky->r = NAN;
     238    ptSky->d = NAN;
     239    *posAngle = NAN;
     240    *pltScale = NAN;
     241
     242    return false;
     243}
     244
Note: See TracChangeset for help on using the changeset viewer.