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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.