Changeset 410
- Timestamp:
- 02/11/05 12:49:04 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMath.cc
r397 r410 167 167 ROScalarColumn<Double> intCol; 168 168 ROArrayColumn<uInt> fqIDCol; 169 ROScalarColumn<Int> scanIDCol; 169 170 170 171 // Create accumulation MaskedArray. We accumulate for each channel,if,pol,beam … … 252 253 intCol.attach(tabIn, "INTERVAL"); 253 254 fqIDCol.attach(tabIn, "FREQID"); 255 scanIDCol.attach(tabIn, "SCANID"); 256 257 // Find list of start/end rows for each scan 254 258 255 259 // Loop over rows in Table … … 268 272 // frequency setup and warn if averaging across them 269 273 270 // Get copy of Scan Container for this row 271 272 SDContainer sc = in[iTab]->getSDContainer(iRow); 273 scanID = sc.scanid; 274 scanIDCol.getScalar(iRow, scanID); 274 275 275 276 // Get quantities from columns … … 300 301 normalize(sum, sumSq, nPts, wtType, asap::ChanAxis, nAxesSub); 301 302 303 // Get ScanContainer for the first row of this averaged Scan 304 305 SDContainer scOut = in[iTab]->getSDContainer(rowStart); 306 302 307 // Fill scan container. The source and freqID come from the 303 308 // first row of the first table that went into this average ( … … 305 310 306 311 Float nR(nAccum); 307 fillSDC(sc , sum.getMask(), sum.getArray(), tSysSum/nR, outScanID,312 fillSDC(scOut, sum.getMask(), sum.getArray(), tSysSum/nR, outScanID, 308 313 timeSum/nR, intSum, sourceNameStart, freqIDStart); 309 314 310 315 // Write container out to Table 311 316 312 pTabOut->putSDContainer(sc );317 pTabOut->putSDContainer(scOut); 313 318 314 319 // Reset accumulators … … 351 356 // 352 357 // Normalize data in 'sum' accumulation array according to weighting scheme 358 353 359 normalize(sum, sumSq, nPts, wtType, asap::ChanAxis, nAxesSub); 354 360 … … 358 364 359 365 Float nR(nAccum); 360 SDContainer sc = in[tableStart]->getSDContainer(rowStart);361 fillSDC(sc , sum.getMask(), sum.getArray(), tSysSum/nR, outScanID,366 SDContainer scOut = in[tableStart]->getSDContainer(rowStart); 367 fillSDC(scOut, sum.getMask(), sum.getArray(), tSysSum/nR, outScanID, 362 368 timeSum/nR, intSum, sourceNameStart, freqIDStart); 363 pTabOut->putSDContainer(sc );369 pTabOut->putSDContainer(scOut); 364 370 pTabOut->resetCursor(); 365 371 //
Note:
See TracChangeset
for help on using the changeset viewer.