Changeset 2958
- Timestamp:
- 06/26/14 18:08:46 (11 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STCalSkyTable.h
r2955 r2958 57 57 casa::Vector<casa::Float> getElevation() {return elCol_.getColumn();} 58 58 casa::Matrix<casa::Float> getSpectra() {return spectraCol_.getColumn();} 59 casa::Matrix<casa::uChar> getFlagtra() {return flagtraCol_.getColumn();} 59 60 casa::uInt nchan(casa::uInt ifno); 60 61 -
trunk/src/STCalTsys.cpp
r2955 r2958 91 91 size_t end = std::min((size_t)channel_range[i] + 1, averaged_data.size()); 92 92 os << LogIO::DEBUGGING << "start=" << start << ", end=" << end << LogIO::POST; 93 //Vector<Float> segment = any_data(Slice(start, end - 1, 1, False));94 //averaged_value += sum(segment);95 //num_value += segment.size();96 93 float sum_per_segment = 0.0; 94 size_t count = 0; 97 95 for (size_t j = start; j < end; ++j) { 98 sum_per_segment += any_data[j]; 96 if (channel_flag[j] == 0) { 97 sum_per_segment += any_data[j]; 98 count += 1; 99 } 99 100 } 100 101 averaged_value += sum_per_segment; 101 num_value += end - start;102 num_value += count; 102 103 } 103 104 averaged_value /= (Float)num_value; -
trunk/src/STCalTsysTable.h
r2955 r2958 55 55 casa::Vector<casa::Float> getElevation() {return elCol_.getColumn();} 56 56 casa::Matrix<casa::Float> getTsys() {return tsysCol_.getColumn();} 57 casa::Matrix<casa::uChar> getFlagtra() {return flagtraCol_.getColumn();} 57 58 casa::uInt nchan(casa::uInt ifno); 58 59 -
trunk/src/STCalibration.cpp
r2955 r2958 58 58 ROArrayColumn<uChar> flagCol(scantable_->table(), "FLAGTRA"); 59 59 ROScalarColumn<uInt> freqidCol(scantable_->table(), "FREQ_ID"); 60 ROScalarColumn<uInt> flagrowCol(scantable_->table(), "FLAGROW"); 61 Vector<uInt> flagrow = flagrowCol.getColumn(); 60 62 61 63 // dummy Tsys: the following process doesn't need Tsys but RowAccumulator … … 78 80 else if (len == 1) { 79 81 uInt irow = rows[0]; 80 appenddata(0, 0, current.asuInt("BEAMNO"), current.asuInt("IFNO"), current.asuInt("POLNO"), 81 freqidCol(irow), timeSec[irow], elevation[irow], specCol(irow), 82 flagCol(irow)); 82 if (flagrow[irow] == 0) { 83 appenddata(0, 0, current.asuInt("BEAMNO"), current.asuInt("IFNO"), current.asuInt("POLNO"), 84 freqidCol(irow), timeSec[irow], elevation[irow], specCol(irow), 85 flagCol(irow)); 86 } 83 87 iter.next(); 84 88 continue; … … 107 111 convertArray(bflag, flag); 108 112 specCol.get(irow, spec); 109 if ( !allEQ(bflag,True) )113 if ( !allEQ(bflag,True) && flagrow[irow] == 0 ) 110 114 acc.add( spec, !bflag, tsys, intervalSec[irow], timeSec[irow] ) ; 111 115 timeCen += timeSec[irow]; … … 131 135 const uChar userFlag = 1 << 7; 132 136 for (uInt k = 0; k < flag.nelements(); ++k) { 133 if (mask[k] == True)137 if (mask[k] == False) 134 138 flag[k] = userFlag; 135 139 }
Note:
See TracChangeset
for help on using the changeset viewer.