Changeset 2532
- Timestamp:
- 05/16/12 14:20:11 (13 years ago)
- Location:
- branches/hpc33/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/hpc33/src/STMath.cpp
r2524 r2532 4510 4510 } 4511 4511 4512 vector<float> STMath::getSpectrumFromTime( double reftime, 4512 vector<float> STMath::getSpectrumFromTime( double reftime, 4513 Vector<Double> &timeVec, 4513 4514 CountedPtr<Scantable>& s, 4514 4515 string mode ) … … 4526 4527 } 4527 4528 else { 4528 ROScalarColumn<Double> timeCol( s->table(), "TIME" ) ;4529 Vector<Double> timeVec = timeCol.getColumn() ;4529 //ROScalarColumn<Double> timeCol( s->table(), "TIME" ) ; 4530 //Vector<Double> timeVec = timeCol.getColumn() ; 4530 4531 vector<int> idx = getRowIdFromTime( reftime, timeVec ) ; 4531 4532 if ( mode == "before" ) { … … 5066 5067 { 5067 5068 // string reftime = on->getTime( index ) ; 5068 ROTableColumn timeCol( on->table(), "TIME" ) ; 5069 ROScalarColumn<Double> timeCol( off->table(), "TIME" ) ; 5070 Vector<Double> timeVec = timeCol.getColumn() ; 5071 //ROTableColumn timeCol( on->table(), "TIME" ) ; 5072 timeCol.attach( on->table(), "TIME" ) ; 5069 5073 double reftime = timeCol.asdouble(index) ; 5070 5074 vector<int> ii( 1, on->getIF( index ) ) ; … … 5076 5080 sel.setPolarizations( ip ) ; 5077 5081 off->setSelection( sel ) ; 5078 vector<float> spoff = getSpectrumFromTime( reftime, off, "linear" ) ;5082 vector<float> spoff = getSpectrumFromTime( reftime, timeVec, off, "linear" ) ; 5079 5083 vector<float> spec = on->getSpectrum( index ) ; 5080 5084 //vector<float> tcal = getTcalFromTime( reftime, sky, "linear" ) ; … … 5109 5113 { 5110 5114 // string reftime = on->getTime( index ) ; 5111 ROTableColumn timeCol( on->table(), "TIME" ) ; 5115 ROScalarColumn<Double> timeCol( off->table(), "TIME" ) ; 5116 Vector<Double> timeVec = timeCol.getColumn() ; 5117 //ROTableColumn timeCol( on->table(), "TIME" ) ; 5118 timeCol.attach( on->table(), "TIME" ) ; 5112 5119 ArrayColumn<Float> tsysCol( on->table(), "TSYS" ) ; 5113 5120 vector<float> sp( on->nchan( on->getIF(0) ) ) ; … … 5115 5122 for ( int index = 0 ; index < on->nrow() ; index++ ) { 5116 5123 double reftime = timeCol.asdouble(index) ; 5117 vector<float> spoff = getSpectrumFromTime( reftime, off, "linear" ) ;5124 vector<float> spoff = getSpectrumFromTime( reftime, timeVec, off, "linear" ) ; 5118 5125 vector<float> spec = on->getSpectrum( index ) ; 5119 5126 Vector<Float> tsys = tsysCol( index ) ; … … 5142 5149 { 5143 5150 // string reftime = on->getTime( index ) ; 5144 ROTableColumn timeCol( on->table(), "TIME" ) ; 5151 ROScalarColumn<Double> timeCol( off->table(), "TIME" ) ; 5152 Vector<Double> timeVec = timeCol.getColumn() ; 5153 //ROTableColumn timeCol( on->table(), "TIME" ) ; 5154 timeCol.attach( on->table(), "TIME" ) ; 5145 5155 ArrayColumn<Float> tsysCol( on->table(), "TSYS" ) ; 5146 5156 vector<float> sp( on->nchan( on->getIF(rows[0]) ) ) ; … … 5152 5162 //double reftime = timeCol.asdouble(index) ; 5153 5163 double reftime = timeCol.asdouble(*p) ; 5154 vector<float> spoff = getSpectrumFromTime( reftime, off, "linear" ) ;5164 vector<float> spoff = getSpectrumFromTime( reftime, timeVec, off, "linear" ) ; 5155 5165 //vector<float> spec = on->getSpectrum( index ) ; 5156 5166 //Vector<Float> tsys = tsysCol( index ) ; -
branches/hpc33/src/STMath.h
r2519 r2532 403 403 404 404 vector<float> getSpectrumFromTime( string reftime, casa::CountedPtr<Scantable>& s, string mode = "before" ) ; 405 vector<float> getSpectrumFromTime( double reftime, casa:: CountedPtr<Scantable>& s, string mode = "before" ) ;405 vector<float> getSpectrumFromTime( double reftime, casa::Vector<casa::Double> &v, casa::CountedPtr<Scantable>& s, string mode = "before" ) ; 406 406 vector<float> getTcalFromTime( string reftime, casa::CountedPtr<Scantable>& s, string mode="before" ) ; 407 407 vector<float> getTsysFromTime( string reftime, casa::CountedPtr<Scantable>& s, string mode="before" ) ;
Note:
See TracChangeset
for help on using the changeset viewer.