IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 3, 2021, 11:06:56 AM (5 years ago)
Author:
eugene
Message:

limit max value of variance to 9e7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20211108/psModules/src/imcombine/pmStack.c

    r41957 r41958  
    17561756              int P75 = 0.75*nGoodClip + Nlo;
    17571757              float rawSigma = 0.74*(pixelData->data.F32[P75] - pixelData->data.F32[P25]);
    1758               varValue = PS_SQR(rawSigma) / (float) nGoodClip; // sigma_mean = sigma_meas / sqrt(Nmeas) -> var_mean = var_meas / Nmeas
     1758              varValue = PS_MIN(9e7, PS_SQR(rawSigma) / (float) nGoodClip); // sigma_mean = sigma_meas / sqrt(Nmeas) -> var_mean = var_meas / Nmeas
     1759              // XXX the upper limit of 9e7 is set to match the output
     1760              // format (STK_UNIONS) which can only represent values up to that limit.
     1761              // perhaps it would be better to saturate the output image in psFits
     1762              // rather than here. 
    17591763            }
    17601764
Note: See TracChangeset for help on using the changeset viewer.