IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2022, 10:39:31 AM (4 years ago)
Author:
eugene
Message:

the model guess was using Mrf (1st radial moment) to set the ellipse
major axis size, but this value is often much too large. The
motivation to use Mrf was largely driven (if I remember correctly) by
the Mxx,Myy values sometimes being much too small for faint objects
(even negative). I decided that the Kron radius was more reliable at
the small / faint end.

I have now gone back to using (Mxx, Myy) to define the guess size, but
putting in two modifications. First, the major axis now has a lower
bound of 1.0 pixel. This avoids crazy small values. Second, the
major axis is calculated as the value predicted from Mxx scaled by
some factor. This is set to a value which is model dependent.

Note that the Mxx,Myy values are calculated with a Gaussian window, so
they are normally too small even for a Gaussian. Also, depending o
the model form, there is naturally a bias between the Mxx,Myy values
and the model major axis: only for Gaussians should they be exactly
the same.

Ideally, I should run some simulation to compare the measured Mxx,Myy
with the true major axis value as a function of model class, seeing,
etc. for now I just have some guesses.

Location:
branches/eam_branches/ipp-20211108/psModules/src/objects
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20211108/psModules/src/objects/models/pmModel_GAUSS.c

    r36857 r42012  
    203203
    204204    // set the shape parameters
    205     if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false)) {
     205    // the last parameter is the scaling factor for Moments to shape parameter radius guess
     206    if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false, 1.0)) {
    206207      return false;
    207208    }
  • branches/eam_branches/ipp-20211108/psModules/src/objects/models/pmModel_HSC_V1.c

    r40491 r42012  
    223223
    224224    // set the shape parameters
    225     if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false)) {
     225    // the last parameter is the scaling factor for Moments to shape parameter radius guess
     226    if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false, 1.0)) {
    226227      return false;
    227228    }
  • branches/eam_branches/ipp-20211108/psModules/src/objects/models/pmModel_PGAUSS.c

    r36857 r42012  
    204204
    205205    // set the shape parameters
    206     if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false)) {
     206    // the last parameter is the scaling factor for Moments to shape parameter radius guess
     207    if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false, 1.0)) {
    207208      return false;
    208209    }
  • branches/eam_branches/ipp-20211108/psModules/src/objects/models/pmModel_PS1_V1.c

    r38280 r42012  
    223223
    224224    // set the shape parameters
    225     if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false)) {
     225    // the last parameter is the scaling factor for Moments to shape parameter radius guess
     226    if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false, 1.0)) {
    226227      return false;
    227228    }
  • branches/eam_branches/ipp-20211108/psModules/src/objects/models/pmModel_QGAUSS.c

    r38280 r42012  
    224224
    225225    // set the shape parameters
    226     if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false)) {
     226    // the last parameter is the scaling factor for Moments to shape parameter radius guess
     227    if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false, 1.5)) {
    227228      return false;
    228229    }
  • branches/eam_branches/ipp-20211108/psModules/src/objects/models/pmModel_RGAUSS.c

    r36857 r42012  
    213213
    214214    // set the shape parameters
    215     if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false)) {
     215    // the last parameter is the scaling factor for Moments to shape parameter radius guess
     216    if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false, 2.0)) {
    216217      return false;
    217218    }
  • branches/eam_branches/ipp-20211108/psModules/src/objects/pmModelUtils.c

    r36859 r42012  
    179179// Reff says if this is a model which uses R_eff (like exp or dev) instead of Sigma
    180180// set the parameter values SXX, SXY, SYY
    181 bool pmModelSetShape (float *Sxx, float *Sxy, float *Syy, pmMoments *moments, bool useReff) {
     181// Scale allows some models to increase the guess size relative to Mxx,Myy
     182bool pmModelSetShape (float *Sxx, float *Sxy, float *Syy, pmMoments *moments, bool useReff, float Scale) {
    182183
    183184    psEllipseMoments emoments;
     
    190191
    191192    if (!isfinite(axes.major)) return false;
    192     if (axes.major == 0) return false;
    193193    if (!isfinite(axes.minor)) return false;
    194194    if (!isfinite(axes.theta)) return false;
    195     if (axes.major == 0) return false;
    196 
     195
     196    // set a lower limit to avoid absurd solutions..
     197    // NOTE: I should set the lower limit based on the PSF size, if known
     198    float Rmajor = PS_MAX(1.0, Scale * axes.major);
     199    float Rminor = Rmajor * (axes.minor / axes.major);
     200    axes.major = Rmajor;
     201    axes.minor = Rminor;
     202
     203    // EAM 2022.02.05 : Mrf is often much too large, disable this for now
    197204    // Mxx, Mxy, Myy define the elliptical shape, but Mrf defines the width
    198     float scale = (isfinite(moments->Mrf) && (moments->Mrf > 0.0)) ? moments->Mrf / axes.major : 1.0;
    199     axes.major *= scale;
    200     axes.minor *= scale;
     205    // float scale = (isfinite(moments->Mrf) && (moments->Mrf > 0.0)) ? moments->Mrf / axes.major : 1.0;
     206    // axes.major *= scale;
     207    // axes.minor *= scale;
    201208
    202209    pmModelAxesToParams (Sxx, Sxy, Syy, axes, useReff);
  • branches/eam_branches/ipp-20211108/psModules/src/objects/pmModelUtils.h

    r35768 r42012  
    4444bool pmModelSetPosition (float *Xo, float *Yo, pmSource *source);
    4545bool pmModelSetNorm (float *Io, pmSource *source);
    46 bool pmModelSetShape (float *Sxx, float *Sxy, float *Syy, pmMoments *moments, bool useReff);
     46bool pmModelSetShape (float *Sxx, float *Sxy, float *Syy, pmMoments *moments, bool useReff, float Scale);
    4747
    4848bool pmModelUseReff (pmModelType type);
Note: See TracChangeset for help on using the changeset viewer.