Changeset 2173 in Sophya for trunk


Ignore:
Timestamp:
Aug 9, 2002, 6:47:25 PM (23 years ago)
Author:
cmv
Message:

modifs cmv 9/8/02

Location:
trunk/SophyaExt/FitsIOServer
Files:
3 edited

Legend:

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

    r2170 r2173  
    216216 // Get column name back, tunit, tform
    217217 char tunit[64], tform[64];
     218 long repeat=0; double tscale=1., tzero=0.;
    218219 int rc=0;
    219220 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);
    221223 } 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);
    223226 }
    224227 if(rc) {
     
    232235 if(DbgLevel)
    233236   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;
    236240
    237241}
  • trunk/SophyaExt/FitsIOServer/fabtwriter.cc

    r2170 r2173  
    288288//////////////////////////////////////////////////////////////
    289289/*!
    290   Write a short data to FITS file.
     290  Write a data to FITS file.
    291291  \param col : column number [0,ncol[
    292292  \param row : row number    [0,nrow[
     
    306306  \endverbatim
    307307*/
     308
     309/*! Write signed char (1 Byte) data to FITS file (see below) */
     310void 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) */
    308319void FitsABTWriter::Write(int col,long row,int_2 val)
    309320{
     
    330341  // Bug ou inconsistence cfitsio sur machine ou long=8Bytes ?
    331342  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) */
     348void 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;
    332354  if(fits_write_col(FitsPtr,T,col+1,row+1,1,1,&val,&sta))
    333355    printerrorwrite("long",col,row,sta);
     
    367389//////////////////////////////////////////////////////////////
    368390/*!
    369   Write a vector of long data to FITS file.
     391  Write a vector of data to FITS file.
    370392  \param col : column number [0,ncol[
    371393  \param row : starting row number    [0,nrow[
     
    374396      that is "N-1" is the number of the last row written.
    375397*/
     398
    376399/*! Write a vector of unsigned short (2 Bytes) data to FITS file (see below) */
    377400long FitsABTWriter::Write(int col,long row,TVector<uint_2>& val)
  • trunk/SophyaExt/FitsIOServer/fabtwriter.h

    r2170 r2173  
    4646  inline void SetDebug(int lp=0) {DbgLevel = (unsigned short) lp;}
    4747
     48  void Write(int col,long row,int_1 val);
    4849  void Write(int col,long row,int_2 val);
    4950  void Write(int col,long row,uint_2 val);
    5051  void Write(int col,long row,int_4 val);
     52  void Write(int col,long row,uint_4 val);
    5153  void Write(int col,long row,int_8 val);
    5254  void Write(int col,long row,float val);
Note: See TracChangeset for help on using the changeset viewer.