- Timestamp:
- 08/24/12 10:52:04 (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/hpc34 (added) merged: 2588-2590,2592,2596-2598,2601,2640,2642
- Property svn:mergeinfo changed
-
trunk/src
- Property svn:mergeinfo changed
/branches/hpc34/src (added) merged: 2589,2592,2597,2601,2640
- Property svn:mergeinfo changed
-
trunk/src/FillerWrapper.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/src/MSWriter.cpp
r2585 r2643 950 950 { 951 951 uInt nrow = potab.nrow() ; 952 potab.addRow( 1, True) ;952 potab.addRow() ; 953 953 954 954 *poNumPolyRF = dir.ncolumn() - 1 ; … … 995 995 { 996 996 Int idx = -1 ; 997 uInt n Entry = ddEntry.nrow();998 Vector<Int> key( 2) ;999 key[0] = pid;1000 key[1] = sid;997 uInt nItem = 2 ; 998 uInt len = ddEntry.nelements() ; 999 uInt nEntry = len / nItem ; 1000 const Int *dd_p = ddEntry.storage() ; 1001 1001 for ( uInt i = 0 ; i < nEntry ; i++ ) { 1002 if ( allEQ( ddEntry.row(i), key ) ) { 1002 Int pol = *dd_p ; 1003 dd_p++ ; 1004 Int spw = *dd_p ; 1005 dd_p++ ; 1006 if ( pid == pol && sid == spw ) { 1003 1007 idx = i ; 1004 1008 break ; … … 1016 1020 idx = nrow ; 1017 1021 1018 ddEntry.resize( nEntry+1, 2, True ) ; 1019 ddEntry.row(nEntry) = key ; 1022 ddEntry.resize( len+nItem ) ; 1023 ddEntry[len] = pid ; 1024 ddEntry[len+1] = sid ; 1020 1025 } 1021 1026 … … 1050 1055 } 1051 1056 processedFreqId[fid] = True ; 1057 } 1058 else { 1059 return ; 1052 1060 } 1053 1061 … … 1085 1093 { 1086 1094 Int idx = -1 ; 1087 uInt n Entry = feedEntry.nrow();1088 Vector<Int> key( 2) ;1089 key[0] = fid;1090 key[1] = sid;1095 uInt nItem = 2 ; 1096 uInt len = feedEntry.nelements() ; 1097 uInt nEntry = len / nItem ; 1098 const Int *fe_p = feedEntry.storage() ; 1091 1099 for ( uInt i = 0 ; i < nEntry ; i++ ) { 1092 if ( allEQ( feedEntry.row(i), key ) ) { 1100 Int feed = *fe_p ; 1101 fe_p++ ; 1102 Int spw = *fe_p ; 1103 fe_p++ ; 1104 if ( fid == feed && sid == spw ) { 1093 1105 idx = i ; 1094 1106 break ; 1095 1107 } 1096 1108 } 1109 1097 1110 1098 1111 if ( idx == -1 ) { … … 1131 1144 tr.put( nrow ) ; 1132 1145 1133 feedEntry.resize( nEntry+1, 2, True ) ; 1134 feedEntry.row( nEntry ) = key ; 1146 feedEntry.resize( len+nItem ) ; 1147 feedEntry[len] = fid ; 1148 feedEntry[len+1] = sid ; 1135 1149 } 1136 1150 } … … 1445 1459 1446 1460 Vector<String> stateEntry; 1447 Matrix<Int> ddEntry;1448 Matrix<Int> feedEntry;1461 Block<Int> ddEntry; 1462 Block<Int> feedEntry; 1449 1463 vector< Vector<Int> > polEntry; 1450 1464 map<uInt,Bool> processedFreqId; … … 2052 2066 //double endSec = mathutil::gettimeofday_sec() ; 2053 2067 //os_ << "end MSWriter::write() endSec=" << endSec << " (" << endSec-startSec << "sec)" << LogIO::POST ; 2068 2069 os_ << "Exported data as MS" << LogIO::POST ; 2054 2070 2055 2071 return True ; -
trunk/src/SConscript
- Property svn:mergeinfo changed (with no actual effect on merging)
-
trunk/src/STMath.cpp
r2612 r2643 2503 2503 ArrayColumn<Float> specCol(tab, "SPECTRA"); 2504 2504 ArrayColumn<uChar> flagCol(tab, "FLAGTRA"); 2505 Vector<Float> tmpspec; specCol.get(0, tmpspec);2506 uInt nchan = tmpspec.nelements();2505 Vector<Float> spec = specCol( 0 ); 2506 uInt nchan = spec.nelements(); 2507 2507 Vector<Float> kvec = VectorKernel::make(type, width, nchan, True, False); 2508 2508 Convolver<Float> conv(kvec, IPosition(1,nchan)); 2509 Vector<Float> spec;2510 2509 Vector<uChar> flag; 2510 Vector<Bool> mask(nchan); 2511 2511 for ( uInt i=0; i<tab.nrow(); ++i) { 2512 2512 specCol.get(i, spec); 2513 2513 flagCol.get(i, flag); 2514 Vector<Bool> mask(flag.nelements());2515 2514 convertArray(mask, flag); 2516 2515 Vector<Float> specout;
Note:
See TracChangeset
for help on using the changeset viewer.