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

    r25521 r25563  
    5656static float betaUse[] = { 1000, 3e6, 5, 5, 1.0, 1.0, 0.5, 2.0 };
    5757
     58static bool limitsApply = true;         // Apply limits?
     59
    5860
    5961psF32 PM_MODEL_FUNC (psVector *deriv,
     
    109111bool PM_MODEL_LIMITS (psMinConstraintMode mode, int nParam, float *params, float *beta)
    110112{
     113    if (!limitsApply) {
     114        return true;
     115    }
    111116    psAssert(nParam >= 0 && nParam <= PM_PAR_7, "Parameter index is out of bounds");
    112117
     
    436441        paramsMinUse = NULL;
    437442        paramsMaxUse = NULL;
     443        limitsApply = true;
     444        break;
     445      case PM_MODEL_LIMITS_IGNORE:
     446        paramsMinUse = NULL;
     447        paramsMaxUse = NULL;
     448        limitsApply = false;
    438449      case PM_MODEL_LIMITS_LAX:
    439450        paramsMinUse = paramsMinLax;
    440451        paramsMaxUse = paramsMaxLax;
     452        limitsApply = true;
    441453        break;
    442454      case PM_MODEL_LIMITS_STRICT:
    443455        paramsMinUse = paramsMinStrict;
    444456        paramsMaxUse = paramsMaxStrict;
     457        limitsApply = true;
    445458        break;
    446459      default:
Note: See TracChangeset for help on using the changeset viewer.