Changeset 1321
- Timestamp:
- 03/06/07 14:30:28 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STMath.cpp
r1319 r1321 406 406 const TableRecord& rec = row.get(i); 407 407 Double ontime = rec.asDouble("TIME"); 408 ROScalarColumn<Double> offtimeCol(offs, "TIME"); 408 Table presel = offs(offs.col("BEAMNO") == Int(rec.asuInt("BEAMNO")) 409 && offs.col("IFNO") == Int(rec.asuInt("IFNO")) 410 && offs.col("POLNO") == Int(rec.asuInt("POLNO")) ); 411 ROScalarColumn<Double> offtimeCol(presel, "TIME"); 412 409 413 Double mindeltat = min(abs(offtimeCol.getColumn() - ontime)); 410 414 // Timestamp may vary within a cycle ???!!! 411 // increase this by 0. 5sec in case of rounding errors...415 // increase this by 0.01 sec in case of rounding errors... 412 416 // There might be a better way to do this. 413 mindeltat += 0.5; 414 Table sel = offs( abs(offs.col("TIME")-ontime) <= (mindeltat+0.5) 415 && offs.col("BEAMNO") == Int(rec.asuInt("BEAMNO")) 416 && offs.col("IFNO") == Int(rec.asuInt("IFNO")) 417 && offs.col("POLNO") == Int(rec.asuInt("POLNO")) ); 417 // fix to this fix. TIME is MJD, so 1.0d not 1.0s 418 mindeltat += 0.01/24./60./60.; 419 Table sel = presel( abs(presel.col("TIME")-ontime) <= mindeltat); 418 420 419 421 if ( sel.nrow() < 1 ) {
Note:
See TracChangeset
for help on using the changeset viewer.