Changeset 27933 for branches/pap/pswarp/src/pswarpTransformReadout.c
- Timestamp:
- May 12, 2010, 12:56:07 PM (16 years ago)
- File:
-
- 1 edited
-
branches/pap/pswarp/src/pswarpTransformReadout.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/pswarp/src/pswarpTransformReadout.c
r27096 r27933 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.
