Changeset 878 for trunk/src


Ignore:
Timestamp:
03/06/06 12:23:21 (19 years ago)
Author:
mar637
Message:

SDAttr->STAttr name change

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STAttr.cpp

    r877 r878  
    11//#---------------------------------------------------------------------------
    2 //# SDAttr.cc: A collection of attributes for different telescopes
     2//# STAttr.cc: A collection of attributes for different telescopes
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
     
    4242#include <scimath/Mathematics/InterpolateArray1D.h>
    4343
    44 #include "SDAttr.h"
     44#include "STAttr.h"
    4545
    4646using namespace casa;
    4747using namespace asap;
    4848
    49 SDAttr::SDAttr()
     49STAttr::STAttr()
    5050{
    5151   initData();
    5252}
    5353
    54 SDAttr::SDAttr(const SDAttr& other)
     54STAttr::STAttr(const STAttr& other)
    5555{
    5656   initData();                     // state just private 'static' data
    5757}
    5858
    59 SDAttr& SDAttr::operator=(const SDAttr& other)
     59STAttr& STAttr::operator=(const STAttr& other)
    6060{
    6161  if (this != &other) {
     
    6565}
    6666
    67 SDAttr::~SDAttr()
     67STAttr::~STAttr()
    6868{;}
    6969
    7070
    71 Float SDAttr::diameter(Instrument inst)  const
     71Float STAttr::diameter(Instrument inst)  const
    7272{
    7373   Float D = 1.0;
     
    107107}
    108108
    109 Vector<Float> SDAttr::beamEfficiency(Instrument inst, const MEpoch& dateObs,
     109Vector<Float> STAttr::beamEfficiency(Instrument inst, const MEpoch& dateObs,
    110110                                      const Vector<Float>& freqs) const
    111111{
     
    140140}
    141141
    142 Vector<Float> SDAttr::apertureEfficiency(Instrument inst,
     142Vector<Float> STAttr::apertureEfficiency(Instrument inst,
    143143                                         const MEpoch& dateObs,
    144144                                         const Vector<Float>& freqs) const
     
    177177}
    178178
    179 Vector<Float> SDAttr::JyPerK(Instrument inst, const MEpoch& dateObs,
     179Vector<Float> STAttr::JyPerK(Instrument inst, const MEpoch& dateObs,
    180180                             const Vector<Float>& freqs) const
    181181{
     
    187187   Vector<Float> facs(freqs.nelements(),1.0);
    188188   for (uInt i=0; i<freqs.nelements(); i++) {
    189      facs(i) = SDAttr::findJyPerK(etaAp(i), D);
     189     facs(i) = STAttr::findJyPerK(etaAp(i), D);
    190190   }
    191191   return facs;
     
    193193
    194194
    195 Float SDAttr::findJyPerK(Float etaAp, Float D)
     195Float STAttr::findJyPerK(Float etaAp, Float D)
    196196  //
    197197  // Converts K -> Jy
     
    205205
    206206
    207 Vector<Float> SDAttr::gainElevationPoly(Instrument inst) const
     207Vector<Float> STAttr::gainElevationPoly(Instrument inst) const
    208208{
    209209
     
    223223}
    224224
    225 FeedPolType SDAttr::feedPolType(Instrument inst) const
     225FeedPolType STAttr::feedPolType(Instrument inst) const
    226226{
    227227  FeedPolType type = UNKNOWNFEED;
     
    249249
    250250// Private
    251 Vector<Float> SDAttr::interp(const Vector<Float>& xOut,
     251Vector<Float> STAttr::interp(const Vector<Float>& xOut,
    252252                             const Vector<Float>& xIn,
    253253                             const Vector<Float>& yIn) const
     
    266266}
    267267
    268 void SDAttr::initData()
     268void STAttr::initData()
    269269  //
    270270  // Mopra data from Mopra web page
     
    316316
    317317
    318 Instrument SDAttr::convertInstrument(const String& instrument,
     318Instrument STAttr::convertInstrument(const String& instrument,
    319319                                     Bool throwIt)
    320320{
     
    322322  t.upcase();
    323323 
    324   // The strings are what SDReader returns, after cunning
     324  // The strings are what STReader returns, after cunning
    325325  // interrogation of station names... :-(
    326326  Instrument inst = asap::UNKNOWNINST;
  • trunk/src/STAttr.h

    r877 r878  
    11//#---------------------------------------------------------------------------
    2 //# SDAttr.h: Return known attributes about telescopes
     2//# STAttr.h: Return known attributes about telescopes
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
     
    3636#include <casa/Utilities/CountedPtr.h>
    3737
    38 #include "SDLog.h"
     38#include "STLog.h"
    3939#include "STDefs.h"
    4040
     
    4444namespace asap {
    4545
    46 class SDAttr : public SDLog {
     46class STAttr : public STLog {
    4747
    4848 public:
    4949
    5050  // Constructor
    51   SDAttr();
     51  STAttr();
    5252 
    5353  // Destructor
    54   ~SDAttr();
     54  ~STAttr();
    5555 
    5656  // Copy Constructor (copy semantics)
    57   SDAttr(const SDAttr& other);
     57  STAttr(const STAttr& other);
    5858 
    5959  // Assignment  (copy semantics)
    60   SDAttr &operator=(const SDAttr& other);
     60  STAttr &operator=(const STAttr& other);
    6161 
    6262  // Telescope diameter(m). Throws exception if unknown.
  • trunk/src/STFiller.cpp

    r855 r878  
    2727
    2828#include "STDefs.h"
    29 #include "SDAttr.h"
     29#include "STAttr.h"
    3030
    3131#include "STFiller.h"
     
    133133
    134134  Bool throwIt = False;
    135   Instrument inst = SDAttr::convertInstrument(header_->antennaname, throwIt);
     135  Instrument inst = STAttr::convertInstrument(header_->antennaname, throwIt);
    136136  header_->fluxunit = "Jy";
    137137  if (inst==ATMOPRA || inst==TIDBINBILLA) {
  • trunk/src/STMath.cpp

    r867 r878  
    3636#include "MathUtils.h"
    3737#include "RowAccumulator.h"
    38 #include "SDAttr.h"
     38#include "STAttr.h"
    3939#include "STMath.h"
    4040
     
    536536    Bool throwit = True;
    537537    Instrument inst =
    538       SDAttr::convertInstrument(tab.keywordSet().asString("AntennaName"),
     538      STAttr::convertInstrument(tab.keywordSet().asString("AntennaName"),
    539539                                throwit);
    540540
     
    548548      msg = String("user");
    549549    } else {
    550       SDAttr sdAttr;
     550      STAttr sdAttr;
    551551      coeff = sdAttr.gainElevationPoly(inst);
    552552      ppoly = new Polynomial<Float>(3);
     
    689689  } else if ( etaap > 0.0) {
    690690    Instrument inst =
    691       SDAttr::convertInstrument(tab.keywordSet().asString("AntennaName"), True);
    692     SDAttr sda;
     691      STAttr::convertInstrument(tab.keywordSet().asString("AntennaName"), True);
     692    STAttr sda;
    693693    if (d < 0) d = sda.diameter(inst);
    694     Float jyPerk = SDAttr::findJyPerK(etaap, d);
     694    Float jyPerk = STAttr::findJyPerK(etaap, d);
    695695    ostringstream oss;
    696696    oss << "Jy/K = " << jyperk;
     
    721721  Table& table = in->table();
    722722  Instrument inst =
    723     SDAttr::convertInstrument(table.keywordSet().asString("AntennaName"), True);
     723    STAttr::convertInstrument(table.keywordSet().asString("AntennaName"), True);
    724724  TableIterator iter(table, "FREQ_ID");
    725725  STFrequencies stfreqs = in->frequencies();
    726   SDAttr sdAtt;
     726  STAttr sdAtt;
    727727  while (!iter.pastEnd()) {
    728728    Table tab = iter.table();
     
    734734    uInt freqid; freqidCol.get(0, freqid);
    735735    Vector<Float> tmpspec; specCol.get(0, tmpspec);
    736     // SDAttr.JyPerK has a Vector interface... change sometime.
     736    // STAttr.JyPerK has a Vector interface... change sometime.
    737737    Vector<Float> freqs(1,stfreqs.getRefFreq(freqid, tmpspec.nelements()));
    738738    for ( uInt i=0; i<tab.nrow(); ++i) {
  • trunk/src/Scantable.cpp

    r865 r878  
    5454
    5555#include "Scantable.h"
    56 #include "SDAttr.h"
     56#include "STAttr.h"
    5757
    5858using namespace casa;
     
    377377{
    378378  bool throwIt = true;
    379   Instrument ins = SDAttr::convertInstrument(name, throwIt);
     379  Instrument ins = STAttr::convertInstrument(name, throwIt);
    380380  String nameU(name);
    381381  nameU.upcase();
Note: See TracChangeset for help on using the changeset viewer.