Changeset 2220
- Timestamp:
- 07/13/11 17:54:48 (13 years ago)
- Location:
- trunk/external-alma/asdm2ASAP
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/asdm2ASAP/ASDMFiller.cc
r2218 r2220 69 69 table_->frequencies().setFrame( freqFrame, false ) ; 70 70 table_->frequencies().setFrame( freqFrame, true ) ; 71 //logsink_->postLocally( LogMessage("sFreqFrame = "+sFreqFrame,LogOrigin(className_,funcName,WHERE)) ) ; 71 72 72 73 Vector<casa::Double> antpos = table_->getHeader().antennaposition ; … … 111 112 uInt nrow = reader_->getNumMainRow() ; 112 113 113 //logsink_->postLocally( LogMessage("There are "+String::toString(nrow)+" rows in Main table corresponding to configDescId "+String::toString(configDescIdList[icon] +" fieldId "+String::toString(fieldIdList[ifield]),LogOrigin(className_,funcName,WHERE)) ) ;114 //logsink_->postLocally( LogMessage("There are "+String::toString(nrow)+" rows in Main table corresponding to configDescId "+String::toString(configDescIdList[icon])+" fieldId "+String::toString(fieldIdList[ifield]),LogOrigin(className_,funcName,WHERE)) ) ; 114 115 115 116 // CYCLENO … … 132 133 if ( !(reader_->setData()) ) { 133 134 // skip row since reader failed to retrieve data 134 //logsink_->postLocally( LogMessage("skip "+String::toString(irow),LogOrigin(className_,funcName,WH RER)) ) ;135 //logsink_->postLocally( LogMessage("skip "+String::toString(irow),LogOrigin(className_,funcName,WHERE)) ) ; 135 136 continue ; 136 137 } -
trunk/external-alma/asdm2ASAP/ASDMReader.cc
r2218 r2220 212 212 processStation() ; 213 213 214 logsink_->postLocally( LogMessage( "antennaId_ = "+String::toString(antennaId_), LogOrigin( ) ) ) ;215 logsink_->postLocally( LogMessage( "antennaName_ = "+antennaName_, LogOrigin( ) ) ) ;214 logsink_->postLocally( LogMessage( "antennaId_ = "+String::toString(antennaId_), LogOrigin(className_,funcName,WHERE) ) ) ; 215 logsink_->postLocally( LogMessage( "antennaName_ = "+antennaName_, LogOrigin(className_,funcName,WHERE) ) ) ; 216 216 217 217 return true ; … … 294 294 SpectralWindowTable &spwtab = asdm_->getSpectralWindow() ; 295 295 vector<SpectralWindowRow *> spwrows = spwtab.get() ; 296 int nspwrow = spwrows.size() ; 296 297 297 298 // nif 298 nif = spwrows.size() ; 299 //nif = spwrows.size() ; 300 nif = getNumIFs() ; 299 301 300 302 // nchan 301 303 int refidx = -1 ; 302 304 vector<int> nchans ; 303 for ( int irow = 0 ; irow < n if; irow++ ) {305 for ( int irow = 0 ; irow < nspwrow ; irow++ ) { 304 306 nchans.push_back( spwrows[irow]->getNumChan() ) ; 305 307 if ( refidx == -1 && nchans[irow] != 1 && nchans[irow] != 4 ) … … 312 314 // bandwidth 313 315 vector<double> bws ; 314 for ( int irow = 0 ; irow < n if; irow++ ) {316 for ( int irow = 0 ; irow < nspwrow ; irow++ ) { 315 317 if ( nchans[irow] != 4 ) { // exclude WVR data 316 318 bws.push_back( spwrows[irow]->getTotBandwidth().get() ) ; … … 1674 1676 } 1675 1677 1676 logsink_->postLocally( LogMessage("frame = "+String::toString(frame),LogOrigin(className_,funcName,WHERE)) ) ;1678 //logsink_->postLocally( LogMessage("frame = "+String::toString(frame),LogOrigin(className_,funcName,WHERE)) ) ; 1677 1679 1678 1680 return frame ; 1679 1681 } 1682 1683 int ASDMReader::getNumIFs() 1684 { 1685 String funcName = "getNumIFs" ; 1686 1687 int nif = 0 ; 1688 vector<SpectralWindowRow *> rows = asdm_->getSpectralWindow().get() ; 1689 unsigned int nrow = rows.size() ; 1690 // check if all rows have freqGroup attribute 1691 bool freqGroupExists = true ; 1692 bool countedWvr = false ; 1693 for ( unsigned int irow = 0 ; irow < nrow ; irow++ ) { 1694 freqGroupExists &= rows[irow]->isFreqGroupExists() ; 1695 if ( rows[irow]->getNumChan() == 4 ) { 1696 if ( !countedWvr ) { 1697 countedWvr = true ; 1698 nif++ ; 1699 } 1700 } 1701 else { 1702 nif++ ; 1703 } 1704 } 1705 1706 if ( freqGroupExists ) { 1707 vector<int> freqGroup(0) ; 1708 for ( unsigned int irow = 0 ; irow < nrow ; irow++ ) { 1709 int fg = rows[irow]->getFreqGroup() ; 1710 if ( (int)count( freqGroup.begin(), freqGroup.end(), fg ) == 0 ) { 1711 freqGroup.push_back( fg ) ; 1712 } 1713 } 1714 nif = freqGroup.size() ; 1715 } 1716 1717 //logsink_->postLocally( LogMessage("nif = "+String::toString(nif),LogOrigin(className_,funcName,WHERE)) ) ; 1718 1719 return nif ; 1720 } -
trunk/external-alma/asdm2ASAP/ASDMReader.h
r2218 r2220 495 495 double mjd, 496 496 casa::Vector<casa::Double> antpos ) ; 497 498 /** 499 * get nIF 500 * 501 * @return number of IFs 502 **/ 503 int getNumIFs() ; 497 504 498 505 asdm::ASDM *asdm_ ; // pointer to ASDM object -
trunk/external-alma/asdm2ASAP/asdm2ASAP.cc
r2216 r2220 148 148 if ( dir.exists() ) { 149 149 if ( overwrite ) { 150 //*os << "Delete existing file " << outname << " ..." << LogIO::POST ;151 150 logsink_p->postLocally( LogMessage("Delete existing file "+outname+" ...",LogOrigin(funcname,WHERE)) ) ; 152 151 dir.removeRecursive() ; 153 152 } 154 153 else { 155 //*os << LogIO::WARN << "Output file " << outname << " exists." << LogIO::POST ;156 154 logsink_p->postLocally( LogMessage("Output file "+outname+" exists.",LogOrigin(funcname,WHERE),LogMessage::WARN) ) ; 157 155 return 1 ; … … 167 165 // save data only if nrow is not zero 168 166 if ( stable->nrow() > 0 ) { 169 //*os << "Creating " << outname << "..." << LogIO::POST ;170 167 logsink_p->postLocally( LogMessage("Creating "+outname+"...",LogOrigin(funcname,WHERE)) ) ; 171 168 stable->makePersistent( outname ) ; 172 169 } 173 170 else { 174 //*os << outname << " will not be created since there are no data associate with the selection" << LogIO::POST ;175 171 logsink_p->postLocally( LogMessage(outname+" will not be created since there are no data associate with the selection",LogOrigin(funcname,WHERE)) ) ; 176 172 } … … 184 180 if ( logfile.size() != 0 ) 185 181 ofs.close() ; 186 //delete os ;187 182 188 183 return 0 ;
Note:
See TracChangeset
for help on using the changeset viewer.