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

    r25521 r25563  
    5555static float betaUse[] = { 1000, 3e6, 5, 5, 1.0, 1.0, 0.5, 2.0 };
    5656
     57static bool limitsApply = true;         // Apply limits?
     58
    5759psF32 PM_MODEL_FUNC (psVector *deriv,
    5860                     const psVector *params,
     
    114116bool PM_MODEL_LIMITS (psMinConstraintMode mode, int nParam, float *params, float *beta)
    115117{
     118    if (!limitsApply) {
     119        return true;
     120    }
    116121    psAssert(nParam >= 0 && nParam <= PM_PAR_7, "Parameter index is out of bounds");
    117122
     
    410415}
    411416
     417
    412418void PM_MODEL_SET_LIMITS(pmModelLimitsType type)
    413419{
     
    416422        paramsMinUse = NULL;
    417423        paramsMaxUse = NULL;
     424        limitsApply = true;
     425        break;
     426      case PM_MODEL_LIMITS_IGNORE:
     427        paramsMinUse = NULL;
     428        paramsMaxUse = NULL;
     429        limitsApply = false;
    418430      case PM_MODEL_LIMITS_LAX:
    419431        paramsMinUse = paramsMinLax;
    420432        paramsMaxUse = paramsMaxLax;
     433        limitsApply = true;
    421434        break;
    422435      case PM_MODEL_LIMITS_STRICT:
    423436        paramsMinUse = paramsMinStrict;
    424437        paramsMaxUse = paramsMaxStrict;
     438        limitsApply = true;
    425439        break;
    426440      default:
Note: See TracChangeset for help on using the changeset viewer.