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

    r25521 r25563  
    5252static float betaUse[] = { 1000, 3e6, 5, 5, 1.0, 1.0, 0.5 };
    5353
     54static bool limitsApply = true;         // Apply limits?
     55
    5456psF32 PM_MODEL_FUNC (psVector *deriv,
    5557                     const psVector *params,
     
    105107bool PM_MODEL_LIMITS (psMinConstraintMode mode, int nParam, float *params, float *beta)
    106108{
     109    if (!limitsApply) {
     110        return true;
     111    }
    107112    psAssert(nParam >= 0 && nParam <= PM_PAR_7, "Parameter index is out of bounds");
    108113
     
    424429}
    425430
     431
    426432void PM_MODEL_SET_LIMITS(pmModelLimitsType type)
    427433{
     
    430436        paramsMinUse = NULL;
    431437        paramsMaxUse = NULL;
     438        limitsApply = true;
     439        break;
     440      case PM_MODEL_LIMITS_IGNORE:
     441        paramsMinUse = NULL;
     442        paramsMaxUse = NULL;
     443        limitsApply = false;
    432444      case PM_MODEL_LIMITS_LAX:
    433445        paramsMinUse = paramsMinLax;
    434446        paramsMaxUse = paramsMaxLax;
     447        limitsApply = true;
    435448        break;
    436449      case PM_MODEL_LIMITS_STRICT:
    437450        paramsMinUse = paramsMinStrict;
    438451        paramsMaxUse = paramsMaxStrict;
     452        limitsApply = true;
    439453        break;
    440454      default:
Note: See TracChangeset for help on using the changeset viewer.