Changeset 2845 in Sophya for trunk/SophyaProg/Tests/tfitsdt.cc


Ignore:
Timestamp:
Nov 21, 2005, 9:31:32 AM (20 years ago)
Author:
ansari
Message:

modifs test nouveau fits suite codage I/O colonnes string et complex - Reza 21/11/2005

File:
1 edited

Legend:

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

    r2821 r2845  
    4040    dt.AddFloatColumn("f_sin");
    4141    dt.AddDoubleColumn("f_x2");
     42    dt.AddStringColumn("str_line");
     43    dt.AddComplexColumn("cmplx_cos_sin");
    4244    MuTyV rec[10];
     45    char sbuff[32];
    4346    cout << " Filling ... (NLines=" << NL << ")" << endl;
    4447    for(int k = 0; k<NL; k++) {
     
    4952      rec[2] = sin(x);
    5053      rec[3] = x*x;
     54      sprintf(sbuff, "SL-%d", k);
     55      rec[4] = sbuff;
     56      double sx = sin(x);
     57      double cx = cos(x);
     58      rec[5] = complex<r_4>(cx, sx);
    5159      dt.AddLine(rec);
    5260    }
     
    6977    cout << dtr;
    7078    cout << "2.b/  dtr.LineHeaderToString() dtr.LineToString(k)   : " << endl;
    71     cout << dtr.LineHeaderToString() ;
     79    cout << dtr.LineHeaderToString() << endl;
    7280    for(int k = 0; k<NL; k+=NL/12)
    7381      cout << "Line[" << k << "] " << dtr.LineToString(k) << endl ; 
     
    7684    fios >> dtra;
    7785    cout << dtra;
     86    cout << dtra.LineHeaderToString() << endl;
     87    for(int k = 0; k<NL; k+=NL/12)
     88      cout << "Line[" << k << "] " << dtra.LineToString(k) << endl ; 
    7889   
    7990  }
Note: See TracChangeset for help on using the changeset viewer.