Changeset 13987 for trunk/Mars/mcore/ofits.h
- Timestamp:
- 05/30/12 16:36:39 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/ofits.h
r13115 r13987 326 326 SetInt("TFIELDS", 0, "number of fields in each row"); 327 327 SetStr("EXTNAME", "", "name of extension table"); 328 SetStr("CHECKSUM", " {0000000000000000}", "Checksum for the whole file");329 Set Int("DATASUM", 0, "Checksum for the data block");328 SetStr("CHECKSUM", "0000000000000000", "Checksum for the whole HDU"); 329 SetStr("DATASUM", " 0", "Checksum for the data block"); 330 330 331 331 ofstream::open(filename); … … 608 608 h.SetInt ("NAXIS", 0, "number of data axes"); 609 609 h.SetBool("EXTEND", true, "FITS dataset may contain extensions"); 610 610 h.SetStr ("CHECKSUM","4AcB48bA4AbA45bA", "Checksum for the whole HDU"); 611 h.SetStr ("DATASUM", " 0", "Checksum for the data block"); 611 612 h.AddComment("FITS (Flexible Image Transport System) format is defined in 'Astronomy"); 612 613 h.AddComment("and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H"); … … 733 734 if (tellp()%(80*36)>0) 734 735 { 735 //cout << "fill" << endl;736 736 const vector<char> filler(80*36-tellp()%(80*36)); 737 737 write(filler.data(), filler.size()); 738 738 } 739 739 740 // We don't hav eto jump back to the end of the file740 // We don't have to jump back to the end of the file 741 741 SetInt("NAXIS2", fTable.num_rows); 742 SetInt("DATASUM", fDataSum.val()); 742 743 ostringstream dataSumStr; 744 dataSumStr << fDataSum.val(); 745 SetStr("DATASUM", dataSumStr.str()); 743 746 744 747 const Checksum sum = WriteHeader(); 748 745 749 //sum += headersum; 746 750 747 SetStr("CHECKSUM", "{"+(sum+fDataSum).str()+"}");751 SetStr("CHECKSUM", (sum+fDataSum).str()); 748 752 749 753 const Checksum chk = WriteHeader();
Note:
See TracChangeset
for help on using the changeset viewer.