Changeset 2493 in Sophya for trunk/SophyaExt/FitsIOServer


Ignore:
Timestamp:
Jan 6, 2004, 6:06:28 PM (22 years ago)
Author:
cmv
Message:

add int_2 in writer cmv 6/1/04

Location:
trunk/SophyaExt/FitsIOServer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fabtwriter.cc

    r2455 r2493  
    375375  \param tunit : fits tunit definition (optional)
    376376  \param datatype : TBYTE TSHORT TLONG (TINT32BIT) TLONGLONG TFLOAT TDOUBLE
    377                     TUSHORT TULONG. That parameter is only use in case
     377                    TUSHORT TULONG TSBYTE. That parameter is only use in case
    378378                    of a BINARY_TBL table when tform is not defined).
    379379  \return The number of the new added column in the table.
     
    407407   else if(datatype==TUSHORT)   strcpy(str,"1U");
    408408   else if(datatype==TULONG)    strcpy(str,"1V");
     409#ifdef TSBYTE
     410   else if(datatype==TSBYTE)    strcpy(str,"1S");
     411#endif
    409412   else
    410413     throw ParmError("FitsABTWriter::addcol: datatype not allowed\n");
     
    425428   else if(datatype==TUSHORT)   strcpy(str,"I7");
    426429   else if(datatype==TULONG)    strcpy(str,"I11");
     430#ifdef TSBYTE
     431   else if(datatype==TSBYTE)    strcpy(str,"I5");
     432#endif
    427433   else
    428434     throw ParmError("FitsABTWriter::addcol: datatype not allowed\n");
     
    517523*/
    518524
     525/*! Write signed char (1 Byte) data to FITS file (see below) */
     526void FitsABTWriter::Write(int col,long row,int_1 val)
     527{
     528#ifdef TSBYTE
     529  if(FirstTime) createtbl();
     530  int sta=0;
     531  if(fits_write_col(FitsPtr,TSBYTE,col+1,row+1,1,1,&val,&sta))
     532    printerrorwrite("signed char",col,row,sta);
     533#else
     534  throw PException("FitsABTWriter::Write(..,int_2) Not in that cfitsio version");
     535#endif
     536}
     537
    519538/*! Write unsigned char (1 Byte) data to FITS file (see below) */
    520539void FitsABTWriter::Write(int col,long row,uint_1 val)
  • trunk/SophyaExt/FitsIOServer/fabtwriter.h

    r2453 r2493  
    9393     {return addcol(label,tform,tunit,datatype);}
    9494
     95  void Write(int col,long row,int_1 val);
    9596  void Write(int col,long row,uint_1 val);
    9697  void Write(int col,long row,int_2 val);
Note: See TracChangeset for help on using the changeset viewer.