IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 3, 2010, 5:18:11 PM (16 years ago)
Author:
Paul Price
Message:

Adding functions psFitsReadTableAllColumns and psFitsWriteTableAllColumns to more efficiently read/write a FITS table. Instead of a psMetadata for each row, the table is read as a psMetadata with each column implemented as a vector, array or image.

File:
1 edited

Legend:

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

    r27219 r28208  
    815815{
    816816    switch (datatype) {
    817     case TBYTE:
     817      case TBYTE:
    818818        return PS_TYPE_U8;
    819     case TSBYTE:
     819      case TSBYTE:
    820820        return PS_TYPE_S8;
    821     case TSHORT:
     821      case TSHORT:
    822822        return PS_TYPE_S16;
    823     case TUSHORT:
     823      case TUSHORT:
    824824        return PS_TYPE_U16;
    825     case TLONG:
     825      case TLONG:
    826826        if (sizeof(long) == 8) {
    827827            return PS_TYPE_S64;
    828828        }
    829829        // no break
    830     case TINT:
     830      case TINT:
    831831        return PS_TYPE_S32;
    832     case TULONG:
     832      case TULONG:
    833833        if (sizeof(unsigned long) == 8) {
    834834            return PS_TYPE_U64;
    835835        }
    836836        // no break
    837     case TUINT:
     837      case TUINT:
    838838        return PS_TYPE_U32;
    839     case TLONGLONG:
     839      case TLONGLONG:
    840840        return PS_TYPE_S64;
    841     case TFLOAT:
     841      case TFLOAT:
    842842        return PS_TYPE_F32;
    843     case TDOUBLE:
     843      case TDOUBLE:
    844844        return PS_TYPE_F64;
    845     case TLOGICAL:
     845      case TLOGICAL:
    846846        return PS_TYPE_BOOL;
    847     default:
    848         psError(PS_ERR_IO, true,
    849                 "Unknown FITS datatype, %d.",
    850                 datatype);
     847      case TSTRING:
     848        return PS_DATA_STRING;
     849      default:
     850        psError(PS_ERR_IO, true, "Unknown FITS datatype, %d.", datatype);
    851851        return 0;
    852852    }
Note: See TracChangeset for help on using the changeset viewer.