Changeset 28006 for trunk/pswarp/src/pswarpTransformReadout.c
- Timestamp:
- May 18, 2010, 2:34:09 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pswarp/src/pswarpTransformReadout.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/pap (added) merged: 27707-27709,27726-27727,27732-27733,27787,27791-27792,27933,28003-28005 /branches/pap_delete removed
- Property svn:mergeinfo changed
-
trunk/pswarp/src/pswarpTransformReadout.c
r27096 r28006 148 148 psThreadJob *job = NULL; 149 149 int xMin = output->image->numCols, xMax = 0, yMin = output->image->numRows, yMax = 0; // Bounds 150 int goodPixels = 0; // total number of good pixels across all tiles150 int goodPixels = psMetadataLookupS32(&mdok, output->analysis, PSWARP_ANALYSIS_GOODPIX); // Number of pixels 151 151 psList *covariances = psMetadataLookupPtr(&mdok, output->analysis, 152 152 PSWARP_ANALYSIS_COVARIANCES); // Collection of covar. matrices … … 157 157 psFree(covariances); // Drop reference; still have the copy on the analysis metadata 158 158 } 159 double jacobian = psMetadataLookupF64(&mdok, output->analysis, PSWARP_ANALYSIS_JACOBIAN); // Jacobian 160 if (!isfinite(jacobian)) { 161 jacobian = 0.0; 162 } 163 159 164 while ((job = psThreadJobGetDone()) != NULL) { 160 165 if (job->args->n < 1) { … … 171 176 psListAdd(covariances, PS_LIST_TAIL, args->covariance); 172 177 } 178 if (args->goodPixels > 0 && isfinite(args->jacobian)) { 179 jacobian += args->jacobian * args->goodPixels; 180 } 173 181 } 174 182 psFree(job); 175 183 } 176 184 psFree(grid); 185 186 psMetadataAddS32(output->analysis, PS_LIST_TAIL, PSWARP_ANALYSIS_GOODPIX, PS_META_REPLACE, 187 "Number of good pixels", goodPixels); 188 psMetadataAddF64(output->analysis, PS_LIST_TAIL, PSWARP_ANALYSIS_JACOBIAN, PS_META_REPLACE, 189 "Jacobian of transformation", jacobian); 177 190 178 191 if (xMin < xMax && yMin < yMax) {
Note:
See TracChangeset
for help on using the changeset viewer.
