IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15177


Ignore:
Timestamp:
Oct 3, 2007, 10:57:13 AM (19 years ago)
Author:
Paul Price
Message:

Renaming psFits.compConvention to psFits.conventions.compression --- there will be more than one convention (will soon add the 16-bit floats), so it makes sense to bundle them together.

Location:
branches/pap_branch_070920/psLib/src/fits
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_070920/psLib/src/fits/psFits.c

    r15176 r15177  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.71.2.4 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-10-03 20:21:45 $
     9 *  @version $Revision: 1.71.2.5 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-10-03 20:57:13 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    162162    fits->writable = (iomode == READWRITE);
    163163    fits->extword = NULL;
    164     fits->compConvention = true;
     164    fits->conventions.compression = true;
    165165    psMemSetDeallocator(fits,(psFreeFunc)fitsFree);
    166166
     
    238238// really want to be able to read these files (MegaCam data are shipped as imcopy-compressed images).
    239239// Therefore, we implement our own version of moving to an extension specified by name.  The pure cfitsio
    240 // version is used if "compConvention" handling is turned off in the psFits structure.
     240// version is used if "conventions.compression" handling is turned off in the psFits structure.
    241241bool psFitsMoveExtName(const psFits* fits,
    242242                       const char* extname)
     
    247247    int status = 0;
    248248
    249     if (!fits->compConvention && !fits->extword) {
     249    if (!fits->conventions.compression && !fits->extword) {
    250250        // User wants to use cfitsio.  Good luck to them!
    251251        if (fits_movnam_hdu(fits->fd, ANY_HDU, (char*)extname, 0, &status) != 0) {
     
    256256    }
    257257
    258     bool ignoreCI = (fits->compConvention &&
     258    bool ignoreCI = (fits->conventions.compression &&
    259259                     (strcmp(extname, "COMPRESSED_IMAGE") != 0)); // Ignore COMPRESSED_IMAGE extension name?
    260260    char *extword = (fits->extword ? fits->extword : "EXTNAME"); // Word to use as extension name
  • branches/pap_branch_070920/psLib/src/fits/psFits.h

    r15176 r15177  
    44 * @author Robert DeSonia, MHPCC
    55 *
    6  * @version $Revision: 1.31.2.4 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-10-03 20:21:45 $
     6 * @version $Revision: 1.31.2.5 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2007-10-03 20:57:13 $
    88 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    99 */
     
    5555    bool writable;                      ///< Is the file writable?
    5656    char *extword;                      ///< user-specified word to name extensions (NULL implies EXTNAME)
    57     bool compConvention;                ///< Honour compression convention, handling compressed images
     57    struct {
     58        bool compression;               ///< Honour compression convention, handling compressed images
     59    } conventions;                      ///< Conventions to honour
    5860} psFits;
    5961
  • branches/pap_branch_070920/psLib/src/fits/psFitsHeader.c

    r15174 r15177  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.34.4.6 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-10-03 20:16:49 $
     9 *  @version $Revision: 1.34.4.7 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-10-03 20:57:13 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7272    PS_ASSERT_FITS_NON_NULL(fits, false);
    7373
    74     if (!fits->compConvention) {
     74    if (!fits->conventions.compression) {
    7575        // User has turned off compression conventions; doesn't want any nasty surprises
    7676        return false;
     
    250250            } else if (strcasecmp(keyValueFixed, "-INF") == 0) {
    251251                success = psMetadataAddF32(header, PS_LIST_TAIL, keyName, dupFlag, keyComment, -INFINITY);
    252             } else if (!fits->compConvention ||
     252            } else if (!fits->conventions.compression ||
    253253                       (strcmp(keyName, "EXTNAME") != 0 || strcmp(keyValueFixed, "COMPRESSED_IMAGE") != 0)) {
    254254                // Ignore EXTNAME=COMPRESSED_IMAGE if compression convention is to be respected
Note: See TracChangeset for help on using the changeset viewer.