IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 7, 2009, 4:08:25 PM (17 years ago)
Author:
Paul Price
Message:

Merging trunk (r25026) to get up-to-date on old branch.

Location:
branches/pap
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/pap

  • branches/pap/magic

    • Property svn:ignore set to
      magic
      ssa-core-cpp
      Makefile
      Makefile.bak
  • branches/pap/magic/remove/src

    • Property svn:ignore
      •  

        old new  
         1isdestreaked
        12streaksremove
        23streaksreplace
        34streakscompare
        45streaksrelease
         6makefile
  • branches/pap/magic/remove/src/streaksreplace.c

    r23258 r25027  
    3333    }
    3434
    35     streakFiles *sfiles = openFiles(config, false);
     35    streakFiles *sfiles = openFiles(config, false, argv[0]);
    3636
    3737    if (sfiles->stage == IPP_STAGE_RAW) {
     
    9797    }
    9898
    99 #ifdef NOTYET
    100     if (psMetadataLookupBool(&status, config->arguments, "REPLACE")) {
    101         //     swap the instances for the input and output
    102         //     Note this is a database operation. No file I/O is performed
    103         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 that
    107             // it has done and give a detailed report of what happened
    108 
    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't
    118                 // repeat the operation.
    119 
    120                 // Returning error status here is problematic. The inputs have been streak removed
    121                 // but they're still lying around
    122                 // Maybe just print an error message and
    123                 // let other system tools clean up
    124                 psErrorStackPrint(stderr, "");
    125                 exit(PS_EXIT_UNKNOWN_ERROR);
    126             }
    127         }
    128     }
    129 #endif  // REPLACE, REMOVE
    13099//    nebServerFree(ourNebServer);
    131100    psFree(config);
     
    344313
    345314    // 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
    356317    if (sf->inMask) {
    357318        readImage(sf->inMask, sf->extnum, sf->stage, true);
     
    362323        setupImageRefs(sf->outMask, NULL, sf->inMask, sf->extnum, false);
    363324
    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);
    367326    }
    368327
     
    374333        setupImageRefs(sf->outMask, NULL, sf->inMask, sf->extnum, false);
    375334
    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);
    379336    }
    380337
Note: See TracChangeset for help on using the changeset viewer.