IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 24, 2009, 4:02:05 PM (17 years ago)
Author:
Paul Price
Message:

Adding option to ignore limits. PM_MODEL_LIMITS_NONE allows catching application of limits when none is desired. PM_MODEL_LIMITS_IGNORE ignores all application of limits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/psModules/src/objects/models/pmModel_PGAUSS.c

    r25521 r25563  
    5050static float *paramsMaxUse = NULL;
    5151static float betaUse[] = { 1000, 3e6, 5, 5, 2.0, 2.0, 0.5 };
     52
     53static bool limitsApply = true;         // Apply limits?
    5254
    5355// the model is a function of the pixel coordinate (pixcoord[0,1] = x,y)
     
    9294bool PM_MODEL_LIMITS (psMinConstraintMode mode, int nParam, float *params, float *beta)
    9395{
     96    if (!limitsApply) {
     97        return true;
     98    }
    9499    psAssert(nParam >= 0 && nParam <= PM_PAR_7, "Parameter index is out of bounds");
    95100
     
    403408}
    404409
     410
    405411void PM_MODEL_SET_LIMITS(pmModelLimitsType type)
    406412{
     
    409415        paramsMinUse = NULL;
    410416        paramsMaxUse = NULL;
     417        limitsApply = true;
     418        break;
     419      case PM_MODEL_LIMITS_IGNORE:
     420        paramsMinUse = NULL;
     421        paramsMaxUse = NULL;
     422        limitsApply = false;
    411423      case PM_MODEL_LIMITS_LAX:
    412424        paramsMinUse = paramsMinLax;
    413425        paramsMaxUse = paramsMaxLax;
     426        limitsApply = true;
    414427        break;
    415428      case PM_MODEL_LIMITS_STRICT:
    416429        paramsMinUse = paramsMinStrict;
    417430        paramsMaxUse = paramsMaxStrict;
     431        limitsApply = true;
    418432        break;
    419433      default:
Note: See TracChangeset for help on using the changeset viewer.