Changeset 2273 for trunk


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
Files:
7 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r2210 r2273  
    544544set( ASAP2TO3 asap2to3 )
    545545if ( NOT STANDALONE )
     546   set( ASDM2ASAP_OLD oldasdm2ASAP )
    546547   set( ASDM2ASAP asdm2ASAP )
    547548endif()
  • trunk/cmake/withcasa.cmake

    r2236 r2273  
    114114endif()
    115115message( STATUS "LIBXML2_LIBRARY = " ${LIBXML2_LIBRARY} )
    116 set( ASDM_INCLUDE_DIR ${CASA_CODE_PATH}/alma/implement/ASDM
    117                       ${CASA_CODE_PATH}/alma/implement/Enumerations
    118                       ${CASA_CODE_PATH}/alma/implement/ASDMBinaries
    119                       ${CASA_CODE_PATH}/alma/implement/Enumtcl
     116set( ASDM_INCLUDE_DIR_OLD ${CASA_CODE_PATH}/alma/implement/ASDM
     117                          ${CASA_CODE_PATH}/alma/implement/Enumerations
     118                          ${CASA_CODE_PATH}/alma/implement/ASDMBinaries
     119                          ${CASA_CODE_PATH}/alma/implement/Enumtcl
     120                          ${LIBXML2_INCLUDE_DIR} )
     121set( ASDM_LIBRARY_OLD ${casaroot}/${arch}/lib/libalma${CMAKE_SHARED_LIBRARY_SUFFIX}
     122                      ${LIBXML2_LIBRARY}/libxml2${CMAKE_SHARED_LIBRARY_SUFFIX} )
     123set( ASDM_INCLUDE_DIR ${CASA_CODE_PATH}/alma_v3/implement/ASDM
     124                      ${CASA_CODE_PATH}/alma_v3/implement/Enumerations
     125                      ${CASA_CODE_PATH}/alma_v3/implement/ASDMBinaries
     126                      ${CASA_CODE_PATH}/alma_v3/implement/Enumtcl
    120127                      ${LIBXML2_INCLUDE_DIR} )
    121 set( ASDM_LIBRARY ${casaroot}/${arch}/lib/libalma${CMAKE_SHARED_LIBRARY_SUFFIX}
    122  ${LIBXML2_LIBRARY}/libxml2${CMAKE_SHARED_LIBRARY_SUFFIX} )
     128set( ASDM_LIBRARY ${casaroot}/${arch}/lib/libalma_v3${CMAKE_SHARED_LIBRARY_SUFFIX}
     129                  ${LIBXML2_LIBRARY}/libxml2${CMAKE_SHARED_LIBRARY_SUFFIX} )
    123130add_definitions( -DWITHOUT_ACS )
    124131
     
    139146   add_subdirectory( python )
    140147   add_subdirectory( share )
    141    add_subdirectory( external-alma/asdm2ASAP )
     148   add_subdirectory( external-alma/asdm2ASAP )
     149   add_subdirectory( external-alma/oldasdm2ASAP )
    142150endmacro( asap_add_subdirectory )
    143151
  • 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.