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

    r25521 r25563  
    5252static float betaUse[] = { 1000, 3e6, 5, 5, 0.5, 0.5, 0.5, 0.5 };
    5353
     54static bool limitsApply = true;         // Apply limits?
     55
    5456psF32 PM_MODEL_FUNC (psVector *deriv,
    5557                     const psVector *params,
     
    99101bool PM_MODEL_LIMITS (psMinConstraintMode mode, int nParam, float *params, float *beta)
    100102{
     103    if (!limitsApply) {
     104        return true;
     105    }
    101106    psAssert(nParam >= 0 && nParam <= PM_PAR_7, "Parameter index is out of bounds");
    102107
     
    417422}
    418423
     424
    419425void PM_MODEL_SET_LIMITS(pmModelLimitsType type)
    420426{
     
    423429        paramsMinUse = NULL;
    424430        paramsMaxUse = NULL;
     431        limitsApply = true;
     432        break;
     433      case PM_MODEL_LIMITS_IGNORE:
     434        paramsMinUse = NULL;
     435        paramsMaxUse = NULL;
     436        limitsApply = false;
    425437      case PM_MODEL_LIMITS_LAX:
    426438        paramsMinUse = paramsMinLax;
    427439        paramsMaxUse = paramsMaxLax;
     440        limitsApply = true;
    428441        break;
    429442      case PM_MODEL_LIMITS_STRICT:
    430443        paramsMinUse = paramsMinStrict;
    431444        paramsMaxUse = paramsMaxStrict;
     445        limitsApply = true;
    432446        break;
    433447      default:
Note: See TracChangeset for help on using the changeset viewer.