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

    r24283 r24286  
    569569
    570570    // set up the compression parameters
    571 #ifdef STREAKS_COMPRESS_OUTPUT
    572     // compression of the image pixels is disabled for now. Some consortium members
    573     // have problems reading them
    574     copyFitsOptions(sf->outImage, sf->recImage, sf->inImage);
    575 
    576     // XXX: TODO: can we derive these values from the input header?
    577     // psFitsCompressionGet(sf->inImage->image) gives compression none
    578     // perhaps we should just use the definition of COMP_IMG in the configuration
    579     psFitsSetCompression(sf->outImage->fits, PS_FITS_COMPRESS_RICE, sf->tiles, 8, 0, 0);
    580     if (sf->recImage) {
    581         psFitsSetCompression(sf->recImage->fits, PS_FITS_COMPRESS_RICE, sf->tiles, 8, 0, 0);
    582     }
    583 #endif
     571    copyFitsOptions(sf->outImage, sf->recImage, sf->inImage, sf->tiles);
    584572
    585573    if (sf->inMask) {
     
    605593            }
    606594
    607 #ifdef STREAKS_COMPRESS_OUTPUT
    608             // XXX: see note above
    609             copyFitsOptions(sf->outMask, sf->recMask, sf->inMask);
    610             psFitsSetCompression(sf->outMask->fits, PS_FITS_COMPRESS_PLIO, sf->tiles, 8, 0, 0);
    611             if (sf->recMask) {
    612                 psFitsSetCompression(sf->recMask->fits, PS_FITS_COMPRESS_PLIO, sf->tiles, 8, 0, 0);
    613             }
     595            copyFitsOptions(sf->outMask, sf->recMask, sf->inMask, sf->tiles);
    614596            if (sf->outChMask) {
    615                 copyFitsOptions(sf->outChMask, sf->recChMask, sf->inMask);
    616                 psFitsSetCompression(sf->outChMask->fits, PS_FITS_COMPRESS_PLIO, sf->tiles, 8, 0, 0);
    617                 if (sf->recChMask) {
    618                     psFitsSetCompression(sf->recChMask->fits, PS_FITS_COMPRESS_PLIO, sf->tiles, 8, 0, 0);
    619                 }
    620             }
    621 #endif
     597                copyFitsOptions(sf->outChMask, sf->recChMask, sf->inMask, sf->tiles);
     598            }
    622599        }
    623600    }
     
    636613        setupImageRefs(sf->outWeight, sf->recWeight, sf->inWeight, sf->extnum, exciseAll);
    637614
    638 #ifdef STREAKS_COMPRESS_OUTPUT
    639         copyFitsOptions(sf->outWeight, sf->recWeight, sf->inWeight);
    640         // XXX: see note above
    641         psFitsSetCompression(sf->outWeight->fits, PS_FITS_COMPRESS_RICE, sf->tiles, 8, 0, 0);
    642         if (sf->recWeight) {
    643             psFitsSetCompression(sf->recWeight->fits, PS_FITS_COMPRESS_RICE, sf->tiles, 8, 0, 0);
    644         }
    645 #endif
    646     }
    647     // and for raw images, create sub images that represent the actual image
    648     // area (no overscan)
     615        copyFitsOptions(sf->outWeight, sf->recWeight, sf->inWeight, sf->tiles);
     616    }
    649617
    650618    return true;
Note: See TracChangeset for help on using the changeset viewer.