Ignore:
Timestamp:
Oct 3, 2011, 6:32:44 PM (14 years ago)
Author:
cmv
Message:

read/write string, complex, bufferisation enlevee pour FitsABTColRd1F, cmv 03/10/2011

File:
1 edited

Legend:

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

    r4024 r4025  
    551551
    552552/*! Write a character string to FITS file */
    553 void FitsABTWriter::Write(int col,LONGLONG row,const char* val)
    554 {
    555   if(FirstTime) createtbl();
    556   int sta=0;
    557   if(fits_write_col(FitsPtr,TSTRING,col+1,row+1,1,1,&val,&sta))
     553void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,const char* val)
     554{
     555  if(FirstTime) createtbl();
     556  int sta=0;
     557  if(fits_write_col(FitsPtr,TSTRING,col+1,row+1,nfirstel+1,1,&val,&sta))
    558558    printerrorwrite("char*",col,row,sta);
    559559}
     
    649649  int sta=0;
    650650  if(fits_write_col(FitsPtr,TDOUBLE,col+1,row+1,nfirstel+1,1,&val,&sta))
     651    printerrorwrite("double",col,row,sta);
     652}
     653
     654/*! Write complex float data to FITS file (see below) */
     655void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,complex<r_4> val)
     656{
     657  if(FirstTime) createtbl();
     658  int sta=0;
     659  r_4 tval[2]; tval[0] = val.real(); tval[1] = val.imag();
     660  if(fits_write_col(FitsPtr,TCOMPLEX,col+1,row+1,nfirstel+1,1,&tval,&sta))
     661    printerrorwrite("double",col,row,sta);
     662}
     663
     664/*! Write complex double data to FITS file (see below) */
     665void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,complex<r_8> val)
     666{
     667  if(FirstTime) createtbl();
     668  int sta=0;
     669  r_8 tval[2]; tval[0] = val.real(); tval[1] = val.imag();
     670  if(fits_write_col(FitsPtr,TDBLCOMPLEX,col+1,row+1,nfirstel+1,1,&tval,&sta))
    651671    printerrorwrite("double",col,row,sta);
    652672}
Note: See TracChangeset for help on using the changeset viewer.