Changeset 2890 in Sophya for trunk/SophyaProg/Tests/tswfits.cc


Ignore:
Timestamp:
Jan 9, 2006, 6:33:27 PM (20 years ago)
Author:
ansari
Message:

Modifs prog test FITS pour test classe SwFitsDataTable - Reza 9/01/2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaProg/Tests/tswfits.cc

    r2866 r2890  
    77#include "histinit.h"
    88#include "dvlist.h"
    9 // #include "datatable.h"
    10 // #include "swppfdtable.h"
    119#include "fitsswapper.h"
    1210#include "fiosinit.h"
     11#include "swfitsdtable.h"
    1312
    1413void test_fdtable() ;
     
    8584      segd.Print(cout, 4, "  ");
    8685    }
    87    
     86
     87    {
     88      cout << "8/ Creation SwFitsDataTable sur myswtable.fits " << endl;
     89      FitsInOutFile so("!myswtable.fits", FitsInOutFile::Fits_Create);
     90      SwFitsDataTable dt(so, 16);
     91      // define table columns
     92      dt.AddFloatColumn("X0_f");
     93      dt.AddFloatColumn("X1_f");
     94      dt.AddDoubleColumn("X0X0pX1X1_d");
     95      cout << "8.b/ start fill " << endl;
     96      // Fill the table
     97      r_8 x[5];
     98      for(int i=0; i<63; i++) {
     99        if (i < 5)  cout << " DBG - i= " << i << endl;
     100        x[0] = (i%9)-4.;  x[1] = (i/9)-3.;  x[2] = x[0]*x[0]+x[1]*x[1];
     101        dt.AddLine(x);
     102      }
     103      cout << "8.c/ End fill " << endl;
     104     
     105      // Printing table info
     106      cout << dt ;
     107    }
    88108  cout << "============ FIN  test_fdtable ======== ======= " << endl; 
    89109}
Note: See TracChangeset for help on using the changeset viewer.