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/streaksrelease.c

    r23965 r24286  
    275275
    276276    // set up the compression parameters
    277 #ifdef STREAKS_COMPRESS_OUTPUT
    278     // compression of the image pixels is disabled for now. Some consortium members
    279     // have problems reading them
    280     copyFitsOptions(sf->outImage, sf->recImage, sf->inImage);
    281 
    282     // XXX: TODO: can we derive these values from the input header?
    283     // psFitsCompressionGet(sf->inImage->image) gives compression none
    284     // perhaps we should just use the definition of COMP_IMG in the configuration
    285     psFitsSetCompression(sf->outImage->fits, PS_FITS_COMPRESS_RICE, sf->tiles, 8, 0, 0);
    286     if (sf->recImage) {
    287         psFitsSetCompression(sf->recImage->fits, PS_FITS_COMPRESS_RICE, sf->tiles, 8, 0, 0);
    288     }
    289 #endif
     277    copyFitsOptions(sf->outImage, sf->recImage, sf->inImage, sf->tiles);
    290278
    291279    if (sf->inMask) {
     
    306294            }
    307295
    308 #ifdef STREAKS_COMPRESS_OUTPUT
    309             // XXX: see note above
    310             copyFitsOptions(sf->outMask, sf->recMask, sf->inMask);
    311             psFitsSetCompression(sf->outMask->fits, PS_FITS_COMPRESS_PLIO, sf->tiles, 8, 0, 0);
    312             if (sf->recMask) {
    313                 psFitsSetCompression(sf->recMask->fits, PS_FITS_COMPRESS_PLIO, sf->tiles, 8, 0, 0);
    314             }
     296            copyFitsOptions(sf->outMask, sf->recMask, sf->inMask, sf->tiles);
    315297            if (sf->outChMask) {
    316                 copyFitsOptions(sf->outChMask, sf->recChMask, sf->inMask);
     298                copyFitsOptions(sf->outChMask, sf->recChMask, sf->inMask, sf->tiles);
    317299                psFitsSetCompression(sf->outChMask->fits, PS_FITS_COMPRESS_PLIO, sf->tiles, 8, 0, 0);
    318300                if (sf->recChMask) {
     
    320302                }
    321303            }
    322 #endif
    323304        }
    324305    }
     
    332313        setupImageRefs(sf->outWeight, sf->recWeight, sf->inWeight, sf->extnum, exciseAll);
    333314
    334 #ifdef STREAKS_COMPRESS_OUTPUT
    335         copyFitsOptions(sf->outWeight, sf->recWeight, sf->inWeight);
    336         // XXX: see note above
    337         psFitsSetCompression(sf->outWeight->fits, PS_FITS_COMPRESS_RICE, sf->tiles, 8, 0, 0);
    338         if (sf->recWeight) {
    339             psFitsSetCompression(sf->recWeight->fits, PS_FITS_COMPRESS_RICE, sf->tiles, 8, 0, 0);
    340         }
    341 #endif
     315        copyFitsOptions(sf->outWeight, sf->recWeight, sf->inWeight, sf->tiles);
    342316    }
    343317    // and for raw images, create sub images that represent the actual image
Note: See TracChangeset for help on using the changeset viewer.