IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 5:10:36 PM (17 years ago)
Author:
Paul Price
Message:

Merging pap_branch_20090128. Resolved a small number of conflicts. Compiles, but not tested in detail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpTransformReadout.c

    r21323 r21368  
    66 *
    77 *  @author IfA
    8  *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2009-02-05 20:44:04 $
     8 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-06 03:10:36 $
    1010 *  Copyright 2009 Institute for Astronomy, University of Hawaii
    1111 */
     
    4141    psAssert(mdok, "MASK.INPUT was not defined");
    4242
    43     int nThreads = psMetadataLookupS32(&mdok, config->arguments, "NTHREADS"); ///< Number of threads
     43    if (!input->covariance) {
     44        input->covariance = psImageCovarianceNone();
     45    }
     46
     47    int nThreads = psMetadataLookupS32(&mdok, config->arguments, "NTHREADS"); // Number of threads
    4448    if (!mdok) {
    4549        nThreads = 0;
     
    8589    // Interpolation options : move these from the arguments to explicit assignments
    8690    psImageInterpolation *interp = psImageInterpolationAlloc(interpolationMode, input->image,
    87                                                              input->weight, input->mask, maskIn,
     91                                                             input->variance, input->mask, maskIn,
    8892                                                             NAN, NAN, maskBad, maskPoor, poorFrac,
    8993                                                             numKernels);
    9094
    91     if (input->weight && !output->weight) {
    92         output->weight = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_F32);
    93         psImageInit(output->weight, NAN);
     95    if (input->variance && !output->variance) {
     96        output->variance = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_F32);
     97        psImageInit(output->variance, NAN);
    9498    }
    9599    if ((input->mask || maskPoor || maskBad) && !output->mask) {
     
    135139    psThreadJob *job = NULL;
    136140    int xMin = output->image->numCols, xMax = 0, yMin = output->image->numRows, yMax = 0; // Bounds
    137     int goodPixels = 0;                 ///< total number of good pixels across all tiles
     141    int goodPixels = 0;                 // total number of good pixels across all tiles
     142    psList *covariances = psMetadataLookupPtr(&mdok, output->analysis,
     143                                              PSWARP_ANALYSIS_COVARIANCES); // Collection of covar. matrices
     144    if (!covariances) {
     145        covariances = psListAlloc(NULL);
     146        psMetadataAddList(output->analysis, PS_LIST_TAIL, PSWARP_ANALYSIS_COVARIANCES, 0,
     147                          "Collection of covariance matrices", covariances);
     148    }
    138149    while ((job = psThreadJobGetDone()) != NULL) {
    139150        if (job->args->n < 1) {
     
    147158            yMin = PS_MIN(args->yMin, yMin);
    148159            yMax = PS_MAX(args->yMax, yMax);
     160            if (args->covariance) {
     161                psListAdd(covariances, PS_LIST_TAIL, args->covariance);
     162            }
    149163        }
    150164        psFree(job);
Note: See TracChangeset for help on using the changeset viewer.