Changeset 2328
- Timestamp:
- 10/05/11 19:38:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MSWriter.cpp
r2318 r2328 46 46 namespace asap { 47 47 48 class PolarizedComponentHolder {48 class CorrTypeHandler { 49 49 public: 50 PolarizedComponentHolder() 51 : nchan(0), 52 maxnpol(4) 53 { 50 CorrTypeHandler() 51 {} 52 virtual ~CorrTypeHandler() {} 53 virtual Vector<Stokes::StokesTypes> corrType() = 0 ; 54 virtual void reset() 55 { 56 npol = 0 ; 57 } 58 void append( uInt polno ) 59 { 60 polnos[npol] = polno ; 61 npol++ ; 62 } 63 uInt nPol() { return npol ; } 64 protected: 65 Vector<Stokes::StokesTypes> polmap ; 66 uInt polnos[4] ; 67 uInt npol ; 68 }; 69 70 class LinearHandler : public CorrTypeHandler { 71 public: 72 LinearHandler() 73 : CorrTypeHandler() 74 { 75 initMap() ; 76 } 77 virtual ~LinearHandler() {} 78 virtual Vector<Stokes::StokesTypes> corrType() 79 { 80 Vector<Stokes::StokesTypes> ret( npol, Stokes::Undefined ) ; 81 if ( npol < 4 ) { 82 for ( uInt ipol = 0 ; ipol < npol ; ipol++ ) 83 ret[ipol] = polmap[polnos[ipol]] ; 84 } 85 else if ( npol == 4 ) { 86 ret[0] = polmap[0] ; 87 ret[1] = polmap[2] ; 88 ret[2] = polmap[3] ; 89 ret[4] = polmap[1] ; 90 } 91 else { 92 throw( AipsError("npol > 4") ) ; 93 } 94 return ret ; 95 } 96 protected: 97 void initMap() 98 { 99 polmap.resize( 4 ) ; 100 polmap[0] = Stokes::XX ; 101 polmap[1] = Stokes::YY ; 102 polmap[2] = Stokes::XY ; 103 polmap[3] = Stokes::YX ; 104 } 105 }; 106 class CircularHandler : public CorrTypeHandler { 107 public: 108 CircularHandler() 109 : CorrTypeHandler() 110 { 111 initMap() ; 112 } 113 virtual ~CircularHandler() {} 114 virtual Vector<Stokes::StokesTypes> corrType() 115 { 116 Vector<Stokes::StokesTypes> ret( npol, Stokes::Undefined ) ; 117 if ( npol < 4 ) { 118 for ( uInt ipol = 0 ; ipol < npol ; ipol++ ) 119 ret[ipol] = polmap[polnos[ipol]] ; 120 } 121 else if ( npol == 4 ) { 122 ret[0] = polmap[0] ; 123 ret[1] = polmap[2] ; 124 ret[2] = polmap[3] ; 125 ret[3] = polmap[1] ; 126 } 127 else { 128 throw( AipsError("npol > 4") ) ; 129 } 130 return ret ; 131 } 132 private: 133 void initMap() 134 { 135 polmap.resize( 4 ) ; 136 polmap[0] = Stokes::RR ; 137 polmap[1] = Stokes::LL ; 138 polmap[2] = Stokes::RL ; 139 polmap[3] = Stokes::LR ; 140 } 141 }; 142 class StokesHandler : public CorrTypeHandler { 143 public: 144 StokesHandler() 145 : CorrTypeHandler() 146 { 147 initMap() ; 148 } 149 virtual ~StokesHandler() {} 150 virtual Vector<Stokes::StokesTypes> corrType() 151 { 152 Vector<Stokes::StokesTypes> ret( npol, Stokes::Undefined ) ; 153 if ( npol <= 4 ) { 154 for ( uInt ipol = 0 ; ipol < npol ; ipol++ ) 155 ret[ipol] = polmap[polnos[ipol]] ; 156 } 157 else { 158 throw( AipsError("npol > 4") ) ; 159 } 160 return ret ; 161 } 162 private: 163 void initMap() 164 { 165 polmap.resize( 4 ) ; 166 polmap[0] = Stokes::I ; 167 polmap[1] = Stokes::Q ; 168 polmap[2] = Stokes::U ; 169 polmap[3] = Stokes::V ; 170 } 171 }; 172 class LinPolHandler : public CorrTypeHandler { 173 public: 174 LinPolHandler() 175 : CorrTypeHandler() 176 { 177 initMap() ; 178 } 179 virtual ~LinPolHandler() {} 180 virtual Vector<Stokes::StokesTypes> corrType() 181 { 182 Vector<Stokes::StokesTypes> ret( npol, Stokes::Undefined ) ; 183 if ( npol <= 2 ) { 184 for ( uInt ipol = 0 ; ipol < npol ; ipol++ ) 185 ret[ipol] = polmap[polnos[ipol]] ; 186 } 187 else { 188 throw( AipsError("npol > 4") ) ; 189 } 190 return ret ; 191 } 192 private: 193 void initMap() 194 { 195 polmap.resize( 2 ) ; 196 polmap[0] = Stokes::Plinear ; 197 polmap[1] = Stokes::Pangle ; 198 } 199 }; 200 201 class DataHolder { 202 public: 203 DataHolder( TableRow &tableRow, String polType ) 204 : row( tableRow ) 205 { 206 nchan = 0 ; 207 npol = 0 ; 208 makeCorrTypeHandler( polType ) ; 209 attach() ; 210 flagRow.resize( 4 ) ; 54 211 reset() ; 55 } 56 PolarizedComponentHolder( uInt n ) 57 : nchan(n), 58 maxnpol(4) 59 { 60 reset() ; 61 } 62 63 void reset() 64 { 212 sigmaTemplate.resize( 4 ) ; 213 sigmaTemplate = 1.0 ; 214 } 215 virtual ~DataHolder() {} 216 virtual void post() = 0 ; 217 virtual void reset() 218 { 219 corr->reset() ; 220 flagRow = False ; 65 221 npol = 0 ; 66 data.clear() ; 67 flag.clear() ; 68 flagrow = False ; 69 polnos.resize() ; 70 } 71 72 void accumulate( uInt id, Vector<Float> sp, Vector<Bool> fl, Bool flr ) 73 { 74 map< uInt,Vector<Float> >::iterator itr = data.find( id ) ; 75 if ( id < maxnpol && itr == data.end() ) { 76 addPol( id ) ; 77 accumulateData( id, sp ) ; 78 accumulateFlag( id, fl ) ; 79 accumulateFlagRow( flr ) ; 80 npol++ ; 81 } 222 } 223 virtual void accumulate( uInt id, Vector<Float> &sp, Vector<Bool> &fl, Bool &flr ) 224 { 225 accumulateCorrType( id ) ; 226 accumulateData( id, sp ) ; 227 accumulateFlag( id, fl ) ; 228 accumulateFlagRow( id, flr ) ; 229 } 230 uInt nPol() { return npol ; } 231 uInt nChan() { return nchan ; } 232 Vector<Int> corrTypeInt() 233 { 234 Vector<Int> v( npol ) ; 235 convertArray( v, corr->corrType() ) ; 236 return v ; 237 } 238 Vector<Stokes::StokesTypes> corrType() { return corr->corrType() ; } 239 void setNchan( uInt num ) 240 { 241 nchan = num ; 242 resize() ; 243 } 244 protected: 245 void postAuxiliary() 246 { 247 Vector<Float> w = sigmaTemplate( IPosition(1,0), IPosition(1,npol-1) ) ; 248 sigmaRF.define( w ) ; 249 weightRF.define( w ) ; 250 Cube<Bool> c( npol, nchan, 1, False ) ; 251 flagCategoryRF.define( c ) ; 252 } 253 inline void accumulateCorrType( uInt &id ) 254 { 255 corr->append( id ) ; 256 npol = corr->nPol() ; 82 257 } 83 84 void setNchan( uInt n ) { nchan = n ; } 85 uInt nPol() { return npol ; } 86 uInt nChan() { return nchan ; } 87 Vector<uInt> polNos() { return polnos ; } 88 Vector<Float> getWeight() { return Vector<Float>( npol, 1.0 ) ; } 89 Vector<Float> getSigma() { return Vector<Float>( npol, 1.0 ) ; } 90 Bool getFlagRow() { return flagrow ; } 91 Cube<Bool> getFlagCategory() { return Cube<Bool>( npol, nchan, 1, False ) ; } 92 Matrix<Float> getData() 93 { 94 Matrix<Float> v( npol, nchan ) ; 95 for ( map< uInt,Vector<Float> >::iterator i = data.begin() ; i != data.end() ; i++ ) { 96 v.row( i->first ) = i->second ; 97 } 98 return v ; 99 } 100 Matrix<Bool> getFlag() 101 { 102 Matrix<Bool> v( npol, nchan ) ; 103 for ( map< uInt,Vector<Bool> >::iterator i = flag.begin() ; i != flag.end() ; i++ ) { 104 v.row( i->first ) = i->second ; 105 } 106 return v ; 107 } 108 Matrix<Complex> getComplexData() 109 { 258 inline void accumulateFlagRow( uInt &id, Bool &flr ) 259 { 260 flagRow[id] = flr ; 261 } 262 void postFlagRow() 263 { 264 *flagRowRF = anyEQ( flagRow, True ) ; 265 } 266 inline void accumulateFlag( uInt &id, Vector<Bool> &fl ) 267 { 268 flag.row( id ) = fl ; 269 } 270 virtual void postFlag() = 0 ; 271 inline void accumulateData( uInt &id, Vector<Float> &sp ) 272 { 273 data.row( id ) = sp ; 274 } 275 virtual void postData() = 0 ; 276 TableRow &row ; 277 uInt nchan ; 278 uInt npol ; 279 CountedPtr<CorrTypeHandler> corr; 280 RecordFieldPtr< Vector<Float> > sigmaRF ; 281 RecordFieldPtr< Vector<Float> > weightRF ; 282 RecordFieldPtr< Array<Bool> > flagRF ; 283 RecordFieldPtr<Bool> flagRowRF ; 284 RecordFieldPtr< Cube<Bool> > flagCategoryRF ; 285 Vector<Bool> flagRow ; 286 Matrix<Bool> flag ; 287 Matrix<Float> data ; 288 Vector<Float> sigmaTemplate ; 289 private: 290 void makeCorrTypeHandler( String &polType ) 291 { 292 if ( polType == "linear" ) 293 corr = new LinearHandler() ; 294 else if ( polType == "circular" ) 295 corr = new CircularHandler() ; 296 else if ( polType == "stokes" ) 297 corr = new StokesHandler() ; 298 else if ( polType == "linpol" ) 299 corr = new LinPolHandler() ; 300 else 301 throw( AipsError("Invalid polarization type") ) ; 302 } 303 void attach() 304 { 305 TableRecord &rec = row.record() ; 306 sigmaRF.attachToRecord( rec, "SIGMA" ) ; 307 weightRF.attachToRecord( rec, "WEIGHT" ) ; 308 flagRF.attachToRecord( rec, "FLAG" ) ; 309 flagRowRF.attachToRecord( rec, "FLAG_ROW" ) ; 310 flagCategoryRF.attachToRecord( rec, "FLAG_CATEGORY" ) ; 311 } 312 void resize() 313 { 314 flag.resize( 4, nchan ) ; 315 data.resize( 4, nchan ) ; 316 } 317 }; 318 319 class FloatDataHolder : public DataHolder { 320 public: 321 FloatDataHolder( TableRow &tableRow, String polType ) 322 : DataHolder( tableRow, polType ) 323 { 324 attachData() ; 325 } 326 virtual ~FloatDataHolder() {} 327 virtual void post() 328 { 329 postData() ; 330 postFlag() ; 331 postFlagRow() ; 332 postAuxiliary() ; 333 } 334 protected: 335 virtual void postFlag() 336 { 337 flagRF.define( flag( IPosition( 2, 0, 0 ), IPosition( 2, npol-1, nchan-1 ) ) ) ; 338 } 339 virtual void postData() 340 { 341 dataRF.define( data( IPosition( 2, 0, 0 ), IPosition( 2, npol-1, nchan-1 ) ) ) ; 342 } 343 private: 344 void attachData() 345 { 346 dataRF.attachToRecord( row.record(), "FLOAT_DATA" ) ; 347 } 348 RecordFieldPtr< Matrix<Float> > dataRF; 349 }; 350 351 class ComplexDataHolder : public DataHolder { 352 public: 353 ComplexDataHolder( TableRow &tableRow, String polType ) 354 : DataHolder( tableRow, polType ) 355 { 356 attachData() ; 357 } 358 virtual ~ComplexDataHolder() {} 359 virtual void accumulate( uInt id, Vector<Float> &sp, Vector<Bool> &fl, Bool &flr ) 360 { 361 DataHolder::accumulate( id, sp, fl, flr ) ; 362 isFilled[id] = True ; 363 } 364 virtual void post() 365 { 366 postData() ; 367 postFlag() ; 368 postFlagRow() ; 369 postAuxiliary() ; 370 } 371 virtual void reset() 372 { 373 DataHolder::reset() ; 374 for ( uInt i = 0 ; i < 4 ; i++ ) 375 isFilled[i] = False ; 376 } 377 protected: 378 virtual void postFlag() 379 { 380 if ( npol == 4 ) { 381 Vector<Bool> tmp = flag.row( 3 ) ; 382 flag.row( 3 ) = flag.row( 1 ) ; 383 flag.row( 2 ) = flag.row( 2 ) || tmp ; 384 flag.row( 1 ) = flag.row( 2 ) ; 385 flagRF.define( flag ) ; 386 } 387 else { 388 flagRF.define( flag( IPosition( 2, 0, 0 ), IPosition( 2, npol-1, nchan-1 ) ) ) ; 389 } 390 } 391 virtual void postData() 392 { 393 Matrix<Float> tmp( 2, nchan, 0.0 ) ; 110 394 Matrix<Complex> v( npol, nchan ) ; 111 Matrix<Float> dummy( 2, nchan, 0.0 ) ; 112 map< uInt,Vector<Float> >::iterator itr0 = data.find( 0 ) ; 113 map< uInt,Vector<Float> >::iterator itr1 = data.find( 1 ) ; 114 if ( itr0 != data.end() ) { 115 dummy.row( 0 ) = itr0->second ; 116 v.row( 0 ) = RealToComplex( dummy ) ; 117 } 118 if ( itr1 != data.end() ) { 119 dummy.row( 0 ) = itr1->second ; 120 v.row( npol-1 ) = RealToComplex( dummy ) ; 121 } 122 itr0 = data.find( 2 ) ; 123 itr1 = data.find( 3 ) ; 124 if ( itr0 != data.end() && itr1 != data.end() ) { 125 dummy.row( 0 ) = itr0->second ; 126 dummy.row( 1 ) = itr1->second ; 127 v.row( 1 ) = RealToComplex( dummy ) ; 395 if ( isFilled[0] ) { 396 tmp.row( 0 ) = data.row( 0 ) ; 397 v.row( 0 ) = RealToComplex( tmp ) ; 398 } 399 if ( isFilled[1] ) { 400 tmp.row( 0 ) = data.row( 1 ) ; 401 v.row( npol-1 ) = RealToComplex( tmp ) ; 402 } 403 if ( isFilled[2] && isFilled[3] ) { 404 tmp.row( 0 ) = data.row( 2 ) ; 405 tmp.row( 1 ) = data.row( 3 ) ; 406 v.row( 1 ) = RealToComplex( tmp ) ; 128 407 v.row( 2 ) = conj( v.row( 1 ) ) ; 129 408 } 130 return v ; 131 } 132 133 Matrix<Bool> getComplexFlag() 134 { 135 Matrix<Bool> tmp = getFlag() ; 136 Matrix<Bool> v( npol, nchan ) ; 137 v.row( 0 ) = tmp.row( 0 ) ; 138 if ( npol == 2 ) { 139 v.row( npol-1 ) = tmp.row( 1 ) ; 140 } 141 else if ( npol > 2 ) { 142 v.row( npol-1 ) = tmp.row( 1 ) ; 143 v.row( 1 ) = tmp.row( 2 ) || tmp.row( 3 ) ; 144 v.row( 2 ) = v.row( 1 ) ; 145 } 146 return v ; 147 } 148 409 dataRF.define( v ) ; 410 } 149 411 private: 150 void accumulateData( uInt &id, Vector<Float> &v ) 151 { 152 data.insert( pair< uInt,Vector<Float> >( id, v ) ) ; 153 } 154 void accumulateFlag( uInt &id, Vector<Bool> &v ) 155 { 156 flag.insert( pair< uInt,Vector<Bool> >( id, v ) ) ; 157 } 158 void accumulateFlagRow( Bool &v ) 159 { 160 flagrow |= v ; 161 } 162 void addPol( uInt id ) 163 { 164 uInt i = polnos.nelements() ; 165 polnos.resize( i+1, True ) ; 166 polnos[i] = id ; 167 } 168 169 uInt nchan; 170 const uInt maxnpol; 171 uInt npol; 172 Vector<uInt> polnos; 173 174 map< uInt,Vector<Float> > data; 175 map< uInt,Vector<Bool> > flag; 176 Bool flagrow; 412 void attachData() 413 { 414 dataRF.attachToRecord( row.record(), "DATA" ) ; 415 } 416 RecordFieldPtr< Matrix<Complex> > dataRF; 417 Bool isFilled[4] ; 177 418 }; 178 419 … … 418 659 row = TableRow( ms ) ; 419 660 420 holder.reset() ; 421 422 makePolMap() ; 661 initPolarization() ; 423 662 initFrequencies() ; 424 initCorrProductTemplate() ;425 663 426 664 // … … 505 743 Vector<Float> sp = spectraCol( recordNo ) ; 506 744 uInt nchan = sp.nelements() ; 507 holder .setNchan( nchan ) ;745 holder->setNchan( nchan ) ; 508 746 509 747 addSpectralWindow( spwId, freqId ) ; … … 557 795 } 558 796 virtual void leaveTime(const uInt recordNo, Double columnValue) { 559 if ( holder.nPol() > 0 ) { 560 Vector<Float> w = holder.getWeight() ; 561 Cube<Bool> c = holder.getFlagCategory() ; 562 Bool flr = holder.getFlagRow() ; 563 Matrix<Bool> fl = holder.getFlag() ; 564 Vector<uInt> polnos = holder.polNos() ; 565 Int polId = addPolarization( polnos ) ; 797 if ( holder->nPol() > 0 ) { 798 Int polId = addPolarization() ; 566 799 Int ddId = addDataDescription( polId, spwId ) ; 567 800 568 801 // put field 569 802 *dataDescIdRF = ddId ; 570 *flagRowRF = flr ; 571 weightRF.define( w ) ; 572 sigmaRF.define( w ) ; 573 flagCategoryRF.define( c ) ; 574 flagRF.define( fl ) ; 575 if ( useFloat ) { 576 Matrix<Float> sp = holder.getData() ; 577 floatDataRF.define( sp ) ; 578 } 579 else { 580 Matrix<Complex> sp = holder.getComplexData() ; 581 dataRF.define( sp ) ; 582 } 803 holder->post() ; 583 804 584 805 // commit row … … 587 808 588 809 // reset holder 589 holder .reset() ;810 holder->reset() ; 590 811 } 591 812 } … … 613 834 convertArray( fl, tmp ) ; 614 835 Bool flr = (Bool)flagRowCol.asuInt( recordNo ) ; 615 holder .accumulate( polNo, sp, fl, flr ) ;836 holder->accumulate( polNo, sp, fl, flr ) ; 616 837 617 838 return True ; … … 637 858 void dataColumnName( String name ) 638 859 { 639 TableRecord &r = row.record() ; 640 if ( name == "DATA" ) { 641 useFloat = False ; 642 dataRF.attachToRecord( r, name ) ; 643 } 644 else if ( name == "FLOAT_DATA" ) { 645 useFloat = True ; 646 floatDataRF.attachToRecord( r, name ) ; 647 } 860 if ( name == "DATA" ) 861 holder = new ComplexDataHolder( row, poltype ) ; 862 else if ( name == "FLOAT_DATA" ) 863 holder = new FloatDataHolder( row, poltype ) ; 648 864 } 649 865 void pointingTableName( String name ) { … … 743 959 porow.put( nrow ) ; 744 960 } 745 Int addPolarization( Vector<uInt> &nos)961 Int addPolarization() 746 962 { 747 963 Int idx = -1 ; 964 Vector<Int> corrType = holder->corrTypeInt() ; 748 965 uInt nEntry = polEntry.size() ; 749 966 for ( uInt i = 0 ; i < nEntry ; i++ ) { 750 if ( polEntry[i].conform( nos ) && allEQ( polEntry[i], nos) ) {967 if ( polEntry[i].conform( corrType ) && allEQ( polEntry[i], corrType ) ) { 751 968 idx = i ; 752 969 break ; … … 754 971 } 755 972 756 Int numCorr ; 757 Vector<Int> corrType ; 758 Matrix<Int> corrProduct ; 759 polProperty( nos, numCorr, corrType, corrProduct ) ; 973 Int numCorr = holder->nPol() ; 974 Matrix<Int> corrProduct = corrProductTemplate[numCorr] ; 760 975 761 976 if ( idx == -1 ) { … … 771 986 772 987 polEntry.resize( nEntry+1 ) ; 773 polEntry[nEntry] = nos;988 polEntry[nEntry] = corrType ; 774 989 } 775 990 … … 841 1056 842 1057 Int mfrInt = (Int)freqframe ; 843 Int nchan = holder .nChan() ;1058 Int nchan = holder->nChan() ; 844 1059 Double bw = nchan * abs( ic ) ; 845 1060 Double reffreq = rv - rp * ic ; … … 917 1132 } 918 1133 } 919 void makePolMap()1134 void initPolarization() 920 1135 { 921 1136 const TableRecord &keys = table.keywordSet() ; 922 1137 poltype = keys.asString( "POLTYPE" ) ; 923 1138 924 if ( poltype == "stokes" ) { 925 polmap.resize( 4 ) ; 926 polmap[0] = Stokes::I ; 927 polmap[1] = Stokes::Q ; 928 polmap[2] = Stokes::U ; 929 polmap[3] = Stokes::V ; 930 } 931 else if ( poltype == "linear" ) { 932 polmap.resize( 4 ) ; 933 polmap[0] = Stokes::XX ; 934 polmap[1] = Stokes::YY ; 935 polmap[2] = Stokes::XY ; 936 polmap[3] = Stokes::YX ; 937 } 938 else if ( poltype == "circular" ) { 939 polmap.resize( 4 ) ; 940 polmap[0] = Stokes::RR ; 941 polmap[1] = Stokes::LL ; 942 polmap[2] = Stokes::RL ; 943 polmap[3] = Stokes::LR ; 944 } 945 else if ( poltype == "linpol" ) { 946 polmap.resize( 2 ) ; 947 polmap[0] = Stokes::Plinear ; 948 polmap[1] = Stokes::Pangle ; 949 } 950 else { 951 polmap.resize( 0 ) ; 952 } 1139 initCorrProductTemplate() ; 953 1140 } 954 1141 void initFrequencies() … … 1003 1190 TableRecord &r = row.record() ; 1004 1191 dataDescIdRF.attachToRecord( r, "DATA_DESC_ID" ) ; 1005 flagRowRF.attachToRecord( r, "FLAG_ROW" ) ;1006 weightRF.attachToRecord( r, "WEIGHT" ) ;1007 sigmaRF.attachToRecord( r, "SIGMA" ) ;1008 flagCategoryRF.attachToRecord( r, "FLAG_CATEGORY" ) ;1009 flagRF.attachToRecord( r, "FLAG" ) ;1010 1192 timeRF.attachToRecord( r, "TIME" ) ; 1011 1193 timeCentroidRF.attachToRecord( r, "TIME_CENTROID" ) ; … … 1189 1371 } 1190 1372 } 1191 void polProperty( Vector<uInt> &nos, Int &n, Vector<Int> &c, Matrix<Int> &cp )1192 {1193 n = nos.nelements() ;1194 c.resize( n ) ;1195 for ( Int i = 0 ; i < n ; i++ )1196 c[i] = (Int)polmap[nos[i]] ;1197 if ( n == 4 &&1198 ( poltype == "linear" || poltype == "circular" ) ) {1199 Int tmp = c[1] ;1200 c[1] = c[2] ;1201 c[2] = c[3] ;1202 c[3] = tmp ;1203 }1204 cp = corrProductTemplate[n] ;1205 }1206 1373 void initCorrProductTemplate() 1207 1374 { … … 1238 1405 Int feedId; 1239 1406 Int subscan; 1240 PolarizedComponentHolderholder;1407 CountedPtr<DataHolder> holder; 1241 1408 String ptName; 1242 1409 Bool useFloat; 1243 1410 String poltype; 1244 Vector<Stokes::StokesTypes> polmap;1245 1411 1246 1412 // MS subtables … … 1263 1429 RecordFieldPtr<Int> dataDescIdRF,fieldIdRF,feed1RF,feed2RF, 1264 1430 scanNumberRF,stateIdRF; 1265 RecordFieldPtr<Bool> flagRowRF;1266 1431 RecordFieldPtr<Double> timeRF,timeCentroidRF,intervalRF,exposureRF; 1267 RecordFieldPtr< Vector<Float> > weightRF,sigmaRF;1268 RecordFieldPtr< Cube<Bool> > flagCategoryRF;1269 RecordFieldPtr< Matrix<Bool> > flagRF;1270 RecordFieldPtr< Matrix<Float> > floatDataRF;1271 RecordFieldPtr< Matrix<Complex> > dataRF;1272 1432 1273 1433 // MS POINTING columns … … 1284 1444 Matrix<Int> ddEntry; 1285 1445 Matrix<Int> feedEntry; 1286 vector< Vector< uInt> > polEntry;1446 vector< Vector<Int> > polEntry; 1287 1447 map<uInt,Bool> processedFreqId; 1288 1448 map<uInt,Double> refpix; … … 1416 1576 reset() ; 1417 1577 } 1578 virtual ~BaseTsysHolder() {} 1418 1579 virtual Array<Float> getTsys() = 0 ; 1419 1580 void setNchan( uInt n ) { nchan = n ; } … … 1467 1628 : BaseTsysHolder( tsysCol ) 1468 1629 {} 1630 virtual ~TsysHolder() {} 1469 1631 virtual Array<Float> getTsys() 1470 1632 { … … 1479 1641 : BaseTsysHolder( tsysCol ) 1480 1642 {} 1643 virtual ~TsysSpectrumHolder() {} 1481 1644 virtual Array<Float> getTsys() 1482 1645 { … … 1491 1654 : col( tcalCol ) 1492 1655 {} 1656 virtual ~BaseTcalProcessor() {} 1493 1657 void setTcalId( Vector<uInt> &tcalId ) { id.assign( tcalId ) ; } 1494 1658 virtual Array<Float> getTcal() = 0 ; … … 1504 1668 : BaseTcalProcessor( tcalCol ) 1505 1669 {} 1670 virtual ~TcalProcessor() {} 1506 1671 virtual Array<Float> getTcal() 1507 1672 { … … 1521 1686 : BaseTcalProcessor( tcalCol ) 1522 1687 {} 1688 virtual ~TcalSpectrumProcessor() {} 1523 1689 virtual Array<Float> getTcal() 1524 1690 {
Note:
See TracChangeset
for help on using the changeset viewer.