IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2009, 11:43:02 AM (17 years ago)
Author:
bills
Message:

Fix compression by looking up the compression type in the input header
and setting it to the output. In the process of doing this competely localized
the setting of compression parameters in copyFitsOptions, so three times as
many lines are deleted by this delta as added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src/streaksreplace.c

    r23965 r24286  
    344344
    345345    // 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
     346    copyFitsOptions(sf->outImage, sf->recImage, sf->inImage, sf->tiles);
     347
    356348    if (sf->inMask) {
    357349        readImage(sf->inMask, sf->extnum, sf->stage, true);
     
    362354        setupImageRefs(sf->outMask, NULL, sf->inMask, sf->extnum, false);
    363355
    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);
     356        copyFitsOptions(sf->outMask, NULL, sf->inMask, sf->tiles);
    367357    }
    368358
     
    374364        setupImageRefs(sf->outMask, NULL, sf->inMask, sf->extnum, false);
    375365
    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);
     366        copyFitsOptions(sf->outWeight, NULL, sf->inWeight, sf->tiles);
    379367    }
    380368
Note: See TracChangeset for help on using the changeset viewer.