Changeset 3106 for trunk/src/STSideBandSep.h
- Timestamp:
- 10/04/16 18:20:50 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STSideBandSep.h
r2976 r3106 28 28 #include "Scantable.h" 29 29 30 using namespace std;31 using namespace casa;32 33 30 namespace asap { 34 31 … … 38 35 * constructors and a destructor 39 36 **/ 40 STSideBandSep() { throw( AipsError("No data set to process") ); };41 explicit STSideBandSep(const vector<string> &names);42 explicit STSideBandSep(const vector<ScantableWrapper> &tables);37 STSideBandSep() { throw( casacore::AipsError("No data set to process") ); }; 38 explicit STSideBandSep(const std::vector<std::string> &names); 39 explicit STSideBandSep(const std::vector<ScantableWrapper> &tables); 43 40 virtual ~STSideBandSep(); 44 41 … … 47 44 * Separate side bands 48 45 **/ 49 void separate(st ring outname);46 void separate(std::string outname); 50 47 51 48 /** 52 49 * Set IFNO and frequency tolerance to select data to process 53 50 **/ 54 void setFrequency(const int ifno, const st ring freqtol,55 const st ring frame="");51 void setFrequency(const int ifno, const std::string freqtol, 52 const std::string frame=""); 56 53 57 54 /** … … 59 56 * The spectra within this range will be averaged before procesing. 60 57 **/ 61 void setDirTolerance(const vector<string> dirtol);58 void setDirTolerance(const std::vector<std::string> dirtol); 62 59 63 60 /** … … 65 62 * of each of scantable. 66 63 **/ 67 void setShift(const vector<double> &shift);64 void setShift(const std::vector<double> &shift); 68 65 69 66 /** … … 91 88 * Set additional information to fill frequencies of image sideband 92 89 **/ 93 void setLO1(const st ring lo1, conststring frame="TOPO",94 const double reftime=-1, st ring refdir="");95 void setLO1Root(const st ring name);90 void setLO1(const std::string lo1, const std::string frame="TOPO", 91 const double reftime=-1, std::string refdir=""); 92 void setLO1Root(const std::string name); 96 93 97 94 private: … … 101 98 102 99 /** Return if the path exists (optionally, check file type) **/ 103 Bool checkFile(const string name,string type="");100 casacore::Bool checkFile(const std::string name, std::string type=""); 104 101 105 102 /** **/ 106 103 unsigned int setupShift(); 107 bool getFreqInfo(const CountedPtr<Scantable> &stab, const unsigned int &ifno,104 bool getFreqInfo(const casacore::CountedPtr<Scantable> &stab, const unsigned int &ifno, 108 105 double &freq0, double &incr, unsigned int &nchan); 109 106 110 107 /** Grid scantable **/ 111 108 ScantableWrapper gridTable(); 112 void mapExtent( vector<CountedPtr<Scantable> > &tablist,113 Double &xmin,Double &xmax,114 Double &ymin,Double &ymax);109 void mapExtent(std::vector< casacore::CountedPtr<Scantable> > &tablist, 110 casacore::Double &xmin, casacore::Double &xmax, 111 casacore::Double &ymin, casacore::Double &ymax); 115 112 116 113 /** … … 134 131 * TIME by INTERVAL in each row. 135 132 **/ 136 void shiftTimeInGriddedST(const CountedPtr<Scantable> &stab);133 void shiftTimeInGriddedST(const casacore::CountedPtr<Scantable> &stab); 137 134 /** 138 135 * Actual calculation of frequencies of image sideband … … 143 140 * Get LO1 frequency to solve the frequencies of image side band 144 141 **/ 145 bool getLo1FromAsdm(const st ring asdmname,142 bool getLo1FromAsdm(const std::string asdmname, 146 143 const double refval, const double refpix, 147 144 const double increment, const int nChan); 148 bool getLo1FromAsisTab(const st ring msname,145 bool getLo1FromAsisTab(const std::string msname, 149 146 const double refval, const double refpix, 150 147 const double increment, const int nChan); 151 bool getLo1FromScanTab(casa ::CountedPtr< Scantable > &scantab,148 bool getLo1FromScanTab(casacore::CountedPtr< Scantable > &scantab, 152 149 const double refval, const double refpix, 153 150 const double increment, const int nChan); 154 151 // bool getSpectraToSolve(const int polId, const int beamId, 155 152 // const double dirX, const double dirY, 156 // Matrix<float> &specmat, vector<uInt> &tabIdvec);153 // Matrix<float> &specmat, std::vector<casacore::uInt> &tabIdvec); 157 154 bool getSpectraToSolve(const int polId, const int beamId, 158 155 const double dirX, const double dirY, 159 Matrix<float> &specMat,Matrix<bool> &flagMat,160 vector<uInt> &tabIdvec);161 162 vector<float> solve(constMatrix<float> &specMat,163 const vector<uInt> &tabIdvec,156 casacore::Matrix<float> &specMat, casacore::Matrix<bool> &flagMat, 157 std::vector<casacore::uInt> &tabIdvec); 158 159 std::vector<float> solve(const casacore::Matrix<float> &specMat, 160 const std::vector<casacore::uInt> &tabIdvec, 164 161 const bool signal = true); 165 162 166 Vector<bool> collapseFlag(constMatrix<bool> &flagMat,167 const vector<uInt> &tabIdvec,163 casacore::Vector<bool> collapseFlag(const casacore::Matrix<bool> &flagMat, 164 const std::vector<casacore::uInt> &tabIdvec, 168 165 const bool signal = true); 169 166 170 void shiftSpectrum(const Vector<float> &invec, double shift,171 Vector<float> &outvec);172 173 void shiftFlag(const Vector<bool> &invec, double shift,174 Vector<bool> &outvec);175 176 void deconvolve( Matrix<float> &specmat, constvector<double> shiftvec,177 const double threshold, Matrix<float> &outmat);178 179 void aggregateMat( Matrix<float> &inmat,vector<float> &outvec);180 181 void subtractFromOther(const Matrix<float> &shiftmat,182 const vector<float> &invec,183 const vector<double> &shift,184 vector<float> &outvec);167 void shiftSpectrum(const casacore::Vector<float> &invec, double shift, 168 casacore::Vector<float> &outvec); 169 170 void shiftFlag(const casacore::Vector<bool> &invec, double shift, 171 casacore::Vector<bool> &outvec); 172 173 void deconvolve(casacore::Matrix<float> &specmat, const std::vector<double> shiftvec, 174 const double threshold, casacore::Matrix<float> &outmat); 175 176 void aggregateMat(casacore::Matrix<float> &inmat, std::vector<float> &outvec); 177 178 void subtractFromOther(const casacore::Matrix<float> &shiftmat, 179 const std::vector<float> &invec, 180 const std::vector<double> &shift, 181 std::vector<float> &outvec); 185 182 186 183 … … 188 185 /** Member variables **/ 189 186 // input tables 190 vector<string> infileList_;191 vector<CountedPtr<Scantable> > intabList_;187 std::vector<std::string> infileList_; 188 std::vector< casacore::CountedPtr<Scantable> > intabList_; 192 189 unsigned int ntable_; 193 190 // frequency and direction setup to select data. 194 191 int sigIfno_; 195 Quantum<Double> ftol_;196 MFrequency::Types solFrame_;197 vector<double> sigShift_, imgShift_;192 casacore::Quantum<casacore::Double> ftol_; 193 casacore::MFrequency::Types solFrame_; 194 std::vector<double> sigShift_, imgShift_; 198 195 unsigned int nshift_, nchan_; 199 vector<CountedPtr<Scantable> > tableList_;200 Double xtol_, ytol_;196 std::vector< casacore::CountedPtr<Scantable> > tableList_; 197 casacore::Double xtol_, ytol_; 201 198 // solution parameters 202 199 bool otherside_, doboth_; … … 204 201 // LO1 205 202 double lo1Freq_; // in Hz 206 MFrequency::Types loFrame_;203 casacore::MFrequency::Types loFrame_; 207 204 double loTime_; 208 st ring loDir_;209 st ring asdmName_, asisName_;205 std::string loDir_; 206 std::string asdmName_, asisName_; 210 207 211 208 //CountedPtr<Scantable> imgTab_p, sigTab_p; 212 CountedPtr<Scantable> imgTab_p, sigTab_p;213 Table::TableType tp_;214 FFTServer<Float,Complex> fftsf, fftsi;209 casacore::CountedPtr<Scantable> imgTab_p, sigTab_p; 210 casacore::Table::TableType tp_; 211 casacore::FFTServer<casacore::Float, casacore::Complex> fftsf, fftsi; 215 212 216 213 }; // class
Note: See TracChangeset
for help on using the changeset viewer.