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_GAUSS.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)
     
    9193bool PM_MODEL_LIMITS (psMinConstraintMode mode, int nParam, float *params, float *beta)
    9294{
     95    if (!limitsApply) {
     96        return true;
     97    }
    9398    psAssert(nParam >= 0 && nParam <= PM_PAR_7, "Parameter index is out of bounds");
    9499
     
    362367        paramsMinUse = NULL;
    363368        paramsMaxUse = NULL;
     369        limitsApply = true;
     370        break;
     371      case PM_MODEL_LIMITS_IGNORE:
     372        paramsMinUse = NULL;
     373        paramsMaxUse = NULL;
     374        limitsApply = false;
    364375      case PM_MODEL_LIMITS_LAX:
    365376        paramsMinUse = paramsMinLax;
    366377        paramsMaxUse = paramsMaxLax;
     378        limitsApply = true;
    367379        break;
    368380      case PM_MODEL_LIMITS_STRICT:
    369381        paramsMinUse = paramsMinStrict;
    370382        paramsMaxUse = paramsMaxStrict;
     383        limitsApply = true;
    371384        break;
    372385      default:
Note: See TracChangeset for help on using the changeset viewer.