Changeset 13998 for trunk/Mars/mcore
- Timestamp:
- 05/31/12 15:32:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/ofits.h
r13987 r13998 608 608 h.SetInt ("NAXIS", 0, "number of data axes"); 609 609 h.SetBool("EXTEND", true, "FITS dataset may contain extensions"); 610 h.SetStr ("CHECKSUM"," 4AcB48bA4AbA45bA", "Checksum for the whole HDU");610 h.SetStr ("CHECKSUM","0000000000000000", "Checksum for the whole HDU"); 611 611 h.SetStr ("DATASUM", " 0", "Checksum for the data block"); 612 612 h.AddComment("FITS (Flexible Image Transport System) format is defined in 'Astronomy"); … … 614 614 h.End(); 615 615 616 return h.WriteHeader(*this); 616 Checksum sum = h.WriteHeader(*this); 617 size_t offset = tellp(); 618 h.SetStr("CHECKSUM", sum.str()); 619 //header gets updated here. cannot direcly return this otherwise 620 //1. wrong checksum would be returned (does not matter... now) 621 //2. cannot restore the correct location of the file's cursor 622 h.WriteHeader(*this); 623 seekp(offset); 624 return sum; 617 625 } 618 626
Note:
See TracChangeset
for help on using the changeset viewer.