IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2008, 3:43:43 PM (18 years ago)
Author:
Paul Price
Message:

Was writing compressed-translated versions of some headers when we weren't writing compressed files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fits/psFitsHeader.c

    r18869 r19872  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2008-08-02 02:50:41 $
     9 *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2008-10-03 01:43:43 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8080                                                    { "ZEXTEND",  "EXTEND" },
    8181                                                    { "ZBLOCKED", "BLOCKED"},
    82                                                     //                                                    { "ZPCOUNT",  "PCOUNT" },
    83                                                     //                                                    { "ZGCOUNT",  "GCOUNT" },
    8482                                                    { "ZHECKSUM", "CHECKSUM"},
    8583                                                    { "ZDATASUM", "DATASUM" },
     
    522520        }
    523521    }
    524     if ((!fits->options || fits->options->conventions.compression) && compress != PS_FITS_COMPRESS_NONE) {
     522
     523    bool compressing = ((!fits->options || fits->options->conventions.compression) &&
     524                        compress != PS_FITS_COMPRESS_NONE) ? true : false; // Are we compressing?
     525
     526    if (compressing) {
    525527        psMetadataItem *simpleItem = psMetadataLookup(output, "SIMPLE"); // SIMPLE in the header
    526528        if (simpleItem) {
     
    556558
    557559            // Options for compression
    558             if (!fits->options || fits->options->conventions.compression) {
     560            if (compressing) {
    559561                // Check to see if the keyword should be translated
    560562                name = (char*)keywordUntranslate(name, compressTranslation); // Casting away const for cfitsio
Note: See TracChangeset for help on using the changeset viewer.