- Timestamp:
- 07/25/11 14:57:22 (13 years ago)
- Location:
- branches/parallel
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/parallel
- Property svn:mergeinfo changed
/trunk merged: 2209,2242-2243
- Property svn:mergeinfo changed
-
branches/parallel/Makefile
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/parallel/SConstruct
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/parallel/apps
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/parallel/external-alma
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/parallel/external-alma/atnf/pks/pks_maths.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/parallel/getsvnrev.sh
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/parallel/python
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/parallel/python/flagtoolbar.py
- Property svn:mergeinfo changed
/trunk/python/flagtoolbar.py merged: 2209,2242-2243
- Property svn:mergeinfo changed
-
branches/parallel/src
- Property svn:mergeinfo changed
/trunk/src merged: 2209,2242-2243
- Property svn:mergeinfo changed
-
branches/parallel/src/FillerBase.cpp
r1876 r2247 12 12 13 13 #include <casa/Containers/RecordField.h> 14 #include <tables/Tables/ExprNode.h> 14 15 15 16 #include "FillerBase.h" … … 176 177 } 177 178 179 void FillerBase::setWeather2(Float temperature, 180 Float pressure, 181 Float humidity, 182 Float windspeed, 183 Float windaz) 184 { 185 uInt id ; 186 Table tab = table_->weather().table() ; 187 Table subt = tab( tab.col("TEMPERATURE") == temperature \ 188 && tab.col("PRESSURE") == pressure \ 189 && tab.col("HUMIDITY") == humidity \ 190 && tab.col("WINDSPEED") == windspeed \ 191 && tab.col("WINDAZ") == windaz, 1 ) ; 192 Int nrow = tab.nrow() ; 193 Int nrowSel = subt.nrow() ; 194 if ( nrowSel == 0 ) { 195 tab.addRow( 1, True ) ; 196 TableRow row( tab ) ; 197 TableRecord &rec = row.record() ; 198 RecordFieldPtr<casa::uInt> rfpi ; 199 rfpi.attachToRecord( rec, "ID" ) ; 200 *rfpi = (uInt)nrow ; 201 RecordFieldPtr<casa::Float> rfp ; 202 rfp.attachToRecord( rec, "TEMPERATURE" ) ; 203 *rfp = temperature ; 204 rfp.attachToRecord( rec, "PRESSURE" ) ; 205 *rfp = pressure ; 206 rfp.attachToRecord( rec, "HUMIDITY" ) ; 207 *rfp = humidity ; 208 rfp.attachToRecord( rec, "WINDSPEED" ) ; 209 *rfp = windspeed ; 210 rfp.attachToRecord( rec, "WINDAZ" ) ; 211 *rfp = windaz ; 212 row.put( nrow, rec ) ; 213 id = (uInt)nrow ; 214 } 215 else { 216 ROTableColumn tc( subt, "ID" ) ; 217 id = tc.asuInt( 0 ) ; 218 } 219 RecordFieldPtr<uInt> mweatheridCol(row_.record(), "WEATHER_ID"); 220 *mweatheridCol = id; 221 } 222 223 void FillerBase::setTcal2(const String& tcaltime, 224 const Vector<Float>& tcal) 225 { 226 uInt id = 0 ; 227 Table tab = table_->tcal().table() ; 228 Table result = 229 //tab( nelements(tab.col("TCAL")) == uInt (tcal.size()) && 230 // all(tab.col("TCAL")== tcal) && 231 // tab.col("TIME") == tcaltime, 1 ) ; 232 tab( nelements(tab.col("TCAL")) == uInt (tcal.size()) && 233 all(tab.col("TCAL")== tcal), 1 ) ; 234 235 if ( result.nrow() > 0 ) { 236 ROTableColumn tmpCol( result, "ID" ) ; 237 tmpCol.getScalar( 0, id ) ; 238 } 239 else { 240 uInt rno = tab.nrow(); 241 tab.addRow(); 242 TableColumn idCol( tab, "ID" ) ; 243 TableColumn tctimeCol( tab, "TIME" ) ; 244 ArrayColumn<Float> tcalCol( tab, "TCAL" ) ; 245 // get last assigned _id and increment 246 if ( rno > 0 ) { 247 idCol.getScalar(rno-1, id); 248 id++; 249 } 250 tctimeCol.putScalar(rno, tcaltime); 251 tcalCol.put(rno, tcal); 252 idCol.putScalar(rno, id); 253 } 254 255 RecordFieldPtr<uInt> mcalidCol(row_.record(), "TCAL_ID"); 256 *mcalidCol = id; 257 } 258 178 259 }; -
branches/parallel/src/FillerBase.h
r1904 r2247 77 77 casa::Float windspeed=0.0f, 78 78 casa::Float windaz=0.0f); 79 void setWeather2(casa::Float temperature=0.0f, 80 casa::Float pressure=0.0f, 81 casa::Float humidity=0.0f, 82 casa::Float windspeed=0.0f, 83 casa::Float windaz=0.0f); 79 84 void setTcal(const casa::String& caltime="", 85 const casa::Vector<casa::Float>& tcal=casa::Vector<casa::Float>()); 86 void setTcal2(const casa::String& caltime="", 80 87 const casa::Vector<casa::Float>& tcal=casa::Vector<casa::Float>()); 81 88 void setScanRate(const casa::Vector<casa::Double>& srate=casa::Vector<casa::Double>()); -
branches/parallel/src/SConscript
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/parallel/src/STFit.cpp
r1932 r2247 90 90 // replace 91 91 if ( id > -1 ) { 92 Table t = table_(table_.col("ID") == id );92 Table t = table_(table_.col("ID") == id, 1 ); 93 93 if (t.nrow() > 0) { 94 94 rno = t.rowNumbers(table_)[0]; … … 129 129 void STFit::getEntry( STFitEntry& fit, uInt id ) const 130 130 { 131 Table t = table_(table_.col("ID") == Int(id) );131 Table t = table_(table_.col("ID") == Int(id), 1 ); 132 132 if (t.nrow() == 0 ) { 133 133 throw(AipsError("STFit::getEntry - id out of range")); -
branches/parallel/src/STFocus.cpp
r1587 r2247 106 106 && near(table_.col("MOUNT"), mount) 107 107 && near(table_.col("XYPHASE"), xyphase) 108 && near(table_.col("XYPHASEOFFSET"), xyphaseoffset) 108 && near(table_.col("XYPHASEOFFSET"), xyphaseoffset), 1 109 109 ); 110 110 uInt resultid = 0; … … 139 139 uInt id) const 140 140 { 141 Table t = table_(table_.col("ID") == Int(id) );141 Table t = table_(table_.col("ID") == Int(id), 1 ); 142 142 if (t.nrow() == 0 ) { 143 143 throw(AipsError("STFocus::getEntry - id out of range")); … … 161 161 { 162 162 Float total = 0.0f; 163 Table t = table_(table_.col("ID") == Int(id) );163 Table t = table_(table_.col("ID") == Int(id), 1 ); 164 164 if (t.nrow() == 0 ) { 165 165 throw(AipsError("STFocus::getTotalAngle - id out of range")); … … 181 181 casa::Float STFocus::getFeedHand( casa::uInt id ) const 182 182 { 183 Table t = table_(table_.col("ID") == Int(id) );183 Table t = table_(table_.col("ID") == Int(id), 1 ); 184 184 if (t.nrow() == 0 ) { 185 185 throw(AipsError("STFocus::getEntry - id out of range")); -
branches/parallel/src/STFrequencies.cpp
r1819 r2247 88 88 // test if this already exists 89 89 Table result = table_( near(table_.col("REFVAL"), refval) 90 && near(table_.col("REFPIX"), refpix)91 && near(table_.col("INCREMENT"), inc));90 && near(table_.col("REFPIX"), refpix) 91 && near(table_.col("INCREMENT"), inc), 1 ); 92 92 uInt resultid = 0; 93 93 if ( result.nrow() > 0) { … … 116 116 uInt id ) 117 117 { 118 Table t = table_(table_.col("ID") == Int(id) );118 Table t = table_(table_.col("ID") == Int(id), 1 ); 119 119 if (t.nrow() == 0 ) { 120 120 throw(AipsError("STFrequencies::getEntry - freqID out of range")); … … 130 130 void STFrequencies::setEntry( Double refpix, Double refval, Double inc, uInt id ) 131 131 { 132 Table t = table_(table_.col("ID") == Int(id) );132 Table t = table_(table_.col("ID") == Int(id), 1 ); 133 133 if (t.nrow() == 0 ) { 134 134 throw(AipsError("STFrequencies::getEntry - freqID out of range")); … … 147 147 SpectralCoordinate STFrequencies::getSpectralCoordinate( uInt id ) const 148 148 { 149 Table t = table_(table_.col("ID") == Int(id) );149 Table t = table_(table_.col("ID") == Int(id), 1 ); 150 150 151 151 if (t.nrow() == 0 ) { … … 309 309 ostringstream oss; 310 310 if ( id < 0 ) t = table_; 311 else t = table_(table_.col("ID") == Int(id) );311 else t = table_(table_.col("ID") == Int(id), 1 ); 312 312 ROTableRow row(t); 313 313 for (uInt i=0; i<t.nrow(); ++i) { … … 337 337 float STFrequencies::getRefFreq( uInt id, uInt channel ) 338 338 { 339 Table t = table_(table_.col("ID") == Int(id) );339 Table t = table_(table_.col("ID") == Int(id), 1 ); 340 340 if ( t.nrow() == 0 ) throw(AipsError("Selected Illegal frequency id")); 341 341 ROTableRow row(t); … … 441 441 void STFrequencies::shiftRefPix(int npix, uInt id) 442 442 { 443 Table t = table_(table_.col("ID") == Int(id) );443 Table t = table_(table_.col("ID") == Int(id), 1 ); 444 444 if ( t.nrow() == 0 ) throw(AipsError("Selected Illegal frequency id")); 445 445 ScalarColumn<Double> tcol(t, "REFPIX"); -
branches/parallel/src/STHistory.cpp
r860 r2247 71 71 void asap::STHistory::getEntry( String& item, uInt id) 72 72 { 73 Table t = table_(table_.col("ID") == Int(id) );73 Table t = table_(table_.col("ID") == Int(id), 1 ); 74 74 if (t.nrow() == 0 ) { 75 75 throw(AipsError("STHistory::getEntry - id out of range")); -
branches/parallel/src/STMolecules.cpp
r1819 r2247 108 108 Table result = 109 109 table_( nelements(table_.col("RESTFREQUENCY")) == uInt (restfreq.size()) && 110 all(table_.col("RESTFREQUENCY")== restfreq) );110 all(table_.col("RESTFREQUENCY")== restfreq), 1 ); 111 111 uInt resultid = 0; 112 112 if ( result.nrow() > 0) { … … 152 152 Vector<String>& formattedname, uInt id ) const 153 153 { 154 Table t = table_(table_.col("ID") == Int(id) );154 Table t = table_(table_.col("ID") == Int(id), 1 ); 155 155 if (t.nrow() == 0 ) { 156 156 throw(AipsError("STMolecules::getEntry - id out of range")); … … 182 182 { 183 183 std::vector<double> out; 184 Table t = table_(table_.col("ID") == Int(id) );184 Table t = table_(table_.col("ID") == Int(id), 1 ); 185 185 if (t.nrow() == 0 ) { 186 186 throw(AipsError("STMolecules::getRestFrequency - id out of range")); -
branches/parallel/src/STWeather.cpp
r1481 r2247 110 110 uInt id ) const 111 111 { 112 Table t = table_(table_.col("ID") == Int(id) );112 Table t = table_(table_.col("ID") == Int(id), 1 ); 113 113 if (t.nrow() == 0 ) { 114 114 throw(AipsError("STWeather::getEntry - id out of range"));
Note:
See TracChangeset
for help on using the changeset viewer.