- Timestamp:
- 07/29/10 21:42:50 (14 years ago)
- Location:
- branches/newfiller/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/newfiller/src/FillerBase.cpp
r1778 r1780 11 11 // 12 12 13 #include "FillberBase.h" 13 #include <casa/Containers/RecordField.h> 14 15 #include "FillerBase.h" 14 16 15 17 using namespace casa; … … 18 20 { 19 21 FillerBase::FillerBase() : 20 table_(0) ,22 table_(0) 21 23 { 22 24 } … … 38 40 RecordFieldPtr<uInt> polCol(row_.record(), "POLNO"); 39 41 RecordFieldPtr<uInt> cycleCol(row_.record(), "CYCLENO"); 40 RecordFieldPtr<uInt> scanCol Col(row_.record(), "SCANNO");42 RecordFieldPtr<uInt> scanCol(row_.record(), "SCANNO"); 41 43 *beamCol = beamno; 42 44 *cycleCol = cycleno; … … 47 49 48 50 void FillerBase::setFrequency(Double refpix, Double refval, 49 Double incr) ;51 Double incr) 50 52 { 51 53 /// @todo this has to change when nchan isn't global anymore … … 57 59 58 60 59 void FillerBase::setMolecule( Doublerestfreq)61 void FillerBase::setMolecule(const Vector<Double>& restfreq) 60 62 { 61 uInt id = table_->molecules().addEntry(restfreq); 63 Vector<String> tmp; 64 uInt id = table_->molecules().addEntry(restfreq, tmp, tmp); 62 65 RecordFieldPtr<uInt> molidCol(row_.record(), "MOLECULE_ID"); 63 66 *molidCol = id; 64 67 } 65 68 66 void FillerBase::setDirection(const Vector<Double>& dir .69 void FillerBase::setDirection(const Vector<Double>& dir, 67 70 Float az, Float el) 68 71 { … … 112 115 void FillerBase::setScanRate(const Vector<Double>& srate) 113 116 { 114 115 117 RecordFieldPtr<Array<Double> > srateCol(row_.record(), "SCANRATE"); 116 118 *srateCol = srate; 117 118 119 } 119 120 … … 128 129 const Vector<Double>& dir, 129 130 const Vector<Double>& propermot, 130 Double velocity)131 Double velocity) 131 132 { 132 133 RecordFieldPtr<String> srcnCol(row_.record(), "SRCNAME"); 133 *sr nCol = name;134 *srcnCol = name; 134 135 RecordFieldPtr<Int> srctCol(row_.record(), "SRCTYPE"); 135 136 *srctCol = type; … … 137 138 *fieldnCol = fieldname; 138 139 RecordFieldPtr<Array<Double> > spmCol(row_.record(), "SRCPROPERMOTION"); 139 *spmCol = p ksrec.srcPM;140 *spmCol = propermot; 140 141 RecordFieldPtr<Array<Double> > sdirCol(row_.record(), "SRCDIRECTION"); 141 *sdirCol = pksrec.srcDir;142 *sdirCol = dir; 142 143 RecordFieldPtr<Double> svelCol(row_.record(), "SRCVELOCITY"); 143 *svelCol = pksrec.srcVel;144 *svelCol = velocity; 144 145 } 145 146 -
branches/newfiller/src/FillerBase.h
r1778 r1780 27 27 // STL 28 28 #include <string> 29 #include <vector>30 29 // AIPS++ 31 30 #include <casa/aips.h> 31 #include <casa/Utilities/CountedPtr.h> 32 #include <casa/Arrays/Vector.h> 33 #include <tables/Tables/TableRow.h> 34 #include "Scantable.h" 32 35 33 36 namespace asap … … 50 53 void commitRow(); 51 54 virtual void setHeader(const STHeader& header); 52 virtual void setSpectrum(const casa::Vector<Float>& spectrum, 53 const casa::Vector<uChar>& flags) ; 54 virtual void setIndex(uInt scanno, uInt cycleno, uInt ifno, uInt polno, 55 uInt beamno=0); 55 virtual void setSpectrum(const casa::Vector<casa::Float>& spectrum, 56 const casa::Vector<casa::uChar>& flags) ; 57 virtual void setIndex(casa::uInt scanno, casa::uInt cycleno, 58 casa::uInt ifno, casa::uInt polno, 59 casa::uInt beamno=0); 56 60 virtual void setFrequency(casa::Double refpix, casa::Double refval, 57 61 casa::Double incr); 58 virtual void setMolecule(c asa::Doublerestfreq);59 virtual void setDirection(const casa::Vector< Double>& dir,62 virtual void setMolecule(const casa::Vector<casa::Double>& restfreq); 63 virtual void setDirection(const casa::Vector<casa::Double>& dir, 60 64 casa::Float az=0.0f, casa::Float el=0.0f); 61 65 62 66 virtual void setFocus(casa::Float pa=0.0f, casa::Float faxis=0.0f, 63 casa::Float ftan=0.0f, casa::Float frot=0.0f) 67 casa::Float ftan=0.0f, casa::Float frot=0.0f); 64 68 virtual void setTime(casa::Double mjd, casa::Double integration); 65 69 virtual void setWeather(casa::Float temperature=0.0f, … … 69 73 casa::Float windaz=0.0f); 70 74 virtual void setTcal(const casa::String& caltime="", 71 const casa::Vector< Float>& tcal=casa::Vector<Float>())72 virtual void setScanRate(const casa::Vector< Double>& srate=casa::Vector<Double>());73 virtual void setReferenceBeam( Int beamno=-1);74 virtual void setSource(const std::string& name, Int type,75 const casa::Vector<casa::Float>& tcal=casa::Vector<casa::Float>()); 76 virtual void setScanRate(const casa::Vector<casa::Double>& srate=casa::Vector<casa::Double>()); 77 virtual void setReferenceBeam(casa::Int beamno=-1); 78 virtual void setSource(const std::string& name, casa::Int type, 75 79 const std::string& fieldname="", 76 const casa::Vector< Double>& dircasa::Vector<Double>(),77 const casa::Vector< Double>& propermot=casa::Vector<Double>(),78 Double velocity=0.0);80 const casa::Vector<casa::Double>& dir=casa::Vector<casa::Double>(), 81 const casa::Vector<casa::Double>& propermot=casa::Vector<casa::Double>(), 82 casa::Double velocity=0.0); 79 83 80 84 private: … … 84 88 85 89 casa::TableRow row_; 86 } 90 }; 87 91 88 92 89 93 }; 94 #endif
Note:
See TracChangeset
for help on using the changeset viewer.