Changeset 1240 in Sophya
- Timestamp:
- Oct 18, 2000, 10:59:12 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/Tests/obj_fits.cc
r1232 r1240 16 16 { 17 17 if (narg < 3) { 18 cout << "obj_fits/Erreur arg - Usage obj_fits r/w fitsfilename \n" << endl; 19 cout << " w : Create a FITS file with a matrix and an NTuple \n" << endl; 20 cout << " r : Read a matrix and an NTuple from a Fits File \n" << endl; 18 cout << "obj_fits/Erreur arg - Usage obj_fits r/r2/w/w2 fitsfilename " << endl; 19 cout << " w : Create a FITS file with a matrix and an NTuple " << endl; 20 cout << " r : Read a matrix and an NTuple from a Fits File " << endl; 21 cout << " 2 : Image on secondary header " << endl; 21 22 exit(1); 22 23 } … … 24 25 SophyaInit(); 25 26 string flnm = arg[2]; 27 bool imgonph = true; 28 if (*(arg[1]+1) == '2') imgonph = false; 26 29 if (*arg[1] == 'r') { 27 30 cout << " obj_fits/Info: Opening input FitsFile " << endl; 28 31 FitsInFile fiis(flnm); 32 fiis.firstImageOnPrimaryHeader(imgonph); 33 29 34 cout << " Reading Matrix m from FITS " << endl; 30 Matrix m (1,1);35 Matrix m; 31 36 fiis >> m; 32 37 cout << m << endl; … … 40 45 cout << " obj_fits/Info: Opening output FitsFile " << endl; 41 46 FitsOutFile fios(flnm); 42 fios.firstImageOnPrimaryHeader(); 47 fios.firstImageOnPrimaryHeader(imgonph); 48 43 49 cout << " Creating Matrix m " << endl; 44 50 Matrix m(50,70); 45 51 m = RegularSequence(35., 0.2); 52 m.Info()["SVERSION"] = SophyaVersion(); 53 m.Info().SetComment("SVERSIO", "Sophya Version"); 54 m.Info()["OBJ_FITS"] = "Test Matrix" ; 46 55 cout << m << endl; 47 56
Note:
See TracChangeset
for help on using the changeset viewer.