Changeset 921 for trunk/src


Ignore:
Timestamp:
03/24/06 13:27:48 (19 years ago)
Author:
mar637
Message:

Added setFrame form measures, implemented setFrame for both base and userframe

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STFrequencies.cpp

    r887 r921  
    225225{
    226226  // get the ref frame
    227   String rf = table_.keywordSet().asString("BASEFRAME");
     227  String rf;
     228  if ( base )
     229    rf = table_.keywordSet().asString("BASEFRAME");
     230  else
     231    rf = table_.keywordSet().asString("FRAME");
    228232
    229233  // Create SpectralCoordinate (units Hz)
     
    346350}
    347351
    348 void asap::STFrequencies::setFrame( const std::string & frame )
     352void asap::STFrequencies::setFrame(MFrequency::Types frame, bool base )
     353{
     354  String f = MFrequency::showType(frame);
     355  if (base)
     356    table_.rwKeywordSet().define("BASEFRAME", f);
     357  else
     358    table_.rwKeywordSet().define("FRAME", f);
     359
     360}
     361
     362void asap::STFrequencies::setFrame( const std::string & frame, bool base )
    349363{
    350364  MFrequency::Types mdr;
     
    359373    throw(AipsError(msg));
    360374  } else {
    361     table_.rwKeywordSet().define("FRAME", frame);
     375    if (base)
     376      table_.rwKeywordSet().define("BASEFRAME", frame);
     377    else
     378      table_.rwKeywordSet().define("FRAME", frame);
    362379  }
    363380}
  • trunk/src/STFrequencies.h

    r866 r921  
    109109   * @param frame a string identifier
    110110   */
    111   void setFrame(const std::string& frame);
     111  void setFrame(const std::string& frame, bool base=false);
    112112  /**
    113113   * set the frequency frame from a casa::MFrequency::Types
    114114   * @param frame casa::MFrequency::Types
    115115   */
    116   void setFrame(casa::MFrequency::Types frame);
     116  void setFrame(casa::MFrequency::Types frame, bool base=false);
    117117  void setUnit( const std::string & unit );
    118118  void setDoppler( const std::string & doppler );
Note: See TracChangeset for help on using the changeset viewer.