Changeset 1439


Ignore:
Timestamp:
08/28/08 14:00:03 (16 years ago)
Author:
Malte Marquarding
Message:

added Header diff function. Don't use obstype for conformance test

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STHeader.cpp

    r901 r1439  
    5353  conforms = (this->antennaname == other.antennaname
    5454              && this->equinox == other.equinox
    55               && this->obstype == other.obstype
    5655              && this->fluxunit == other.fluxunit
    5756              );
    5857  return conforms;
     58}
     59
     60String STHeader::diff( const STHeader& other )
     61{
     62  ostringstream thediff;
     63  if ( this->equinox != other.equinox ) {
     64    thediff  << "Equinox: "  << this->equinox << " <-> "
     65             << other.equinox << endl;
     66  }
     67  if ( this->obstype != other.obstype ) {
     68    thediff << "Obs. Type: " << this->obstype << " <-> "
     69            << other.obstype << endl;
     70  }
     71  if ( this->fluxunit != other.fluxunit ) {
     72    thediff << "Flux unit: " << this->fluxunit << " <-> "
     73            << other.fluxunit << endl;
     74  }
     75  return String(thediff);
    5976}
    6077
  • trunk/src/STHeader.h

    r1030 r1439  
    2727//#                        AUSTRALIA
    2828//#
    29 //# $Id:$
     29//# $Id$
    3030//#---------------------------------------------------------------------------
    3131#ifndef STHEADER_H
     
    5050
    5151  bool conformant(const STHeader& other);
     52  casa::String diff( const STHeader& other );
     53
    5254
    5355  casa::Int nchan;
  • trunk/src/STMath.cpp

    r1416 r1439  
    15381538  while ( it != in.end() ){
    15391539    if ( ! (*it)->conformant(*out) ) {
    1540       // log message: "ignoring scantable i, as it isn't
    1541       // conformant with the other(s)"
     1540      // non conformant.
    15421541      pushLog(String("Warning: Can't merge scantables as header info differs."));
    1543       ++it;
    1544       continue;
    15451542    }
    15461543    out->appendToHistoryTable((*it)->history());
Note: See TracChangeset for help on using the changeset viewer.