- Timestamp:
- 01/19/05 13:26:20 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.cc
r206 r212 365 365 tme.get(whichRow,obstime); 366 366 MVEpoch tm2(Quantum<Double>(obstime, Unit(String("d")))); 367 MEpoch::Types met; 368 String ep; 369 table_.keywordSet().get("Epoch",ep); 370 if (!MEpoch::getType(met, ep)) { 371 cerr << "Epoch type uknown - using UTC" << endl; 372 met = MEpoch::UTC; 373 } 374 367 MEpoch::Types met = getTimeReference(); 375 368 MEpoch epoch(tm2, met); 376 369 … … 608 601 MDirection SDMemTable::getDirection(Int whichRow) const 609 602 { 610 Float eq; 611 table_.keywordSet().get("Equinox",eq); 612 std::map<float,string> mp; 613 mp[2000.0] = "J2000"; 614 mp[1950.0] = "B1950"; 615 MDirection::Types mdr; 616 if (!MDirection::getType(mdr, mp[eq])) { 617 mdr = MDirection::J2000; 618 cerr << "Unknown equinox using J2000" << endl; 619 } 603 MDirection::Types mdr = getDirectionReference(); 620 604 ROArrayColumn<Double> dir(table_, "DIRECTION"); 621 605 Array<Double> posit; … … 1062 1046 spec.put(whichRow, arr); 1063 1047 } 1048 1049 MDirection::Types SDMemTable::getDirectionReference () const 1050 { 1051 Float eq; 1052 table_.keywordSet().get("Equinox",eq); 1053 std::map<float,string> mp; 1054 mp[2000.0] = "J2000"; 1055 mp[1950.0] = "B1950"; 1056 MDirection::Types mdr; 1057 if (!MDirection::getType(mdr, mp[eq])) { 1058 mdr = MDirection::J2000; 1059 cerr << "Unknown equinox using J2000" << endl; 1060 } 1061 // 1062 return mdr; 1063 } 1064 1065 MEpoch::Types SDMemTable::getTimeReference () const 1066 { 1067 MEpoch::Types met; 1068 String ep; 1069 table_.keywordSet().get("Epoch",ep); 1070 if (!MEpoch::getType(met, ep)) { 1071 cerr << "Epoch type uknown - using UTC" << endl; 1072 met = MEpoch::UTC; 1073 } 1074 // 1075 return met; 1076 } 1077 -
trunk/src/SDMemTable.h
r206 r212 162 162 std::vector<double> getAbcissa(int whichRow=0) const; 163 163 std::string getAbcissaString(casa::Int whichRow=0) const; 164 164 165 // Get MDirection for this row 165 166 casa::MDirection getDirection(casa::Int whichRow=0) const; 167 168 // Get gloabl Direction reference 169 casa::MDirection::Types getDirectionReference () const; 170 171 // Get global Time reference 172 casa::MEpoch::Types getTimeReference () const; 166 173 167 174 private:
Note:
See TracChangeset
for help on using the changeset viewer.