- Timestamp:
- Aug 9, 2002, 6:47:25 PM (23 years ago)
- Location:
- trunk/SophyaExt/FitsIOServer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fabtcolread.cc
r2170 r2173 216 216 // Get column name back, tunit, tform 217 217 char tunit[64], tform[64]; 218 long repeat=0; double tscale=1., tzero=0.; 218 219 int rc=0; 219 220 if(HduType==BINARY_TBL) { 220 fits_get_bcolparms(FitsPtr,ColNum+1,labelcol,tunit,tform,NULL,NULL,NULL,NULL,NULL,&sta); 221 fits_get_bcolparms(FitsPtr,ColNum+1,labelcol,tunit,tform 222 ,&repeat,&tscale,&tzero,NULL,NULL,&sta); 221 223 } else { 222 fits_get_acolparms(FitsPtr,ColNum+1,labelcol,NULL,tunit,tform,NULL,NULL,NULL,NULL,&sta); 224 fits_get_acolparms(FitsPtr,ColNum+1,labelcol,&repeat,tunit,tform 225 ,&tscale,&tzero,NULL,NULL,&sta); 223 226 } 224 227 if(rc) { … … 232 235 if(DbgLevel) 233 236 cout<<"FitsABTColRead::Init Num="<<ColNum<<" Label="<<ColLabel 234 <<" TypeCode="<<ColTypeCode 235 <<" TUnit="<<ColTUnit<<" TForm="<<ColTForm<<endl; 237 <<" TypeCode="<<ColTypeCode<<" TUnit="<<ColTUnit<<" TForm="<<ColTForm<<endl; 238 if(DbgLevel>1) 239 cout<<" (repeat="<<repeat<<",tscale="<<tscale<<",tzero="<<tzero<<")"<<endl; 236 240 237 241 } -
trunk/SophyaExt/FitsIOServer/fabtwriter.cc
r2170 r2173 288 288 ////////////////////////////////////////////////////////////// 289 289 /*! 290 Write a shortdata to FITS file.290 Write a data to FITS file. 291 291 \param col : column number [0,ncol[ 292 292 \param row : row number [0,nrow[ … … 306 306 \endverbatim 307 307 */ 308 309 /*! Write signed char (1 Byte) data to FITS file (see below) */ 310 void FitsABTWriter::Write(int col,long row,int_1 val) 311 { 312 if(FirstTime) createtbl(); 313 int sta=0; 314 if(fits_write_col(FitsPtr,TBYTE,col+1,row+1,1,1,&val,&sta)) 315 printerrorwrite("char",col,row,sta); 316 } 317 318 /*! Write short (2 Bytes) data to FITS file (see below) */ 308 319 void FitsABTWriter::Write(int col,long row,int_2 val) 309 320 { … … 330 341 // Bug ou inconsistence cfitsio sur machine ou long=8Bytes ? 331 342 int T = (sizeof(long)==4) ? TLONG: TINT; 343 if(fits_write_col(FitsPtr,T,col+1,row+1,1,1,&val,&sta)) 344 printerrorwrite("long",col,row,sta); 345 } 346 347 /*! Write unsigned long (4 Bytes) data to FITS file (see below) */ 348 void FitsABTWriter::Write(int col,long row,uint_4 val) 349 { 350 if(FirstTime) createtbl(); 351 int sta=0; 352 // Bug ou inconsistence cfitsio sur machine ou long=8Bytes ? 353 int T = (sizeof(unsigned long)==4) ? TULONG: TUINT; 332 354 if(fits_write_col(FitsPtr,T,col+1,row+1,1,1,&val,&sta)) 333 355 printerrorwrite("long",col,row,sta); … … 367 389 ////////////////////////////////////////////////////////////// 368 390 /*! 369 Write a vector of longdata to FITS file.391 Write a vector of data to FITS file. 370 392 \param col : column number [0,ncol[ 371 393 \param row : starting row number [0,nrow[ … … 374 396 that is "N-1" is the number of the last row written. 375 397 */ 398 376 399 /*! Write a vector of unsigned short (2 Bytes) data to FITS file (see below) */ 377 400 long FitsABTWriter::Write(int col,long row,TVector<uint_2>& val) -
trunk/SophyaExt/FitsIOServer/fabtwriter.h
r2170 r2173 46 46 inline void SetDebug(int lp=0) {DbgLevel = (unsigned short) lp;} 47 47 48 void Write(int col,long row,int_1 val); 48 49 void Write(int col,long row,int_2 val); 49 50 void Write(int col,long row,uint_2 val); 50 51 void Write(int col,long row,int_4 val); 52 void Write(int col,long row,uint_4 val); 51 53 void Write(int col,long row,int_8 val); 52 54 void Write(int col,long row,float val);
Note:
See TracChangeset
for help on using the changeset viewer.