Changeset 3542 in Sophya for trunk/AddOn/TAcq/tstminifits.cc


Ignore:
Timestamp:
Oct 23, 2008, 5:12:27 PM (17 years ago)
Author:
ansari
Message:

Ajouts fichiers du repertoire Remote (Classes Socket, ServerSocker RawInOutSocketStream ...) et fichier README , Reza 23/10/2008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/tstminifits.cc

    r3538 r3542  
    4040  int rc = 0;
    4141  try {
    42         {
     42    {
    4343    cout << "1/ Creation tableau " << endl;
    4444    size_t sx = 300;
    4545    size_t sy = 200;
    4646    TArray<int_2> ta(sx, sy);
     47    TArray<r_4> arr(sx, sy);
    4748    ta = RegularSequence(0.,0.5);
    4849    ta.Show();
    49     cout << "2/ ecriture tableau ds tmf.ppf " << endl;
     50    arr = RandomSequence(RandomSequence::Gaussian, 510.,30.);
     51    arr.Show();
     52    cout << "2/ ecriture tableaux ta (int_2) arr (r_4) ds tmf.ppf " << endl;
    5053    POutPersist po("tmf.ppf");
    51     po << ta;
     54    po << ta << arr;
    5255    cout << "3/ ecriture tableau ds tmf.fits " << endl;
     56    {
     57    MiniFITSFile mff;
     58    mff.setDTypeNaxis(MF_Float32, sx, sy);
     59    mff.Open("tmf.fits", MF_Write);
     60    mff.WriteI(ta.Data(), sx*sy);
     61    }
     62    cout << "3.b/ ecriture tableau arr (r_4) ds tmf2.fits " << endl;
     63    {
    5364    MiniFITSFile mff;
    5465    mff.setDTypeNaxis(MF_Int16, sx, sy);
    55     mff.Open("tmf.fits", MF_Write);
    56     mff.WriteI(ta.Data(), sx*sy);
    57     cout << "3.b/ FIN ecriture tableau ds tmf.fits " << endl;   
    58         }
     66    mff.Open("tmf2.fits", MF_Write);
     67    mff.WriteF(arr.Data(), sx*sy);
     68    }
     69    cout << "3.c/ FIN ecriture tableau ds tmf.fits " << endl;   
     70    }
    5971//  --------------  Ecriture de bytes par morceaux
    6072    {
Note: See TracChangeset for help on using the changeset viewer.