Changeset 21368 for trunk/pswarp/src/pswarpTransformReadout.c
- Timestamp:
- Feb 5, 2009, 5:10:36 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpTransformReadout.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpTransformReadout.c
r21323 r21368 6 6 * 7 7 * @author IfA 8 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2009-02-0 5 20:44:04$8 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-06 03:10:36 $ 10 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 11 */ … … 41 41 psAssert(mdok, "MASK.INPUT was not defined"); 42 42 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 44 48 if (!mdok) { 45 49 nThreads = 0; … … 85 89 // Interpolation options : move these from the arguments to explicit assignments 86 90 psImageInterpolation *interp = psImageInterpolationAlloc(interpolationMode, input->image, 87 input-> weight, input->mask, maskIn,91 input->variance, input->mask, maskIn, 88 92 NAN, NAN, maskBad, maskPoor, poorFrac, 89 93 numKernels); 90 94 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); 94 98 } 95 99 if ((input->mask || maskPoor || maskBad) && !output->mask) { … … 135 139 psThreadJob *job = NULL; 136 140 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 } 138 149 while ((job = psThreadJobGetDone()) != NULL) { 139 150 if (job->args->n < 1) { … … 147 158 yMin = PS_MIN(args->yMin, yMin); 148 159 yMax = PS_MAX(args->yMax, yMax); 160 if (args->covariance) { 161 psListAdd(covariances, PS_LIST_TAIL, args->covariance); 162 } 149 163 } 150 164 psFree(job);
Note:
See TracChangeset
for help on using the changeset viewer.
