Changeset 12740
- Timestamp:
- 12/22/11 16:23:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fitsdump.cc
r12729 r12740 630 630 631 631 int row = 0; 632 long UTCvalue0=0; 633 long UTCvalue1=0; 632 634 while (fFile->GetNextRow() && row < numRows) 633 635 { … … 664 666 ; 665 667 } 666 if ( !fNoZeroPlease || cValue != 0)668 if (list.size() == 1 && list[0] == "UnixTimeUTC") 667 669 { 668 statsIt->average += cValue; 669 if (cValue < statsIt->min) 670 statsIt->min = cValue; 671 if (cValue > statsIt->max) 672 statsIt->max = cValue; 673 statsIt->numValues++; 670 if (i==0) 671 { 672 UTCvalue0 = cValue; 673 } 674 else 675 { 676 UTCvalue1 = cValue; 677 boost::posix_time::ptime unixTimeT( boost::gregorian::date(1970, boost::gregorian::Jan, 1), 678 boost::posix_time::seconds(UTCvalue0) + boost::posix_time::microsec(UTCvalue1)); 679 680 Time mjdTime(unixTimeT); 681 cValue = mjdTime.Mjd(); 682 if (!fNoZeroPlease || cValue != 0) 683 { 684 statsIt->average += cValue; 685 if (cValue < statsIt->min) 686 statsIt->min = cValue; 687 if (cValue > statsIt->max) 688 statsIt->max = cValue; 689 statsIt->numValues++; 690 } 691 } 692 } 693 else { 694 if (!fNoZeroPlease || cValue != 0) 695 { 696 statsIt->average += cValue; 697 if (cValue < statsIt->min) 698 statsIt->min = cValue; 699 if (cValue > statsIt->max) 700 statsIt->max = cValue; 701 statsIt->numValues++; 702 } 674 703 } 675 704 }
Note:
See TracChangeset
for help on using the changeset viewer.