Changeset 3542 in Sophya for trunk/AddOn/TAcq/tstminifits.cc
- Timestamp:
- Oct 23, 2008, 5:12:27 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/tstminifits.cc
r3538 r3542 40 40 int rc = 0; 41 41 try { 42 42 { 43 43 cout << "1/ Creation tableau " << endl; 44 44 size_t sx = 300; 45 45 size_t sy = 200; 46 46 TArray<int_2> ta(sx, sy); 47 TArray<r_4> arr(sx, sy); 47 48 ta = RegularSequence(0.,0.5); 48 49 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; 50 53 POutPersist po("tmf.ppf"); 51 po << ta ;54 po << ta << arr; 52 55 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 { 53 64 MiniFITSFile mff; 54 65 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 } 59 71 // -------------- Ecriture de bytes par morceaux 60 72 {
Note:
See TracChangeset
for help on using the changeset viewer.