IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21466


Ignore:
Timestamp:
Feb 13, 2009, 11:47:42 AM (17 years ago)
Author:
Paul Price
Message:

Adding function psImageCovarianceTransfer to transfer the covariance factor (central value of covariance pseudo-matrix) from the covariance pseudo-matrix to the variance map. This allows the variance map to accurately reflect the true variance, without needing to apply the covariance factor.

Location:
trunk/psLib/src/imageops
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageCovariance.c

    r21383 r21466  
    221221    return trunc;
    222222}
     223
     224
     225bool psImageCovarianceTransfer(psImage *variance, psKernel *covar)
     226{
     227    PS_ASSERT_IMAGE_NON_NULL(variance, NULL);
     228    PS_ASSERT_KERNEL_NON_NULL(covar, NULL);
     229
     230    float factor = psImageCovarianceFactor(covar); // Factor to transfer
     231    psBinaryOp(variance, variance, "*", psScalarAlloc(factor, PS_TYPE_F32));
     232    psBinaryOp(covar->image, covar->image, "/", psScalarAlloc(factor, PS_TYPE_F32));
     233
     234    return true;
     235}
  • trunk/psLib/src/imageops/psImageCovariance.h

    r21316 r21466  
    55 * @author Paul Price, IfA
    66 *
    7  * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    8  * @date $Date: 2009-02-05 20:15:32 $
     7 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     8 * @date $Date: 2009-02-13 21:47:42 $
    99 * Copyright 2009 Institute for Astronomy, University of Hawaii
    1010 */
     
    5959    );
    6060
     61/// Transfer covariance factor from covariance pseudo-matrix to variance map
     62bool psImageCovarianceTransfer(
     63    psImage *variance,                  ///< Variance map to which to transfer
     64    psKernel *covar                     ///< Covariance pseudo-matrix from which to transfer
     65    );
     66
     67
    6168/// @}
    6269#endif // #ifndef PS_IMAGE_COVARIANCE_H
Note: See TracChangeset for help on using the changeset viewer.