Changeset 878
- Timestamp:
- 03/06/06 12:23:21 (19 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STAttr.cpp
r877 r878 1 1 //#--------------------------------------------------------------------------- 2 //# S DAttr.cc: A collection of attributes for different telescopes2 //# STAttr.cc: A collection of attributes for different telescopes 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 … … 42 42 #include <scimath/Mathematics/InterpolateArray1D.h> 43 43 44 #include "S DAttr.h"44 #include "STAttr.h" 45 45 46 46 using namespace casa; 47 47 using namespace asap; 48 48 49 S DAttr::SDAttr()49 STAttr::STAttr() 50 50 { 51 51 initData(); 52 52 } 53 53 54 S DAttr::SDAttr(const SDAttr& other)54 STAttr::STAttr(const STAttr& other) 55 55 { 56 56 initData(); // state just private 'static' data 57 57 } 58 58 59 S DAttr& SDAttr::operator=(const SDAttr& other)59 STAttr& STAttr::operator=(const STAttr& other) 60 60 { 61 61 if (this != &other) { … … 65 65 } 66 66 67 S DAttr::~SDAttr()67 STAttr::~STAttr() 68 68 {;} 69 69 70 70 71 Float S DAttr::diameter(Instrument inst) const71 Float STAttr::diameter(Instrument inst) const 72 72 { 73 73 Float D = 1.0; … … 107 107 } 108 108 109 Vector<Float> S DAttr::beamEfficiency(Instrument inst, const MEpoch& dateObs,109 Vector<Float> STAttr::beamEfficiency(Instrument inst, const MEpoch& dateObs, 110 110 const Vector<Float>& freqs) const 111 111 { … … 140 140 } 141 141 142 Vector<Float> S DAttr::apertureEfficiency(Instrument inst,142 Vector<Float> STAttr::apertureEfficiency(Instrument inst, 143 143 const MEpoch& dateObs, 144 144 const Vector<Float>& freqs) const … … 177 177 } 178 178 179 Vector<Float> S DAttr::JyPerK(Instrument inst, const MEpoch& dateObs,179 Vector<Float> STAttr::JyPerK(Instrument inst, const MEpoch& dateObs, 180 180 const Vector<Float>& freqs) const 181 181 { … … 187 187 Vector<Float> facs(freqs.nelements(),1.0); 188 188 for (uInt i=0; i<freqs.nelements(); i++) { 189 facs(i) = S DAttr::findJyPerK(etaAp(i), D);189 facs(i) = STAttr::findJyPerK(etaAp(i), D); 190 190 } 191 191 return facs; … … 193 193 194 194 195 Float S DAttr::findJyPerK(Float etaAp, Float D)195 Float STAttr::findJyPerK(Float etaAp, Float D) 196 196 // 197 197 // Converts K -> Jy … … 205 205 206 206 207 Vector<Float> S DAttr::gainElevationPoly(Instrument inst) const207 Vector<Float> STAttr::gainElevationPoly(Instrument inst) const 208 208 { 209 209 … … 223 223 } 224 224 225 FeedPolType S DAttr::feedPolType(Instrument inst) const225 FeedPolType STAttr::feedPolType(Instrument inst) const 226 226 { 227 227 FeedPolType type = UNKNOWNFEED; … … 249 249 250 250 // Private 251 Vector<Float> S DAttr::interp(const Vector<Float>& xOut,251 Vector<Float> STAttr::interp(const Vector<Float>& xOut, 252 252 const Vector<Float>& xIn, 253 253 const Vector<Float>& yIn) const … … 266 266 } 267 267 268 void S DAttr::initData()268 void STAttr::initData() 269 269 // 270 270 // Mopra data from Mopra web page … … 316 316 317 317 318 Instrument S DAttr::convertInstrument(const String& instrument,318 Instrument STAttr::convertInstrument(const String& instrument, 319 319 Bool throwIt) 320 320 { … … 322 322 t.upcase(); 323 323 324 // The strings are what S DReader returns, after cunning324 // The strings are what STReader returns, after cunning 325 325 // interrogation of station names... :-( 326 326 Instrument inst = asap::UNKNOWNINST; -
trunk/src/STAttr.h
r877 r878 1 1 //#--------------------------------------------------------------------------- 2 //# S DAttr.h: Return known attributes about telescopes2 //# STAttr.h: Return known attributes about telescopes 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 … … 36 36 #include <casa/Utilities/CountedPtr.h> 37 37 38 #include "S DLog.h"38 #include "STLog.h" 39 39 #include "STDefs.h" 40 40 … … 44 44 namespace asap { 45 45 46 class S DAttr : public SDLog {46 class STAttr : public STLog { 47 47 48 48 public: 49 49 50 50 // Constructor 51 S DAttr();51 STAttr(); 52 52 53 53 // Destructor 54 ~S DAttr();54 ~STAttr(); 55 55 56 56 // Copy Constructor (copy semantics) 57 S DAttr(const SDAttr& other);57 STAttr(const STAttr& other); 58 58 59 59 // Assignment (copy semantics) 60 S DAttr &operator=(const SDAttr& other);60 STAttr &operator=(const STAttr& other); 61 61 62 62 // Telescope diameter(m). Throws exception if unknown. -
trunk/src/STFiller.cpp
r855 r878 27 27 28 28 #include "STDefs.h" 29 #include "S DAttr.h"29 #include "STAttr.h" 30 30 31 31 #include "STFiller.h" … … 133 133 134 134 Bool throwIt = False; 135 Instrument inst = S DAttr::convertInstrument(header_->antennaname, throwIt);135 Instrument inst = STAttr::convertInstrument(header_->antennaname, throwIt); 136 136 header_->fluxunit = "Jy"; 137 137 if (inst==ATMOPRA || inst==TIDBINBILLA) { -
trunk/src/STMath.cpp
r867 r878 36 36 #include "MathUtils.h" 37 37 #include "RowAccumulator.h" 38 #include "S DAttr.h"38 #include "STAttr.h" 39 39 #include "STMath.h" 40 40 … … 536 536 Bool throwit = True; 537 537 Instrument inst = 538 S DAttr::convertInstrument(tab.keywordSet().asString("AntennaName"),538 STAttr::convertInstrument(tab.keywordSet().asString("AntennaName"), 539 539 throwit); 540 540 … … 548 548 msg = String("user"); 549 549 } else { 550 S DAttr sdAttr;550 STAttr sdAttr; 551 551 coeff = sdAttr.gainElevationPoly(inst); 552 552 ppoly = new Polynomial<Float>(3); … … 689 689 } else if ( etaap > 0.0) { 690 690 Instrument inst = 691 S DAttr::convertInstrument(tab.keywordSet().asString("AntennaName"), True);692 S DAttr sda;691 STAttr::convertInstrument(tab.keywordSet().asString("AntennaName"), True); 692 STAttr sda; 693 693 if (d < 0) d = sda.diameter(inst); 694 Float jyPerk = S DAttr::findJyPerK(etaap, d);694 Float jyPerk = STAttr::findJyPerK(etaap, d); 695 695 ostringstream oss; 696 696 oss << "Jy/K = " << jyperk; … … 721 721 Table& table = in->table(); 722 722 Instrument inst = 723 S DAttr::convertInstrument(table.keywordSet().asString("AntennaName"), True);723 STAttr::convertInstrument(table.keywordSet().asString("AntennaName"), True); 724 724 TableIterator iter(table, "FREQ_ID"); 725 725 STFrequencies stfreqs = in->frequencies(); 726 S DAttr sdAtt;726 STAttr sdAtt; 727 727 while (!iter.pastEnd()) { 728 728 Table tab = iter.table(); … … 734 734 uInt freqid; freqidCol.get(0, freqid); 735 735 Vector<Float> tmpspec; specCol.get(0, tmpspec); 736 // S DAttr.JyPerK has a Vector interface... change sometime.736 // STAttr.JyPerK has a Vector interface... change sometime. 737 737 Vector<Float> freqs(1,stfreqs.getRefFreq(freqid, tmpspec.nelements())); 738 738 for ( uInt i=0; i<tab.nrow(); ++i) { -
trunk/src/Scantable.cpp
r865 r878 54 54 55 55 #include "Scantable.h" 56 #include "S DAttr.h"56 #include "STAttr.h" 57 57 58 58 using namespace casa; … … 377 377 { 378 378 bool throwIt = true; 379 Instrument ins = S DAttr::convertInstrument(name, throwIt);379 Instrument ins = STAttr::convertInstrument(name, throwIt); 380 380 String nameU(name); 381 381 nameU.upcase();
Note:
See TracChangeset
for help on using the changeset viewer.