Changeset 2188 for branches


Ignore:
Timestamp:
06/09/11 11:38:13 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CSV-929 etc.

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...

Merge several bug fixes for MSFiller/Writer in trunk
(r2167,r2176,r2184,r2185,r2187).


Location:
branches/casa-prerelease/pre-asap
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/casa-prerelease/pre-asap

  • branches/casa-prerelease/pre-asap/Makefile

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/casa-prerelease/pre-asap/SConstruct

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/casa-prerelease/pre-asap/apps

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/casa-prerelease/pre-asap/external-alma

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/casa-prerelease/pre-asap/external-alma/atnf/pks/pks_maths.cc

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/casa-prerelease/pre-asap/getsvnrev.sh

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/casa-prerelease/pre-asap/python

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/casa-prerelease/pre-asap/python/flagtoolbar.py

  • branches/casa-prerelease/pre-asap/src

  • branches/casa-prerelease/pre-asap/src/MSFiller.cpp

    r2165 r2188  
    601601          Vector< Quantum<Double> > chanFreqs = (*sharedQDArrCol)( spwId ) ;
    602602          delete sharedQDArrCol ;
     603          if ( nchan > 1 && chanFreqs[0].getValue("Hz") > chanFreqs[1].getValue("Hz") )
     604            increment *= -1.0 ;
    603605          if ( freqRef == MFrequency::LSRK ) {
    604606            if ( even ) {
     
    949951    sdh.antennaname = telescopeName + "//" + antennaName ;
    950952  }
    951   if ( stationName != "" ) {
     953  if ( stationName != "" && stationName != antennaName ) {
    952954    sdh.antennaname += "@" + stationName ;
    953955  }
     
    10501052  else if ( tmpStr.find( "." ) != String::npos ) {
    10511053    sep = "." ;
     1054  }
     1055  else if ( tmpStr.find( "#" ) != String::npos ) {
     1056    sep = "#" ;
    10521057  }
    10531058  //else if ( obsMode.find( "_" ) != String::npos ) {
     
    11061111    }
    11071112  }
    1108   else if ( sep == "." ) {
    1109     // sep == "."
     1113  else if ( sep == "." || sep == "#" ) {
     1114    // sep == "." or "#"
    11101115    //
    11111116    // ALMA & EVLA case (MS via ASDM) before3.1
     
    15641569  if ( !isSysCal_ ) {
    15651570    os_ << "No TCAL rows" << LogIO::POST ;
    1566     Block<uInt> tcalids( 0 ) ;
     1571    Block<uInt> tcalids( 4, 0 ) ;
    15671572    return  tcalids ;
    15681573  }   
     
    15721577  if ( !tcalrec_.isDefined( key ) ) {
    15731578    os_ << "No TCAL rows" << LogIO::POST ;
    1574     Block<uInt> tcalids( 0 ) ;
     1579    Block<uInt> tcalids( 4, 0 ) ;
    15751580    return tcalids ;
    15761581  }
  • branches/casa-prerelease/pre-asap/src/MSWriter.cpp

    r2105 r2188  
    583583//   double startSec = gettimeofday_sec() ;
    584584//   os_ << "start MSWriter::setupMS() startSec=" << startSec << LogIO::POST ;
     585 
     586  String dunit = table_->getHeader().fluxunit ;
    585587
    586588  TableDesc msDesc = MeasurementSet::requiredTableDesc() ;
     
    593595
    594596  mstable_ = new MeasurementSet( newtab ) ;
     597
     598  TableColumn col ;
     599  if ( useFloatData_ )
     600    col.attach( *mstable_, "FLOAT_DATA" ) ;
     601  else if ( useData_ )
     602    col.attach( *mstable_, "DATA" ) ;
     603  col.rwKeywordSet().define( "UNIT", dunit ) ;
    595604
    596605  // create subtables
     
    12751284
    12761285  // RESOLUTION, CHAN_WIDTH, EFFECTIVE_BW
    1277   Vector<Double> sharedDoubleArr( nchan, inc ) ;
     1286  Vector<Double> sharedDoubleArr( nchan, abs(inc) ) ;
    12781287  msSpwCols.resolution().put( spwid, sharedDoubleArr ) ;
    12791288  msSpwCols.chanWidth().put( spwid, sharedDoubleArr ) ;
     
    16831692  // OBS_MODE string of MS created by importasdm task is slightly
    16841693  // (but critically) changed.
     1694  // 2011/05/20 TN
     1695  // OBS_MODE string of MS created by importasdm task is changed
     1696  // again (separator is now "#" instead of "_"
     1697  String sep1="#" ;
     1698  String sep2="," ;
     1699  String target="OBSERVE_TARGET" ;
     1700  String atmcal="CALIBRATE_TEMPERATURE" ;
     1701  String onstr="ON_SOURCE" ;
     1702  String offstr="OFF_SOURCE" ;
     1703  String pswitch="POSITION_SWITCH" ;
     1704  String nod="NOD" ;
     1705  String fswitch="FREQUENCY_SWITCH" ;
     1706  String sigstr="SIG" ;
     1707  String refstr="REF" ;
     1708  String unspecified="UNSPECIFIED" ;
     1709  String ftlow="LOWER" ;
     1710  String fthigh="HIGHER" ;
    16851711  switch ( type ) {
    16861712  case SrcType::PSON:
    1687     stype = "OBSERVE_TARGET_ON_SOURCE,POSITION_SWITCH" ;
     1713    //stype = "OBSERVE_TARGET_ON_SOURCE,POSITION_SWITCH" ;
     1714    stype = target+sep1+onstr+sep2+pswitch ;
    16881715    b = True ;
    16891716    t = 0.0 ;
     
    16911718    break ;
    16921719  case SrcType::PSOFF:
    1693     stype = "OBSERVE_TARGET_OFF_SOURCE,POSITION_SWITCH" ;
     1720    //stype = "OBSERVE_TARGET_OFF_SOURCE,POSITION_SWITCH" ;
     1721    stype = target+sep1+offstr+sep2+pswitch ;
    16941722    b = False ;
    16951723    t = 0.0 ;
     
    16971725    break ;
    16981726  case SrcType::NOD:
    1699     stype = "OBSERVE_TARGET_ON_SOURCE,NOD" ;
     1727    //stype = "OBSERVE_TARGET_ON_SOURCE,NOD" ;
     1728    stype = target+sep1+onstr+sep2+nod ;
    17001729    b = True ;
    17011730    t = 0.0 ;
     
    17031732    break ;
    17041733  case SrcType::FSON:
    1705     stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_SIG" ;
     1734    //stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_SIG" ;
     1735    stype = target+sep1+onstr+sep2+fswitch+sep1+sigstr ;
    17061736    b = True ;
    17071737    t = 0.0 ;
     
    17091739    break ;
    17101740  case SrcType::FSOFF:
    1711     stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_REF" ;
     1741    //stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_REF" ;
     1742    stype = target+sep1+onstr+sep2+fswitch+sep1+refstr ;
    17121743    b = False ;
    17131744    t = 0.0 ;
     
    17151746    break ;
    17161747  case SrcType::SKY:
    1717     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ;
     1748    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ;
     1749    stype = atmcal+sep1+offstr+sep2+unspecified ;
    17181750    b = False ;
    17191751    t = 0.0 ;
     
    17211753    break ;
    17221754  case SrcType::HOT:
    1723     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ;
     1755    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ;
     1756    stype = atmcal+sep1+offstr+sep2+unspecified ;
    17241757    b = False ;
    17251758    t = 0.0 ;
     
    17271760    break ;
    17281761  case SrcType::WARM:
    1729     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ;
     1762    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ;
     1763    stype = atmcal+sep1+offstr+sep2+unspecified ;
    17301764    t = 0.0 ;
    17311765    b = False ;
     
    17331767    break ;
    17341768  case SrcType::COLD:
    1735     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ;
     1769    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,UNSPECIFIED" ;
     1770    stype = atmcal+sep1+offstr+sep2+unspecified ;
    17361771    b = False ;
    17371772    t = 0.0 ;
     
    17391774    break ;
    17401775  case SrcType::PONCAL:
    1741     stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,POSITION_SWITCH" ;
     1776    //stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,POSITION_SWITCH" ;
     1777    stype = atmcal+sep1+onstr+sep2+pswitch ;
    17421778    b = True ;
    17431779    t = 1.0 ;
     
    17451781    break ;
    17461782  case SrcType::POFFCAL:
    1747     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,POSITION_SWITCH" ;
     1783    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,POSITION_SWITCH" ;
     1784    stype = atmcal+sep1+offstr+sep2+pswitch ;
    17481785    b = False ;
    17491786    t = 1.0 ;
     
    17511788    break ;
    17521789  case SrcType::NODCAL:
    1753     stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,NOD" ;
     1790    //stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,NOD" ;
     1791    stype = atmcal+sep1+onstr+sep2+nod ;
    17541792    b = True ;
    17551793    t = 1.0 ;
     
    17571795    break ;
    17581796  case SrcType::FONCAL:
    1759     stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,FREQUENCY_SWITCH_SIG" ;
     1797    //stype = "CALIBRATE_TEMPERATURE_ON_SOURCE,FREQUENCY_SWITCH_SIG" ;
     1798    stype = atmcal+sep1+onstr+sep2+fswitch+sep1+sigstr ;
    17601799    b = True ;
    17611800    t = 1.0 ;
     
    17631802    break ;
    17641803  case SrcType::FOFFCAL:
    1765     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_REF" ;
     1804    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_REF" ;
     1805    stype = atmcal+sep1+offstr+sep2+fswitch+sep1+refstr ;
    17661806    b = False ;
    17671807    t = 1.0 ;
     
    17691809    break ;
    17701810  case SrcType::FSLO:
    1771     stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1811    //stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1812    stype = target+sep1+onstr+sep2+fswitch+sep1+ftlow ;
    17721813    b = True ;
    17731814    t = 0.0 ;
     
    17751816    break ;
    17761817  case SrcType::FLOOFF:
    1777     stype = "OBSERVE_TARGET_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1818    //stype = "OBSERVE_TARGET_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1819    stype = target+sep1+offstr+sep2+fswitch+sep1+ftlow ;
    17781820    b = False ;
    17791821    t = 0.0 ;
     
    17811823    break ;
    17821824  case SrcType::FLOSKY:
    1783     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1825    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1826    stype = atmcal+sep1+offstr+sep2+fswitch+sep1+ftlow ;
    17841827    b = False ;
    17851828    t = 0.0 ;
     
    17871830    break ;
    17881831  case SrcType::FLOHOT:
    1789     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1832    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1833    stype = atmcal+sep1+offstr+sep2+fswitch+sep1+ftlow ;
    17901834    b = False ;
    17911835    t = 0.0 ;
     
    17931837    break ;
    17941838  case SrcType::FLOWARM:
    1795     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1839    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1840    stype = atmcal+sep1+offstr+sep2+fswitch+sep1+ftlow ;
    17961841    b = False ;
    17971842    t = 0.0 ;
     
    17991844    break ;
    18001845  case SrcType::FLOCOLD:
    1801     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1846    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_LOWER" ;
     1847    stype = atmcal+sep1+offstr+sep2+fswitch+sep1+ftlow ;
    18021848    b = False ;
    18031849    t = 0.0 ;
     
    18051851    break ;
    18061852  case SrcType::FSHI:
    1807     stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1853    //stype = "OBSERVE_TARGET_ON_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1854    stype = target+sep1+onstr+sep2+fswitch+sep1+fthigh ;
    18081855    b = True ;
    18091856    t = 0.0 ;
     
    18111858    break ;
    18121859  case SrcType::FHIOFF:
    1813     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1860    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1861    stype = target+sep1+offstr+sep2+fswitch+sep1+fthigh ;
    18141862    b = False ;
    18151863    t = 0.0 ;
     
    18171865    break ;
    18181866  case SrcType::FHISKY:
    1819     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1867    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1868    stype = atmcal+sep1+offstr+sep2+fswitch+sep1+fthigh ;
    18201869    b = False ;
    18211870    t = 0.0 ;
     
    18231872    break ;
    18241873  case SrcType::FHIHOT:
    1825     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1874    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1875    stype = atmcal+sep1+offstr+sep2+fswitch+sep1+fthigh ;
    18261876    b = False ;
    18271877    t = 0.0 ;
     
    18291879    break ;
    18301880  case SrcType::FHIWARM:
    1831     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1881    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1882    stype = atmcal+sep1+offstr+sep2+fswitch+sep1+fthigh ;
    18321883    b = False ;
    18331884    t = 0.0 ;
     
    18351886    break ;
    18361887  case SrcType::FHICOLD:
    1837     stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1888    //stype = "CALIBRATE_TEMPERATURE_OFF_SOURCE,FREQUENCY_SWITCH_HIGHER" ;
     1889    stype = atmcal+sep1+offstr+sep2+fswitch+sep1+fthigh ;
    18381890    b = False ;
    18391891    t = 0.0 ;
     
    18411893    break ;
    18421894  case SrcType::SIG:
    1843     stype = "OBSERVE_TARGET_ON_SOURCE,UNSPECIFIED" ;
     1895    //stype = "OBSERVE_TARGET_ON_SOURCE,UNSPECIFIED" ;
     1896    stype = target+sep1+onstr+sep2+unspecified ;
    18441897    b = True ;
    18451898    t = 0.0 ;
     
    18471900    break ;
    18481901  case SrcType::REF:
    1849     stype = "OBSERVE_TARGET_ON_SOURCE,UNSPECIFIED" ;
     1902    //stype = "OBSERVE_TARGET_ON_SOURCE,UNSPECIFIED" ;
     1903    stype = target+sep1+offstr+sep2+unspecified ;
    18501904    b = False ;
    18511905    t = 0.0 ;
     
    18531907    break ;
    18541908  default:
    1855     stype = "UNSPECIFIED" ;
     1909    //stype = "UNSPECIFIED" ;
     1910    stype = unspecified ;
    18561911    b = True ;
    18571912    t = 0.0 ;
  • branches/casa-prerelease/pre-asap/src/SConscript

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.