Changeset 1603 for branches/alma/src/Scantable.cpp
- Timestamp:
- 07/18/09 06:35:47 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/src/Scantable.cpp
r1451 r1603 213 213 td.addColumn(ScalarColumnDesc<String>("SRCNAME")); 214 214 // Type of source (on=0, off=1, other=-1) 215 td.addColumn(ScalarColumnDesc<Int>("SRCTYPE", Int(-1))); 215 ScalarColumnDesc<Int> stypeColumn("SRCTYPE"); 216 stypeColumn.setDefault(Int(-1)); 217 td.addColumn(stypeColumn); 216 218 td.addColumn(ScalarColumnDesc<String>("FIELDNAME")); 217 219 … … 535 537 return int(n); 536 538 } else { 537 // take the first SCANNO,POLNO,BEAMNO,CYCLENO as nbeam shouldn't vary with these 539 // take the first SCANNO,POLNO,BEAMNO,CYCLENO as nbeam shouldn't 540 // vary with these 538 541 Table t = table_(table_.col("IFNO") == ifno); 539 542 if ( t.nrow() == 0 ) return 0; … … 885 888 } 886 889 890 MEpoch Scantable::getEpoch(int whichrow) const 891 { 892 if (whichrow > -1) { 893 return timeCol_(uInt(whichrow)); 894 } else { 895 Double tm; 896 table_.keywordSet().get("UTC",tm); 897 return MEpoch(MVEpoch(tm)); 898 } 899 } 900 887 901 std::string Scantable::getDirectionString(int whichrow) const 888 902 { … … 892 906 std::vector< double > Scantable::getAbcissa( int whichrow ) const 893 907 { 894 if ( whichrow > int(table_.nrow()) ) throw(AipsError("Illegal ro number"));908 if ( whichrow > int(table_.nrow()) ) throw(AipsError("Illegal row number")); 895 909 std::vector<double> stlout; 896 910 int nchan = specCol_(whichrow).nelements();
Note: See TracChangeset
for help on using the changeset viewer.