- Timestamp:
- Mar 8, 2009, 4:29:34 PM (17 years ago)
- Location:
- branches/eam_branches/eam_branch_20090303
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppStack/src/ppStackLoop.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/eam_branch_20090303
-
branches/eam_branches/eam_branch_20090303/ppStack/src/ppStackLoop.c
r22730 r23225 257 257 pmPSF *targetPSF = NULL; // Target PSF 258 258 float sumExposure = NAN; // Sum of exposure times 259 psVector *inputMask = psVectorAlloc(num, PS_TYPE_VECTOR_MASK); // Mask for inputs 260 psVectorInit(inputMask, 0); 259 261 if (psMetadataLookupBool(NULL, config->arguments, "HAVE.PSF")) { 260 262 pmFPAfileActivate(config->files, false, NULL); … … 283 285 psFree(fileIter); 284 286 psFree(psfs); 287 psFree(inputMask); 285 288 return false; 286 289 } … … 299 302 psFree(fileIter); 300 303 psFree(psfs); 304 psFree(inputMask); 301 305 return false; 302 306 } … … 324 328 psFree(sourceLists); 325 329 psFree(targetPSF); 326 return false; 330 psFree(inputMask); 331 return false; 327 332 } 328 333 … … 333 338 psFree(sourceLists); 334 339 psFree(targetPSF); 340 psFree(inputMask); 335 341 return false; 336 342 } … … 340 346 psFree(sourceLists); 341 347 psFree(targetPSF); 348 psFree(inputMask); 342 349 return false; 343 350 } … … 351 358 352 359 // Zero point calibration 353 sumExposure = ppStackSourcesTransparency(sourceLists, view, config);360 sumExposure = ppStackSourcesTransparency(sourceLists, inputMask, view, config); 354 361 if (!isfinite(sumExposure) || sumExposure <= 0) { 355 362 psError(PS_ERR_UNKNOWN, false, "Unable to calculate transparency differences"); 356 363 psFree(sourceLists); 357 364 psFree(targetPSF); 365 psFree(inputMask); 358 366 return false; 359 367 } 360 368 361 369 // Generate target PSF 362 targetPSF = ppStackPSF(config, numCols, numRows, psfs );370 targetPSF = ppStackPSF(config, numCols, numRows, psfs, inputMask); 363 371 psFree(psfs); 364 372 if (!targetPSF) { … … 366 374 psFree(sourceLists); 367 375 psFree(view); 376 psFree(inputMask); 368 377 return false; 369 378 } … … 409 418 int numGood = 0; // Number of good frames 410 419 int numCols = 0, numRows = 0; // Size of image 411 psVector *inputMask = psVectorAlloc(num, PS_TYPE_VECTOR_MASK); // Mask for inputs412 psVectorInit(inputMask, 0);413 420 psVector *matchChi2 = psVectorAlloc(num, PS_TYPE_F32); // chi^2 for stamps when matching 414 421 psVectorInit(matchChi2, NAN); … … 419 426 psArray *covariances = psArrayAlloc(num); // Covariance matrices 420 427 for (int i = 0; i < num; i++) { 428 if (inputMask->data.U8[i]) { 429 continue; 430 } 421 431 psTrace("ppStack", 2, "Convolving input %d of %d to target PSF....\n", i, num); 422 432 pmFPAfileActivate(config->files, false, NULL); … … 1213 1223 hdu->header = psMetadataAlloc(); 1214 1224 } 1215 ppStackVersion Metadata(hdu->header);1225 ppStackVersionHeader(hdu->header); 1216 1226 1217 1227 psFree(outRO);
Note:
See TracChangeset
for help on using the changeset viewer.
