- Timestamp:
- Jun 25, 2009, 2:00:56 PM (17 years ago)
- Location:
- branches/eam_branches/20090522
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
magic/remove/src (modified) (1 prop)
-
magic/remove/src/streaksreplace.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090522
- Property svn:mergeinfo changed
-
branches/eam_branches/20090522/magic/remove/src
- Property svn:ignore
-
old new 3 3 streakscompare 4 4 streaksrelease 5 makefile
-
- Property svn:ignore
-
branches/eam_branches/20090522/magic/remove/src/streaksreplace.c
r23965 r24557 97 97 } 98 98 99 #ifdef NOTYET100 if (psMetadataLookupBool(&status, config->arguments, "REPLACE")) {101 // swap the instances for the input and output102 // Note this is a database operation. No file I/O is performed103 if (!swapOutputsToInputs(sfiles)) {104 psError(PS_ERR_UNKNOWN, false, "failed to swap files");105 106 // XXX: Now what? I guess swapOutputsToInputs will need to undo anything that107 // it has done and give a detailed report of what happened108 109 psErrorStackPrint(stderr, "");110 exit(PS_EXIT_UNKNOWN_ERROR);111 }112 113 if (psMetadataLookupBool(&status, config->arguments, "REMOVE")) {114 // delete the temporary storage objects (which now points to the original image(s)115 if (!deleteTemps(sfiles)) {116 psError(PS_ERR_UNKNOWN, false, "failed to delete temporary files");117 // XXX: Now what? At this point the output files have been swapped, so we can't118 // repeat the operation.119 120 // Returning error status here is problematic. The inputs have been streak removed121 // but they're still lying around122 // Maybe just print an error message and123 // let other system tools clean up124 psErrorStackPrint(stderr, "");125 exit(PS_EXIT_UNKNOWN_ERROR);126 }127 }128 }129 #endif // REPLACE, REMOVE130 99 // nebServerFree(ourNebServer); 131 100 psFree(config); … … 344 313 345 314 // set up the compression parameters 346 #ifdef STREAKS_COMPRESS_OUTPUT 347 // compression of the image pixels is disabled for now. Some consortium members 348 // have problems reading compressed images. 349 copyFitsOptions(sf->outImage, sf->recImage, sf->inImage); 350 351 // XXX: TODO: can we derive these values from the input header? 352 // psFitsCompressionGet(sf->inImage->image) gives compression none 353 // perhaps we should just use the definition of COMP_IMG in the configuration 354 psFitsSetCompression(sf->outImage->fits, PS_FITS_COMPRESS_RICE, sf->tiles, 8, 0, 0); 355 #endif 315 copyFitsOptions(sf->outImage, sf->recImage, sf->inImage, sf->tiles); 316 356 317 if (sf->inMask) { 357 318 readImage(sf->inMask, sf->extnum, sf->stage, true); … … 362 323 setupImageRefs(sf->outMask, NULL, sf->inMask, sf->extnum, false); 363 324 364 // XXX: see note above 365 copyFitsOptions(sf->outMask, NULL, sf->inMask); 366 psFitsSetCompression(sf->outMask->fits, PS_FITS_COMPRESS_PLIO, sf->tiles, 8, 0, 0); 325 copyFitsOptions(sf->outMask, NULL, sf->inMask, sf->tiles); 367 326 } 368 327 … … 374 333 setupImageRefs(sf->outMask, NULL, sf->inMask, sf->extnum, false); 375 334 376 copyFitsOptions(sf->outWeight, NULL, sf->inWeight); 377 // XXX: see note above 378 psFitsSetCompression(sf->outWeight->fits, PS_FITS_COMPRESS_RICE, sf->tiles, 8, 0, 0); 335 copyFitsOptions(sf->outWeight, NULL, sf->inWeight, sf->tiles); 379 336 } 380 337
Note:
See TracChangeset
for help on using the changeset viewer.
