Changeset 476


Ignore:
Timestamp:
02/18/05 11:53:33 (19 years ago)
Author:
kil064
Message:

move function convertInstrument to SDAttr

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTable.cc

    r472 r476  
    6363#include "MathUtils.h"
    6464#include "SDPol.h"
     65#include "SDAttr.h"
    6566
    6667#include "SDMemTable.h"
     
    13591360{
    13601361  Bool throwIt = True;
    1361   Instrument ins = convertInstrument(name, throwIt);
     1362  Instrument ins = SDAttr::convertInstrument(name, throwIt);
    13621363  String nameU(name);
    13631364  nameU.upcase();
     
    15811582
    15821583
    1583 Instrument SDMemTable::convertInstrument(const String& instrument,
    1584                                          Bool throwIt)
    1585 {
    1586    String t(instrument);
    1587    t.upcase();
    1588 
    1589    // The strings are what SDReader returns, after cunning interrogation
    1590    // of station names... :-(
    1591    Instrument inst = asap::UNKNOWN;
    1592    if (t==String("DSS-43")) {               
    1593       inst = TIDBINBILLA;
    1594    } else if (t==String("ATPKSMB")) {
    1595       inst = ATPKSMB;
    1596    } else if (t==String("ATPKSHOH")) {
    1597       inst = ATPKSHOH;
    1598    } else if (t==String("ATMOPRA")) {
    1599       inst = ATMOPRA;
    1600    } else if (t==String("CEDUNA")) {
    1601       inst = CEDUNA;
    1602    } else if (t==String("HOBART")) {
    1603       inst = HOBART;
    1604    } else {
    1605      if (throwIt) {
    1606        throw AipsError("Unrecognized instrument - use function scan.set_instrument to set");
    1607      }
    1608    }
    1609    return inst;
    1610 }
    1611 
    16121584Bool SDMemTable::setRestFreqs(const Vector<Double>& restFreqsIn,
    16131585                              const String& sUnit,
  • trunk/src/SDMemTable.h

    r472 r476  
    248248  casa::MPosition getAntennaPosition() const;
    249249
    250 // Helper function to check instrument (antenna) name and give enum
    251   static Instrument convertInstrument(const casa::String& instrument,
    252                                       casa::Bool throwIt);
    253  
    254250  bool putSDFitTable(const SDFitTable& sdft);
    255251  SDFitTable getSDFitTable() const;
Note: See TracChangeset for help on using the changeset viewer.