Changeset 125
- Timestamp:
- 12/10/04 14:54:54 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MathUtils.cc
r81 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 30 30 //#--------------------------------------------------------------------------- 31 31 32 #include <casa/aips.h> 32 33 #include <casa/Arrays/Vector.h> 33 34 #include <casa/Arrays/VectorSTLIterator.h> 34 35 36 #include "MathUtils.h" 37 38 using namespace casa; 39 //using namespace asap; 40 35 41 template <class T> 36 void hanning(Vector<T>& out, Vector<Bool>& outmask,42 void mathutil::hanning(Vector<T>& out, Vector<Bool>& outmask, 37 43 const Vector<T>& in, const Vector<Bool>& mask, 38 44 Bool relaxed, Bool ignoreOther) { -
trunk/src/MathUtils.h
r81 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _MATHUTILS_H32 #define _MATHUTILS_H31 #ifndef MATHUTILS_H 32 #define MATHUTILS_H 33 33 34 34 #include <casa/aips.h> 35 35 #include <casa/Arrays/Vector.h> 36 36 37 namespace mathutil { 38 37 39 template <class T> 38 void hanning(Vector<T>& out, Vector<Bool>& outmask, 39 const Vector<T>& in, const Vector<Bool>& mask, 40 Bool relaxed=False, Bool ignoreOther=False); 40 void hanning(casa::Vector<T>& out, casa::Vector<casa::Bool>& outmask, 41 const casa::Vector<T>& in, const casa::Vector<casa::Bool>& mask, 42 casa::Bool relaxed=False, casa::Bool ignoreOther=False); 43 44 }; 41 45 42 46 #endif -
trunk/src/SDContainer.cc
r104 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #include <casa/aips.h> 31 32 #include <casa/Exceptions.h> 32 33 #include <tables/Tables/Table.h> 33 34 #include <casa/Arrays/IPosition.h> 35 #include <casa/Arrays/Matrix.h> 34 36 #include <casa/Arrays/ArrayAccessor.h> 35 #include <casa/Arrays/Matrix.h>36 37 #include <casa/Quanta/MVTime.h> 37 38 38 39 #include "SDContainer.h" 39 40 41 using namespace casa; 40 42 using namespace asap; 41 43 … … 195 197 } 196 198 197 Array<Float> SDContainer::getSpectrum(uInt whichBeam, uInt whichIF) const { 199 Array<Float> SDContainer::getSpectrum(uInt whichBeam, uInt whichIF) const 200 { 198 201 Matrix<Float> spectra(nChan_, nPol_); 199 202 … … 228 231 return spectra.copy(); 229 232 } 233 230 234 231 235 Array<uChar> SDContainer::getFlags(uInt whichBeam, uInt whichIF) const -
trunk/src/SDContainer.h
r104 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _SDCONTAINER_H32 #define _SDCONTAINER_H31 #ifndef SDCONTAINER_H 32 #define SDCONTAINER_H 33 33 34 34 #include <vector> … … 39 39 #include <casa/Arrays/Vector.h> 40 40 41 template<class T> class Matrix;41 template<class T> class casa::Matrix; 42 42 43 43 namespace asap { … … 45 45 46 46 struct SDHeader { 47 Int nchan;48 Int npol;49 Int nif;50 Int nbeam;51 String observer;52 String project;53 String obstype;54 String antennaname;55 Vector<Double> antennaposition;56 Float equinox;57 String freqref;58 Double reffreq;59 Double bandwidth;60 Double utc;47 casa::Int nchan; 48 casa::Int npol; 49 casa::Int nif; 50 casa::Int nbeam; 51 casa::String observer; 52 casa::String project; 53 casa::String obstype; 54 casa::String antennaname; 55 casa::Vector<casa::Double> antennaposition; 56 casa::Float equinox; 57 casa::String freqref; 58 casa::Double reffreq; 59 casa::Double bandwidth; 60 casa::Double utc; 61 61 void print() const ; 62 62 }; … … 69 69 virtual ~SDFrequencyTable() {;} 70 70 71 Int length() const { return nFreq_;};// # of stored Frequencies71 casa::Int length() const { return nFreq_;};// # of stored Frequencies 72 72 73 Double referencePixel(uInt which) const { return refPix_[which];}74 Double referenceValue(uInt which) const { return refVal_[which];}75 Double increment(uInt which) const { return increment_[which];}76 Float equinox() const { return equinox_; }77 String refFrame() const { return refFrame_; }73 casa::Double referencePixel(casa::uInt which) const { return refPix_[which];} 74 casa::Double referenceValue(casa::uInt which) const { return refVal_[which];} 75 casa::Double increment(casa::uInt which) const { return increment_[which];} 76 casa::Float equinox() const { return equinox_; } 77 casa::String refFrame() const { return refFrame_; } 78 78 79 79 // returns the index into the table 80 80 // this creates a new one or returns an existing one 81 Int addFrequency(Int refPix, Double refVal, Double inc); 82 void setEquinox(Float eq) { equinox_ = eq; } 83 void setRefFrame(const String& reff) { refFrame_ = reff; } 81 casa::Int addFrequency(casa::Int refPix, casa::Double refVal, 82 casa::Double inc); 83 void setEquinox(casa::Float eq) { equinox_ = eq; } 84 void setRefFrame(const casa::String& reff) { refFrame_ = reff; } 84 85 85 86 private: 86 Int nFreq_;87 Vector<Double> refPix_;88 Vector<Double> refVal_;89 Vector<Double> increment_;90 Float equinox_;91 String refFrame_;87 casa::Int nFreq_; 88 casa::Vector<casa::Double> refPix_; 89 casa::Vector<casa::Double> refVal_; 90 casa::Vector<casa::Double> increment_; 91 casa::Float equinox_; 92 casa::String refFrame_; 92 93 }; 93 94 … … 96 97 97 98 public: 98 SDContainer(uInt nBeam, uInt nIF, uInt nPol, uInt nChan); 99 SDContainer(IPosition shp); 99 SDContainer(casa::uInt nBeam, casa::uInt nIF, casa::uInt nPol, 100 casa::uInt nChan); 101 SDContainer(casa::IPosition shp); 100 102 101 103 virtual ~SDContainer(); 102 104 103 Bool resize(IPosition shp);105 casa::Bool resize(casa::IPosition shp); 104 106 105 Bool setSpectrum(const Matrix<Float>& spec,106 uInt whichBeam,uInt whichIF);107 Bool putSpectrum(const Array<Float>& spec);107 casa::Bool setSpectrum(const casa::Matrix<casa::Float>& spec, 108 casa::uInt whichBeam, casa::uInt whichIF); 109 casa::Bool putSpectrum(const casa::Array<casa::Float>& spec); 108 110 109 Bool setFlags(const Matrix<uChar>& flgs,110 uInt whichBeam,uInt whichIF);111 Bool putFlags(const Array<uChar>& spec);111 casa::Bool setFlags(const casa::Matrix<casa::uChar>& flgs, 112 casa::uInt whichBeam, casa::uInt whichIF); 113 casa::Bool putFlags(const casa::Array<casa::uChar>& spec); 112 114 113 Bool setTsys(const Vector<Float>& ts,114 uInt whichBeam,uInt whichIF);115 Bool putTsys(const Array<Float>& spec);115 casa::Bool setTsys(const casa::Vector<casa::Float>& ts, 116 casa::uInt whichBeam, casa::uInt whichIF); 117 casa::Bool putTsys(const casa::Array<casa::Float>& spec); 116 118 117 Bool setDirection(const Vector<Double>& point, uInt whichBeam); 118 Bool putDirection(const Array<Double>& dir); 119 casa::Bool setDirection(const casa::Vector<casa::Double>& point, 120 casa::uInt whichBeam); 121 casa::Bool putDirection(const casa::Array<casa::Double>& dir); 119 122 120 Bool setFrequencyMap(uInt freqslot,uInt whichIF);121 Bool putFreqMap(const Vector<uInt>& freqs);123 casa::Bool setFrequencyMap(casa::uInt freqslot, casa::uInt whichIF); 124 casa::Bool putFreqMap(const casa::Vector<casa::uInt>& freqs); 122 125 123 Array<Float> getSpectrum(uInt whichBeam, uInt whichIF) const; 124 Array<uChar> getFlags(uInt whichBeam, uInt whichIF) const; 125 Array<Float> getTsys(uInt whichBeam, uInt whichIF) const; 126 Array<Double> getDirection(uInt whichBeam) const; 126 casa::Array<casa::Float> getSpectrum(casa::uInt whichBeam, 127 casa::uInt whichIF) const; 128 casa::Array<casa::uChar> getFlags(casa::uInt whichBeam, 129 casa::uInt whichIF) const; 130 casa::Array<casa::Float> getTsys(casa::uInt whichBeam, 131 casa::uInt whichIF) const; 132 casa::Array<casa::Double> getDirection(casa::uInt whichBeam) const; 127 133 128 const Array<Float>& getSpectrum() const { return spectrum_; }129 const Array<uChar>& getFlags() const { return flags_; }130 const Array<Float>& getTsys() const { return tsys_; }131 const Array<Double>& getDirection() const { return direction_; }134 const casa::Array<casa::Float>& getSpectrum() const { return spectrum_; } 135 const casa::Array<casa::uChar>& getFlags() const { return flags_; } 136 const casa::Array<casa::Float>& getTsys() const { return tsys_; } 137 const casa::Array<casa::Double>& getDirection() const { return direction_; } 132 138 133 const Vector<uInt>& getFreqMap() const { return freqidx_; }139 const casa::Vector<casa::uInt>& getFreqMap() const { return freqidx_; } 134 140 135 Double timestamp;141 casa::Double timestamp; 136 142 //Double bandwidth; 137 String sourcename;138 String fieldname;139 Double interval;140 Int scanid;141 Vector<Float> tcal;142 String tcaltime;143 Float azimuth;144 Float elevation;145 Float parangle;146 Int refbeam;143 casa::String sourcename; 144 casa::String fieldname; 145 casa::Double interval; 146 casa::Int scanid; 147 casa::Vector<casa::Float> tcal; 148 casa::String tcaltime; 149 casa::Float azimuth; 150 casa::Float elevation; 151 casa::Float parangle; 152 casa::Int refbeam; 147 153 148 154 private: 149 uInt nBeam_,nIF_,nPol_,nChan_;155 casa::uInt nBeam_,nIF_,nPol_,nChan_; 150 156 151 157 // (nBeam,nIF,nPol,nChannel) 152 Array<Float> spectrum_;153 Array<uChar> flags_;158 casa::Array<casa::Float> spectrum_; 159 casa::Array<casa::uChar> flags_; 154 160 // (nBeam,nIF,nPol,[nChannel]) Tsys is not really a function of 155 161 // channel, but this makes it easier to work with at the expense of 156 162 // a little memory 157 Array<Float> tsys_;158 Array<Float> tcal_;163 casa::Array<casa::Float> tsys_; 164 casa::Array<casa::Float> tcal_; 159 165 160 166 //(nIF) indx into "global" frequency table 161 Vector<uInt>freqidx_;167 casa::Vector<casa::uInt> freqidx_; 162 168 //(nBeam,2) maybe use Measures here... 163 Array<Double>direction_;169 casa::Array<casa::Double> direction_; 164 170 165 171 }; -
trunk/src/SDFitter.cc
r108 r125 3 3 //#-------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #include <casa/aips.h> 31 32 #include <casa/Arrays/ArrayMath.h> 32 33 #include <casa/Arrays/ArrayLogical.h> … … 44 45 #include "SDFitter.h" 45 46 using namespace asap; 47 using namespace casa; 46 48 47 49 SDFitter::SDFitter() -
trunk/src/SDFitter.h
r91 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 68 68 private: 69 69 void clear(); 70 Vector<Float> x_;71 Vector<Float> y_;72 Vector<Bool> m_;73 PtrBlock<Function<Float>* > funcs_;74 CompoundFunction<Float> cfunc_;70 casa::Vector<casa::Float> x_; 71 casa::Vector<casa::Float> y_; 72 casa::Vector<casa::Bool> m_; 73 casa::PtrBlock<casa::Function<casa::Float>* > funcs_; 74 casa::CompoundFunction<casa::Float> cfunc_; 75 75 //Bool estimateSet_; 76 Float chisquared_;77 Vector<Float> parameters_;78 Vector<Bool> fixedpar_;76 casa::Float chisquared_; 77 casa::Vector<casa::Float> parameters_; 78 casa::Vector<casa::Bool> fixedpar_; 79 79 80 Vector<Float> error_;81 Vector<Float> thefit_;82 Vector<Float> residual_;83 Vector<Float> estimate_;80 casa::Vector<casa::Float> error_; 81 casa::Vector<casa::Float> thefit_; 82 casa::Vector<casa::Float> residual_; 83 casa::Vector<casa::Float> estimate_; 84 84 }; 85 85 -
trunk/src/SDMath.cc
r107 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 42 42 #include <casa/Arrays/MaskArrMath.h> 43 43 #include <casa/Arrays/MaskArrLogi.h> 44 #include <casa/Arrays/VectorIter.h> 44 45 45 46 #include <tables/Tables/Table.h> … … 61 62 #include "SDMath.h" 62 63 64 using namespace casa; 63 65 using namespace asap; 64 66 //using namespace asap::SDMath; … … 192 194 193 195 194 195 bool SDMath::fit(Vector<Float>& thefit, const Vector<Float>& data, 196 const Vector<Bool>& mask, 197 const std::string& fitexpr) { 198 199 LinearFit<Float> fitter; 200 Vector<Float> x(data.nelements()); 201 indgen(x); 202 CompiledFunction<AutoDiff<Float> > fn; 203 fn.setFunction(String(fitexpr)); 204 fitter.setFunction(fn); 205 Vector<Float> out,out1; 206 out = fitter.fit(x,data,&mask); 207 thefit = data; 208 fitter.residual(thefit, x); 209 cout << "Parameter solution = " << out << endl; 210 return True; 211 } 212 213 CountedPtr<SDMemTable> 214 SDMath::baseline(const CountedPtr<SDMemTable>& in, 215 const std::string& fitexpr, 216 const std::vector<bool>& mask) { 217 218 IPosition ip = in->rowAsMaskedArray(0).shape(); 219 SDContainer sc = in->getSDContainer(); 220 String sname(in->getSourceName()); 221 String stim(in->getTime()); 222 cout << "Fitting: " << String(fitexpr) << " to " 223 << sname << " [" << stim << "]" << ":" <<endl; 224 MaskedArray<Float> marr(in->rowAsMaskedArray(0)); 225 Vector<Bool> inmask(mask); 226 Array<Float> arr = marr.getArray(); 227 Array<Bool> barr = marr.getMask(); 228 for (uInt i=0; i<in->nBeam();++i) { 229 for (uInt j=0; j<in->nIF();++j) { 230 for (uInt k=0; k<in->nPol();++k) { 231 IPosition start(4,i,j,k,0); 232 IPosition end(4,i,j,k,in->nChan()-1); 233 Array<Float> subArr(arr(start,end)); 234 Array<Bool> subMask(barr(start,end)); 235 Vector<Float> outv; 236 Vector<Float> v(subArr.nonDegenerate()); 237 Vector<Bool> m(subMask.nonDegenerate()); 238 cout << "\t Polarisation " << k << "\t"; 239 SDMath::fit(outv, v, m&&inmask, fitexpr); 240 ArrayAccessor<Float, Axis<0> > aa0(outv); 241 for (ArrayAccessor<Float, Axis<3> > aa(subArr); aa != aa.end();++aa) { 242 (*aa) = (*aa0); 243 aa0++; 244 } 245 } 246 } 247 } 248 Array<uChar> outflags(barr.shape()); 249 convertArray(outflags,!barr); 250 sc.putSpectrum(arr); 251 sc.putFlags(outflags); 252 SDMemTable* sdmt = new SDMemTable(*in,True); 253 sdmt->putSDContainer(sc); 254 return CountedPtr<SDMemTable>(sdmt); 255 } 256 196 // Start NEBK 197 // SHow how to do above with VectorIterator 198 199 // uInt axis = 3; 200 // VectorIterator<Float> itData(arr, axis); 201 // ReadOnlyVectorIterator<Bool> itMask(barr, axis); 202 // Vector<Float> outv; 203 // while (!itData.pastEnd()) { 204 // SDMath::fit(outv, itData.vector(), itMask.vector()&&inmask, fitexpr); // Should have function 205 // itData.vector() = outv; // to do in situ 206 // // 207 // SDMath::fit(itData.vector(), itData.vector(), itMask.vector()&&inmask, fitexpr); // Or maybe this works 208 // // 209 // itData.next(); 210 // itMask.next(); 211 // } 212 213 // End NEBK 257 214 258 215 CountedPtr<SDMemTable> 259 216 SDMath::hanning(const CountedPtr<SDMemTable>& in) { 260 217 261 218 //IPosition ip = in->rowAsMaskedArray(0).shape(); 262 219 SDMemTable* sdmt = new SDMemTable(*in,True); 263 220 for (uInt ri=0; ri < in->nRow(); ++ri) { 264 221 265 222 MaskedArray<Float> marr(in->rowAsMaskedArray(ri)); 266 223 … … 269 226 for (uInt i=0; i<in->nBeam();++i) { 270 227 for (uInt j=0; j<in->nIF();++j) { 271 228 for (uInt k=0; k<in->nPol();++k) { 272 229 IPosition start(4,i,j,k,0); 273 230 IPosition end(4,i,j,k,in->nChan()-1); … … 278 235 Vector<Float> v(subArr.nonDegenerate()); 279 236 Vector<Bool> m(subMask.nonDegenerate()); 280 ::hanning(outv,outm,v,m);237 mathutil::hanning(outv,outm,v,m); 281 238 ArrayAccessor<Float, Axis<0> > aa0(outv); 282 239 ArrayAccessor<Bool, Axis<0> > ba0(outm); 283 240 ArrayAccessor<Bool, Axis<3> > ba(subMask); 284 for (ArrayAccessor<Float, Axis<3> > aa(subArr); aa != aa.end();++aa) { 285 (*aa) = (*aa0); 286 (*ba) = (*ba0); 287 aa0++; 288 ba0++; 289 ba++; 241 for (ArrayAccessor<Float, Axis<3> > aa(subArr); 242 aa != aa.end();++aa) { 243 (*aa) = (*aa0); 244 (*ba) = (*ba0); 245 aa0++; 246 ba0++; 247 ba++; 290 248 } 291 249 } 292 250 } 293 251 } 252 // 253 254 // uInt axis = 3; 255 // VectorIterator<Float> itData(arr, axis); 256 // VectorIterator<Bool> itMask(barr, axis); 257 // Vector<Float> outv; 258 // Vector<Bool> outm; 259 // while (!itData.pastEnd()) { 260 // ::hanning(outv, outm, itData.vector(), itMask.vector()); 261 // itData.vector() = outv; 262 // itMask.vector() = outm; 263 // // 264 // itData.next(); 265 // itMask.next(); 266 // } 267 268 // End NEBK 269 270 // 294 271 Array<uChar> outflags(barr.shape()); 295 272 convertArray(outflags,!barr); … … 403 380 Array<Float> tarr(outmarr.getArray()); 404 381 Array<Bool> tbarr(outmarr.getMask()); 405 // write averaged pol into all pols - fix up to ref rom array382 // write averaged pol into all pols - fix up to reform array 406 383 for (uInt k=0; k<in->nPol();++k) { 407 384 IPosition start(4,i,j,k,0); -
trunk/src/SDMath.h
r107 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _SDMATH_H32 #define _SDMATH_H31 #ifndef SDMATH_H 32 #define SDMATH_H 33 33 34 34 #include <string> … … 42 42 namespace SDMath { 43 43 //public: 44 CountedPtr<SDMemTable> average(constCountedPtr<SDMemTable>& in);45 CountedPtr<SDMemTable> quotient(constCountedPtr<SDMemTable>& on,46 const CountedPtr<SDMemTable>& off);47 CountedPtr<SDMemTable> multiply(constCountedPtr<SDMemTable>& in,48 Float factor);49 CountedPtr<SDMemTable> add(constCountedPtr<SDMemTable>& in,50 Float offset);44 casa::CountedPtr<SDMemTable> average(const casa::CountedPtr<SDMemTable>& in); 45 casa::CountedPtr<SDMemTable> quotient(const casa::CountedPtr<SDMemTable>& on, 46 const casa::CountedPtr<SDMemTable>& off); 47 casa::CountedPtr<SDMemTable> multiply(const casa::CountedPtr<SDMemTable>& in, 48 casa::Float factor); 49 casa::CountedPtr<SDMemTable> add(const casa::CountedPtr<SDMemTable>& in, 50 casa::Float offset); 51 51 52 CountedPtr<SDMemTable> baseline(const CountedPtr<SDMemTable>& in, 53 const std::string& fitexpr, 54 const std::vector<bool>& mask); 55 CountedPtr<SDMemTable> hanning(const CountedPtr<SDMemTable>& in); 52 casa::CountedPtr<SDMemTable> hanning(const casa::CountedPtr<SDMemTable>& in); 56 53 57 CountedPtr<SDMemTable>58 averages(const Block<CountedPtr<SDMemTable> >& in,59 const Vector<Bool>& mask);54 casa::CountedPtr<SDMemTable> 55 averages(const casa::Block<casa::CountedPtr<SDMemTable> >& in, 56 const casa::Vector<casa::Bool>& mask); 60 57 61 CountedPtr<SDMemTable>62 averagePol(const CountedPtr<SDMemTable>& in, const Vector<Bool>& mask);58 casa::CountedPtr<SDMemTable> 59 averagePol(const casa::CountedPtr<SDMemTable>& in, const casa::Vector<casa::Bool>& mask); 63 60 64 Float rms(constCountedPtr<SDMemTable>& in,61 casa::Float rms(const casa::CountedPtr<SDMemTable>& in, 65 62 const std::vector<bool>& mask); 66 63 67 CountedPtr<SDMemTable> bin(const CountedPtr<SDMemTable>& in, 68 Int width); 69 70 bool fit(Vector<Float>& thefit, const Vector<Float>& data, 71 const Vector<Bool>& mask, const std::string& fitexpr); 72 64 casa::CountedPtr<SDMemTable> bin(const casa::CountedPtr<SDMemTable>& in, 65 casa::Int width); 73 66 }; 67 74 68 } // namespace 75 69 -
trunk/src/SDMathWrapper.h
r107 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _SDMATHWRAPPER_H32 #define _SDMATHWRAPPER_H31 #ifndef SDMATHWRAPPER_H 32 #define SDMATHWRAPPER_H 33 33 34 34 #include <vector> … … 54 54 55 55 SDMemTableWrapper scale(const SDMemTableWrapper& in, 56 Float factor) {56 casa::Float factor) { 57 57 return SDMemTableWrapper(SDMath::multiply(in.getCP(),factor)); 58 58 } 59 59 60 60 SDMemTableWrapper add(const SDMemTableWrapper& in, 61 Float offset) {61 casa::Float offset) { 62 62 return SDMemTableWrapper(SDMath::add(in.getCP(), offset)); 63 63 } … … 65 65 SDMemTableWrapper hanning(const SDMemTableWrapper& in) { 66 66 return SDMemTableWrapper(SDMath::hanning(in.getCP())); 67 }68 69 SDMemTableWrapper baseline(const SDMemTableWrapper& in,70 const std::string& fitexpr,71 const std::vector<bool>& mask) {72 return SDMath::baseline(in.getCP(), fitexpr, mask);73 67 } 74 68 -
trunk/src/SDMemTable.cc
r121 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 30 30 //#--------------------------------------------------------------------------- 31 31 32 32 #include <casa/aips.h> 33 33 #include <casa/iostream.h> 34 34 #include <casa/iomanip.h> … … 57 57 #include "SDContainer.h" 58 58 59 using namespace casa; 59 60 using namespace asap; 60 61 … … 369 370 if (rstf.nelements() > 0) { 370 371 if (rstf.nelements() >= nIF()) 371 372 spc.selectRestFrequency(uInt(IFSel_)); 372 373 spc.setVelocity(u.getName()); 373 374 Vector<Double> wrld; -
trunk/src/SDMemTable.h
r105 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _SDMEMTABLE_H32 #define _SDMEMTABLE_H31 #ifndef SDMEMTABLE_H 32 #define SDMEMTABLE_H 33 33 34 34 // STL … … 59 59 // Copy Construct a SDMemTable, if clear==True only header and 60 60 // skeleton are copied, otherwise the whole table is copied. 61 SDMemTable(const SDMemTable& other, Bool clear=False);61 SDMemTable(const SDMemTable& other, casa::Bool clear); 62 62 63 63 // Copy Construct a SDMemTable, give a scanid constraint 64 64 // see also getScan() 65 SDMemTable(const Table& tab, const std::string& expr);65 SDMemTable(const casa::Table& tab, const std::string& expr); 66 66 67 67 virtual ~SDMemTable(); … … 73 73 74 74 //get the dat wrapped up in a meta container 75 SDContainer getSDContainer( uInt whichRow=0) const;75 SDContainer getSDContainer(casa::uInt whichRow=0) const; 76 76 SDHeader getSDHeader() const; 77 77 SDFrequencyTable getSDFreqTable() const; 78 78 // get spectrum,mask and tsys for the given row, at the selected 79 79 // cursor - all as stl vectors 80 virtual std::vector<float> getSpectrum( Int whichRow=0) const;81 virtual std::vector<bool> getMask( Int whichRow=0) const;80 virtual std::vector<float> getSpectrum(casa::Int whichRow=0) const; 81 virtual std::vector<bool> getMask(casa::Int whichRow=0) const; 82 82 83 virtual Float getTsys(Int whichRow=0) const;83 virtual casa::Float getTsys(casa::Int whichRow=0) const; 84 84 // get all as aips++ Vectors 85 virtual void getSpectrum(Vector<Float>& spectrum, Int whichRow=0); 85 virtual void getSpectrum(casa::Vector<casa::Float>& spectrum, 86 casa::Int whichRow=0); 86 87 87 88 //virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const; 88 89 89 90 // get info for current row 90 std::string getTime( Int whichRow=0) const ;91 std::string getSourceName( Int whichRow=0) const;92 double getInterval( Int whichRow=0) const;91 std::string getTime(casa::Int whichRow=0) const ; 92 std::string getSourceName(casa::Int whichRow=0) const; 93 double getInterval(casa::Int whichRow=0) const; 93 94 94 95 virtual void setSpectrum(std::vector<float> spectrum, int whichRow=0); 95 virtual void setRestFreqs(std::vector<double> freqs, const std::string& theunit); 96 virtual void setRestFreqs(std::vector<double> freqs, 97 const std::string& theunit); 96 98 virtual void setCoordInfo(std::vector<string> theinfo); 97 99 // set the current value 98 virtual bool setIF( Int whichIF=0);99 virtual bool setBeam( Int whichBeam=0);100 virtual bool setPol( Int whichPol=0);100 virtual bool setIF(casa::Int whichIF=0); 101 virtual bool setBeam(casa::Int whichBeam=0); 102 virtual bool setPol(casa::Int whichPol=0); 101 103 102 104 //sets the user mask applied to all spectra … … 106 108 107 109 // return the currently selected values 108 virtual Int getIF() { return IFSel_; }109 virtual Int getBeam() { return beamSel_; }110 virtual Int getPol() { return polSel_; }110 virtual casa::Int getIF() { return IFSel_; } 111 virtual casa::Int getBeam() { return beamSel_; } 112 virtual casa::Int getPol() { return polSel_; } 111 113 virtual std::vector<string> getCoordInfo() const; 112 114 113 115 // number of scans in table 114 virtual Int nScan() const;116 virtual casa::Int nScan() const; 115 117 116 118 // print a summary to stdout … … 121 123 122 124 // get a new SDMemTable containing all rows with the same give SCANID 123 SDMemTable getScan( Int scanID);125 SDMemTable getScan(casa::Int scanID); 124 126 SDMemTable getSource(const std::string& source); 125 127 126 const TableRecord& getHeader() const {return table_.keywordSet();}128 const casa::TableRecord& getHeader() const {return table_.keywordSet();} 127 129 // get a handle to the "raw" aips++ table 128 const Table& table() { return table_; }130 const casa::Table& table() { return table_; } 129 131 130 132 // return the number of values 131 Int nBeam() const;132 Int nIF() const;133 Int nPol() const;134 Int nChan() const;133 casa::Int nBeam() const; 134 casa::Int nIF() const; 135 casa::Int nPol() const; 136 casa::Int nChan() const; 135 137 136 138 // return the number of rows (integrations) in the table 137 Int nRow() const { return table_.nrow(); }139 casa::Int nRow() const { return table_.nrow(); } 138 140 139 141 // return a row as a Masked array, internally converting uChar flags 140 142 // to bool mask 141 MaskedArray<Float> rowAsMaskedArray(uInt whichRow,142 Bool useSelection =False);143 casa::MaskedArray<casa::Float> rowAsMaskedArray(casa::uInt whichRow, 144 casa::Bool useSelection = casa::False); 143 145 144 SpectralCoordinate getCoordinate(uInt whichIdx) const; 145 Bool setCoordinate(const SpectralCoordinate& speccord, uInt whichIdx); 146 casa::SpectralCoordinate getCoordinate(casa::uInt whichIdx) const; 147 casa::Bool setCoordinate(const casa::SpectralCoordinate& speccord, 148 casa::uInt whichIdx); 146 149 147 Int nCoordinates() const;150 casa::Int nCoordinates() const; 148 151 149 152 std::vector<double> getAbscissa(int whichRow=0); 150 std::string getAbscissaString( Int whichRow=0);153 std::string getAbscissaString(casa::Int whichRow=0); 151 154 152 155 private: 153 156 // utility func for nice printout 154 String formatSec(Double x);157 casa::String formatSec(casa::Double x); 155 158 void setup(); 156 159 // the current cursor into the array 157 Int IFSel_,beamSel_,polSel_;160 casa::Int IFSel_,beamSel_,polSel_; 158 161 std::vector<bool> chanMask_; 159 162 // the underlying memory table 160 Table table_;163 casa::Table table_; 161 164 }; 162 165 -
trunk/src/SDMemTableWrapper.h
r105 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _SDMEMTABLEWRAPPER_H32 #define _SDMEMTABLEWRAPPER_H31 #ifndef SDMEMTABLEWRAPPER_H 32 #define SDMEMTABLEWRAPPER_H 33 33 34 34 #include <vector> … … 47 47 table_(new SDMemTable()) {;} 48 48 49 SDMemTableWrapper( CountedPtr<SDMemTable> cp) : table_(cp) {;}49 SDMemTableWrapper(casa::CountedPtr<SDMemTable> cp) : table_(cp) {;} 50 50 //SDMemTableWrapper(SDMemTable* sdmt) : table_(sdmt) {;} 51 51 SDMemTableWrapper(const SDMemTableWrapper& mt) : … … 57 57 SDMemTableWrapper copy() { 58 58 //CountedPtr<SDMemTable> cp = new SDMemTable(*this, False); 59 return SDMemTableWrapper(new SDMemTable(*(this->getCP()), False));59 return SDMemTableWrapper(new SDMemTable(*(this->getCP()), casa::False)); 60 60 } 61 61 62 62 SDMemTableWrapper getScan(int scan) { 63 String cond("SELECT * from $1 WHERE SCANID == ");64 cond += String::toString(scan);63 casa::String cond("SELECT * from $1 WHERE SCANID == "); 64 cond += casa::String::toString(scan); 65 65 return SDMemTableWrapper(*this, cond); 66 66 } 67 67 68 68 SDMemTableWrapper getSource(const std::string& source) { 69 String cond("SELECT * from $1 WHERE SRCNAME == '");69 casa::String cond("SELECT * from $1 WHERE SRCNAME == '"); 70 70 cond += source;cond += "'"; 71 71 return SDMemTableWrapper(*this, cond); … … 137 137 } 138 138 139 CountedPtr<SDMemTable> getCP() const {return table_;}139 casa::CountedPtr<SDMemTable> getCP() const {return table_;} 140 140 std::string summary() { return table_->summary(); } 141 141 142 142 private: 143 CountedPtr<SDMemTable> table_;143 casa::CountedPtr<SDMemTable> table_; 144 144 }; 145 145 -
trunk/src/SDReader.cc
r110 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #include <casa/Exceptions.h> 31 32 #include <atnf/PKSIO/PKSreader.h> 32 #include <casa/Exceptions.h> 33 33 34 #include "SDReader.h" 34 35 36 using namespace casa; 35 37 using namespace asap; 36 38 -
trunk/src/SDReader.h
r83 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _SDREADER_H32 #define _SDREADER_H31 #ifndef SDREADER_H 32 #define SDREADER_H 33 33 34 34 #include <vector> … … 52 52 SDReader(); 53 53 SDReader(const std::string& filename); 54 SDReader( CountedPtr<SDMemTable> tbl);54 SDReader(casa::CountedPtr<SDMemTable> tbl); 55 55 virtual ~SDReader(); 56 56 … … 59 59 int read(const std::vector<int>& seq); 60 60 61 CountedPtr<SDMemTable> getTable() const { return table_;}61 casa::CountedPtr<SDMemTable> getTable() const { return table_;} 62 62 63 63 void reset(); … … 73 73 74 74 private: 75 Int nBeam_,nIF_,nPol_,nChan_;75 casa::Int nBeam_,nIF_,nPol_,nChan_; 76 76 PKSreader* reader_; 77 77 SDHeader header_; 78 78 SDFrequencyTable frequencies_; 79 CountedPtr<SDMemTable> table_;80 String filename_;81 uInt cursor_;82 Double timestamp_;79 casa::CountedPtr<SDMemTable> table_; 80 casa::String filename_; 81 casa::uInt cursor_; 82 casa::Double timestamp_; 83 83 }; 84 84 -
trunk/src/SDReaderWrapper.h
r83 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _SDREADERWRAPPER_H32 #define _SDREADERWRAPPER_H31 #ifndef SDREADERWRAPPER_H 32 #define SDREADERWRAPPER_H 33 33 34 34 #include <vector> -
trunk/src/SDTemplates.cc
r93 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #include "SDMemTable.h" 32 33 #include <casa/aips.h> 34 #include <casa/namespace.h> 31 35 #include <casa/Containers/Block.h> 32 36 #include <casa/Exceptions/Error.cc> … … 35 39 #include <casa/Utilities/CountedPtr2.cc> 36 40 #include <casa/Utilities/Copy.cc> 37 #include "SDMemTable.h"38 41 39 42 namespace asap { 40 template class CountedConstPtr<SDMemTable>;41 template class CountedPtr<SDMemTable>;42 template class PtrRep<SDMemTable>;43 template class SimpleCountedConstPtr<SDMemTable>;44 template class SimpleCountedPtr<SDMemTable>;45 template class Block<CountedPtr<SDMemTable> >;43 template class casa::CountedConstPtr<SDMemTable>; 44 template class casa::CountedPtr<SDMemTable>; 45 template class casa::PtrRep<SDMemTable>; 46 template class casa::SimpleCountedConstPtr<SDMemTable>; 47 template class casa::SimpleCountedPtr<SDMemTable>; 48 template class casa::Block<CountedPtr<SDMemTable> >; 46 49 } 47 template void objcopy(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable> const *, uInt); 48 template void objmove(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable> const *, uInt); 49 template void objset(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable>, uInt); 50 51 template void objcopy<CountedPtr<asap::SDMemTable> >(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable> const *, uInt); 52 template void objmove<CountedPtr<asap::SDMemTable> >(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable> const *, uInt); 53 template void objset<CountedPtr<asap::SDMemTable> >(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable>, uInt); 50 54 51 55 #include <casa/Arrays/ArrayLogical.cc> … … 61 65 #include <casa/Utilities/PtrHolder.cc> 62 66 #include <lattices/Lattices/Lattice.h> 63 #include "MathUtils.cc"64 67 65 template void convertArray (Array<Bool> &, Array<uChar> const &);66 template void convertArray (Array<uChar> &, Array<Bool> const &);67 template LogicalArray operator!= (Array<Float> const &, Float const &);68 template LogicalArray operator== (Array<Float> const &, Float const &);69 template LogicalArray operator> (Array<Float> const &, Float const &);70 template LogicalArray operator>= (Array<Float> const &, Float const &);71 template Array<Float>& operator/= (Array<Float>&, MaskedArray<Float> const&);72 template MaskedArray<Float> const& operator*= (MaskedArray<Float> const&, Float const&);73 template MaskedArray<Float> operator- (MaskedArray<Float> const&, MaskedArray<Float> const&);74 template MaskedArray<Float> const& operator/= (MaskedArray<Float> const&, Float const&);75 template Float stddev (MaskedArray<Float> const&);68 template void convertArray<Bool, uChar>(Array<Bool> &, Array<uChar> const &); 69 template void convertArray<uChar, Bool>(Array<uChar> &, Array<Bool> const &); 70 template LogicalArray operator!=<Float>(Array<Float> const &, Float const &); 71 template LogicalArray operator==<Float>(Array<Float> const &, Float const &); 72 template LogicalArray operator><Float>(Array<Float> const &, Float const &); 73 template LogicalArray operator>=<Float>(Array<Float> const &, Float const &); 74 template Array<Float>& operator/=<Float>(Array<Float>&, MaskedArray<Float> const&); 75 template MaskedArray<Float> const& operator*=<Float>(MaskedArray<Float> const&, Float const&); 76 template MaskedArray<Float> operator-<Float>(MaskedArray<Float> const&, MaskedArray<Float> const&); 77 template MaskedArray<Float> const& operator/=<Float>(MaskedArray<Float> const&, Float const&); 78 template Float stddev<Float>(MaskedArray<Float> const&); 76 79 template class CompiledFunction<AutoDiff<Float> >; 77 80 template class CompiledParam<AutoDiff<Float> >; … … 81 84 template void Array<float>::tovector(vector<float> &) const; 82 85 template void Array<Bool>::tovector(vector<bool> &) const; 83 template void hanning(Vector<Float>&, Vector<Bool>&,84 const Vector<Float>&, const Vector<Bool>&, Bool, Bool);85 86 template void ImageUtilities::bin(MaskedArray<float>&, Coordinate&, MaskedArray<float> const&, Coordinate const&, uInt, uInt); 86 87 template class PtrHolder<Lattice<Float> >; 87 88 #include "MathUtils.cc" 89 namespace mathutil { 90 template void hanning(Vector<Float>&, Vector<Bool>&, 91 const Vector<Float>&, 92 const Vector<Bool>&, 93 Bool, Bool); 94 } -
trunk/src/SDWriter.cc
r112 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Mark Calabretta,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 44 44 #include "SDWriter.h" 45 45 46 using namespace casa; 46 47 using namespace asap; 47 48 … … 50 51 // Default constructor. 51 52 52 SDWriter::SDWriter( 53 const std::string &format) 53 SDWriter::SDWriter(const std::string &format) 54 54 { 55 55 cFormat = format; -
trunk/src/SDWriter.h
r83 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Mark Calabretta,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id$ 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _SDWRITER_H32 #define _SDWRITER_H31 #ifndef SDWRITER_H 32 #define SDWRITER_H 33 33 34 34 #include <string> … … 49 49 ~SDWriter(); 50 50 51 Int setFormat(const string &format = "SDFITS");52 Int write(constCountedPtr<SDMemTable> table,51 casa::Int setFormat(const string &format = "SDFITS"); 52 casa::Int write(const casa::CountedPtr<SDMemTable> table, 53 53 const string &filename); 54 54 -
trunk/src/SDWriterWrapper.h
r83 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id: 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _SDWRITERWRAPPER_H32 #define _SDWRITERWRAPPER_H31 #ifndef SDWRITERWRAPPER_H 32 #define SDWRITERWRAPPER_H 33 33 34 34 #include <vector> 35 35 #include <string> 36 36 37 #include "SDMemTableWrapper.h"38 37 #include "SDWriter.h" 39 38 40 39 namespace asap { 40 41 class SDMemTableWrapper; 41 42 42 43 class SDWriterWrapper : public SDWriter { … … 44 45 SDWriterWrapper(const string &format = "SDFITS") : SDWriter(format) {;} 45 46 46 Int write(const SDMemTableWrapper &table, const string &filename) {47 casa::Int write(const SDMemTableWrapper &table, const string &filename) { 47 48 return SDWriter::write(table.getCP(), filename); 48 49 } -
trunk/src/python_SD.cc
r95 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 31 31 #include <string> 32 32 #include <vector> 33 33 34 #include <boost/python.hpp> 34 35 #include <boost/python/pyconversions.h> 35 36 #include <boost/python/exception_translator.hpp> 36 #include <casa/Exceptions.h> 37 38 #include <casa/aips.h> 39 #include <casa/Exceptions/Error.h> 37 40 38 41 #include "python_SD.h" … … 40 43 namespace asap { 41 44 namespace python { 42 void translate_ex( AipsError const& e)45 void translate_ex(const casa::AipsError& e) 43 46 { 44 47 // Use the Python 'C' API to set up an exception object … … 57 60 asap::python::python_SDFitter(); 58 61 59 register_exception_translator< AipsError>(&asap::python::translate_ex);62 register_exception_translator<casa::AipsError>(&asap::python::translate_ex); 60 63 61 64 std_vector_to_tuple < int > (); -
trunk/src/python_SD.h
r92 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 29 29 //# $Id$ 30 30 //#--------------------------------------------------------------------------- 31 #ifndef _PYTHON_SD_H32 #define _PYTHON_SD_H31 #ifndef PYTHON_SD_H 32 #define PYTHON_SD_H 33 33 34 class AipsError;34 class casa::AipsError; 35 35 36 36 namespace asap { 37 37 namespace python { 38 void translate_ex( AipsError const& e);38 void translate_ex(const casa::AipsError& e); 39 39 void python_SDMemTable(); 40 40 void python_SDReader(); -
trunk/src/python_SDFitter.cc
r98 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 43 43 .def("setexpression", &SDFitter::setExpression) 44 44 .def("setdata", &SDFitter::setData) 45 .def("getresidual", &SDFitter::getResidual)//, 46 //(boost::python::arg("which")=-1) ) 45 .def("getresidual", &SDFitter::getResidual) 47 46 .def("getfit", &SDFitter::getFit) 48 47 .def("getfixedparameters", &SDFitter::getFixedParameters) -
trunk/src/python_SDMath.cc
r107 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 31 31 #include <boost/python.hpp> 32 32 33 #include <casa/aips.h> 34 #include <casa/Containers/Block.h> 35 #include <casa/Utilities/CountedPtr.cc> 36 33 37 #include "SDMathWrapper.h" 34 38 39 using namespace casa; 35 40 using namespace boost::python; 36 41 … … 59 64 def("scale", &SDMathWrapper::scale); 60 65 def("add", &SDMathWrapper::add); 61 def("baseline", &SDMathWrapper::baseline);62 66 def("hanning", &SDMathWrapper::hanning); 63 67 def("averages", &SDMathWrapper::averages); -
trunk/src/python_SDMemTable.cc
r122 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it … … 33 33 #include <boost/python.hpp> 34 34 #include <boost/python/args.hpp> 35 35 36 #include "SDMemTableWrapper.h" 36 37 -
trunk/src/python_SDReader.cc
r97 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Malte Marquarding,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it -
trunk/src/python_SDWriter.cc
r83 r125 3 3 //#--------------------------------------------------------------------------- 4 4 //# Copyright (C) 2004 5 //# Mark Calabretta,ATNF5 //# ATNF 6 6 //# 7 7 //# This program is free software; you can redistribute it and/or modify it
Note:
See TracChangeset
for help on using the changeset viewer.