IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 4, 2008, 5:26:59 PM (18 years ago)
Author:
Paul Price
Message:

Allow Boolean values to be written to FITS tables. Since we can't use
a vector of boolean values, we use U8 instead, and treat the type as
somewhat special.

File:
1 edited

Legend:

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

    r15662 r16825  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-11-20 19:14:22 $
     9 *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2008-03-05 03:26:59 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    439439                // A new one!
    440440                colSpec *spec = psAlloc(sizeof(colSpec)); // Specification for this column
    441                 spec->type = colItem->type;
     441                // BOOL type is not a valid vector type, so we translate it to U8
     442                spec->type = colItem->type == PS_TYPE_BOOL ? PS_TYPE_U8 : colItem->type;
    442443                spec->size = size;
    443444                if (colItem->type == PS_DATA_VECTOR) {
     
    453454                    spec->size = size;
    454455                }
    455                 if (colItem->type != spec->type) {
     456                if (colItem->type != spec->type &&
     457                    colItem->type != PS_TYPE_BOOL && spec->type != PS_TYPE_U8) {
    456458                    psWarning("Differing type found for column %s: %x vs %x --- using the first found.\n",
    457459                              colSpecItem->name, colItem->type, spec->type);
Note: See TracChangeset for help on using the changeset viewer.