Changeset 2273 for trunk/external-alma


Ignore:
Timestamp:
08/12/11 16:20:30 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-1913

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Support latest ASDM definition in asdm2ASAP.
Now asdm2ASAP is linked to libalma_v3.so to be able to read latest ASDM.

The importasdm task invokes asdm2ASAP when singledish is True.

Older version of asdm2ASAP is renamec as oldasdm2ASAP.
The oldasdm2ASAP and related classes are built by linking to libalma.so.
It is installed but not used by any tasks.


Location:
trunk/external-alma
Files:
7 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/asdm2ASAP/ASDMFiller.cc

    r2253 r2273  
    125125        if ( !(reader_->setMainRow( irow )) ) {
    126126          // skip row since the row doesn't have valid configDescId
    127           //logsink_->postLocally( LogMessage("skip "+String::toString(irow),LogOrigin(className_,funcName,WHERE)) ) ;
     127          //logsink_->postLocally( LogMessage("skip "+String::toString(irow)+" since ASDMReader::setMainrow() returns False",LogOrigin(className_,funcName,WHERE)) ) ;
    128128          continue ;
    129129        }
     
    136136        if ( !(reader_->setData()) ) {
    137137          // skip row since reader failed to retrieve data
    138           //logsink_->postLocally( LogMessage("skip "+String::toString(irow),LogOrigin(className_,funcName,WHERE)) ) ;
     138          //logsink_->postLocally( LogMessage("skip "+String::toString(irow)+" since ASDMReader::setData() returns False",LogOrigin(className_,funcName,WHERE)) ) ;
    139139          continue ;
    140140        }
     
    271271//               oss << dataShape[i] << ", " ;
    272272//           }
    273 //           logsink_->postLocally( LogMessage(oss.str(),LogOrigin(className_,funcName,WHERE)) ) ;
     273          //logsink_->postLocally( LogMessage(oss.str(),LogOrigin(className_,funcName,WHERE)) ) ;
    274274                                     
    275275          //int numPol = reader_->getNumPol( idata ) ;
     
    285285          // SPECTRA, FLAGTRA, TSYS, TCAL
    286286          float *sp = reader_->getSpectrum( idata ) ;
    287           vector< vector<float> > ts = reader_->getTsys( idata ) ;
    288           vector< vector<float> > tc = reader_->getTcal( idata ) ;
     287          vector< vector<float> > ts ;
     288          vector< vector<float> > tc ;
     289          reader_->getTcalAndTsys( idata, tc, ts ) ;
    289290          Matrix<casa::Float> spectra = toMatrix( sp, numPol, numChan ) ;
    290291          Vector<uChar> flagtra( numChan, 0 ) ;
  • trunk/external-alma/asdm2ASAP/ASDMReader.cc

    r2256 r2273  
    166166  // create ASDM object
    167167  asdm_ = new ASDM() ;
     168  // avoid unwanted message to stdout
     169  ostringstream oss ;
     170  streambuf *buforg = cout.rdbuf(oss.rdbuf()) ;
    168171  asdm_->setFromFile( filename ) ;
     172  cout.rdbuf(buforg) ;
    169173
    170174  if ( antennaId_ == -1 ) {
     
    213217  processStation() ;
    214218
    215   logsink_->postLocally( LogMessage(  "antennaId_ = "+String::toString(antennaId_), LogOrigin(className_,funcName,WHERE) ) ) ;
    216   logsink_->postLocally( LogMessage(  "antennaName_ = "+antennaName_, LogOrigin(className_,funcName,WHERE) ) ) ;
     219  //logsink_->postLocally( LogMessage(  "antennaId_ = "+String::toString(antennaId_), LogOrigin(className_,funcName,WHERE) ) ) ;
     220  //logsink_->postLocally( LogMessage(  "antennaName_ = "+antennaName_, LogOrigin(className_,funcName,WHERE) ) ) ;
    217221
    218222  return true ;
     
    286290  // project
    287291  // T.B.D. (project UID?)
    288   project = "T.B.D. (" + ebrow->getProjectId().toString() + ")" ;
     292  project = "T.B.D. (" + ebrow->getProjectUID().toString() + ")" ;
    289293
    290294  // utc
     
    18801884vector< vector<double> > ASDMReader::pointingDir( PointingRow *row )
    18811885{
     1886  //String funcName = "pointingDir" ;
    18821887  vector< vector<Angle> > aTar = row->getTarget() ;
    18831888  vector< vector<Angle> > aOff = row->getOffset() ;
     
    18931898     * into account
    18941899     *
    1895      * az = dir[0][0] = target[0][0] + offset[0][0] / cos(el)
     1900     * az = dir[0][0] = target[0][0] + offset[0][0] / cos(el) 
    18961901     *                 + encorder[0][0] - direction[0][0]
    18971902     * el = dir[0][1] = target[0][1] + offset[0][1]
    18981903     *                 + encorder[0][1] - direction[0][1]
    18991904     **/
    1900     dir[i][0] = aTar[i][0].get() + factor * aOff[i][0].get() ;
     1905    dir[i][0] = aTar[i][0].get() + factor * aOff[i][0].get()
    19011906               + aEnc[i][0].get() - aDir[i][0].get() ;
    1902     dir[i][1] = aTar[i][1].get() + aOff[i][1].get() ;
     1907    dir[i][1] = aTar[i][1].get() + aOff[i][1].get()
    19031908               + aEnc[i][1].get() - aDir[i][1].get() ;
     1909    //logsink_->postLocally( LogMessage("tracking offset: ["+String::toString(aEnc[i][0].get()-aDir[i][0].get())+","+String::toString(aEnc[i][0]-aDir[i][0].get())+"]",LogOrigin(className_,funcName,WHERE)) ) ;
    19041910  }
    19051911  return dir ;
  • trunk/external-alma/asdm2ASAP/asdm2ASAP.cc

    r2248 r2273  
    127127    CountedPtr<ASDMReader> reader = filler->getReader() ;
    128128    string aname = reader->getAntennaName() ;
    129     int aid = reader->getAntennaId() ;
    130129    string outname = asapname ;
    131130    if ( asapname.size() == 0 ) {
     
    137136   
    138137    //logsink_p->postLocally( LogMessage("specified option summary:",LogOrigin(funcname,WHERE)) ) ;
    139     //logsink_p->postLocally( LogMessage("   antenna = "+String(aname)+" (ID: "+String::toString(aid)+")",LogOrigin(funcname,WHERE)) ) ;
     138    //logsink_p->postLocally( LogMessage("   antenna = "+String(aname)+" (ID: "+String::toString(reader->getAntennaId())+")",LogOrigin(funcname,WHERE)) ) ;
    140139    //logsink_p->postLocally( LogMessage("   asdmname = "+asdmname,LogOrigin(funcname,WHERE)) ) ;
    141140    //logsink_p->postLocally( LogMessage("   asapname = "+outname,LogOrigin(funcname,WHERE)) ) ;
Note: See TracChangeset for help on using the changeset viewer.