Changeset 2493 in Sophya for trunk/SophyaExt
- Timestamp:
- Jan 6, 2004, 6:06:28 PM (22 years ago)
- Location:
- trunk/SophyaExt/FitsIOServer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fabtwriter.cc
r2455 r2493 375 375 \param tunit : fits tunit definition (optional) 376 376 \param datatype : TBYTE TSHORT TLONG (TINT32BIT) TLONGLONG TFLOAT TDOUBLE 377 TUSHORT TULONG . That parameter is only use in case377 TUSHORT TULONG TSBYTE. That parameter is only use in case 378 378 of a BINARY_TBL table when tform is not defined). 379 379 \return The number of the new added column in the table. … … 407 407 else if(datatype==TUSHORT) strcpy(str,"1U"); 408 408 else if(datatype==TULONG) strcpy(str,"1V"); 409 #ifdef TSBYTE 410 else if(datatype==TSBYTE) strcpy(str,"1S"); 411 #endif 409 412 else 410 413 throw ParmError("FitsABTWriter::addcol: datatype not allowed\n"); … … 425 428 else if(datatype==TUSHORT) strcpy(str,"I7"); 426 429 else if(datatype==TULONG) strcpy(str,"I11"); 430 #ifdef TSBYTE 431 else if(datatype==TSBYTE) strcpy(str,"I5"); 432 #endif 427 433 else 428 434 throw ParmError("FitsABTWriter::addcol: datatype not allowed\n"); … … 517 523 */ 518 524 525 /*! Write signed char (1 Byte) data to FITS file (see below) */ 526 void 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 519 538 /*! Write unsigned char (1 Byte) data to FITS file (see below) */ 520 539 void FitsABTWriter::Write(int col,long row,uint_1 val) -
trunk/SophyaExt/FitsIOServer/fabtwriter.h
r2453 r2493 93 93 {return addcol(label,tform,tunit,datatype);} 94 94 95 void Write(int col,long row,int_1 val); 95 96 void Write(int col,long row,uint_1 val); 96 97 void Write(int col,long row,int_2 val);
Note:
See TracChangeset
for help on using the changeset viewer.