Changeset 2773 for trunk/src/Scantable.h
- Timestamp:
- 02/25/13 15:49:06 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.h
r2767 r2773 39 39 #include "STFit.h" 40 40 #include "STFitEntry.h" 41 //#include "STFitter.h"42 41 #include "STFocus.h" 43 42 #include "STFrequencies.h" … … 53 52 54 53 class Fitter; 54 class STLineFinder; 55 class STBaselineTable; 55 56 56 57 /** … … 635 636 static std::vector<bool> getMaskFromMaskList(const int nchan, 636 637 const std::vector<int>& masklist); 638 static casa::Vector<casa::uInt> getMaskListFromMask(const std::vector<bool>& mask); 637 639 static std::vector<int> splitToIntList(const std::string& str, const char delim); 638 640 static std::vector<string> splitToStringList(const std::string& str, const char delim); … … 752 754 const casa::Array<T2>&); 753 755 754 void fitBaseline(const std::vector<bool>& mask, int whichrow, Fitter& fitter);755 756 double getNormalPolynomial(int n, double x); 756 757 double getChebyshevPolynomial(int n, double x); 758 std::vector<std::vector<double> > getPolynomialModel(int order, 759 int nchan, 760 double (Scantable::*pfunc)(int, double)); 761 std::vector<std::vector<std::vector<double> > > getPolynomialModelReservoir(int order, 762 double (Scantable::*pfunc)(int, double), 763 std::vector<int>& nChanNos); 757 764 std::vector<float> doPolynomialFitting(const std::vector<float>& data, 758 765 const std::vector<bool>& mask, … … 793 800 std::vector<float> doLeastSquareFitting(const std::vector<float>& data, 794 801 const std::vector<bool>& mask, 795 double (Scantable::*pfunc)(int, double), 796 int order, 802 const std::vector<std::vector<double> >& model, 797 803 std::vector<float>& params, 798 804 float& rms, … … 831 837 int nIterClip=0, 832 838 bool getResidual=true); 839 std::vector<float> doCubicSplineLeastSquareFitting(const std::vector<float>& data, 840 const std::vector<bool>& mask, 841 const std::vector<std::vector<double> >& model, 842 int nPiece, 843 bool useGivenPieceBoundary, 844 std::vector<int>& idxEdge, 845 std::vector<float>& params, 846 float& rms, 847 std::vector<bool>& finalMask, 848 int& nClipped, 849 float thresClip=3.0, 850 int nIterClip=0, 851 bool getResidual=true); 833 852 std::vector<float> doSinusoidFitting(const std::vector<float>& data, 834 853 const std::vector<bool>& mask, … … 849 868 int nIterClip=0, 850 869 bool getResidual=true); 851 void selectWaveNumbers(const int whichrow, 852 const std::vector<bool>& chanMask, 853 const std::string& fftInfo, 854 //const bool applyFFT, 855 //const std::string& fftMethod, 856 //const std::string& fftThresh, 857 const std::vector<int>& addNWaves, 858 const std::vector<int>& rejectNWaves, 859 std::vector<int>& nWaves); 870 std::vector<std::vector<double> > getSinusoidModel(const std::vector<int>& waveNumbers, int nchan); 871 std::vector<std::vector<std::vector<double> > > getSinusoidModelReservoir(const std::vector<int>& waveNumbers, 872 std::vector<int>& nChanNos); 873 std::vector<int> selectWaveNumbers(const std::vector<int>& addNWaves, 874 const std::vector<int>& rejectNWaves); 875 std::vector<int> selectWaveNumbers(const int whichrow, 876 const std::vector<bool>& chanMask, 877 //const std::string& fftInfo, 878 const bool applyFFT, 879 const std::string& fftMethod, 880 const std::string& fftThresh, 881 const std::vector<int>& addNWaves, 882 const std::vector<int>& rejectNWaves); 883 int getIdxOfNchan(const int nChan, const std::vector<int>& nChanNos); 860 884 void parseFFTInfo(const std::string& fftInfo, 861 885 bool& applyFFT, 862 886 std::string& fftMethod, 863 887 std::string& fftThresh); 864 void parse ThresholdExpression(const std::string& fftThresh,865 866 867 888 void parseFFTThresholdInfo(const std::string& fftThresh, 889 std::string& fftThAttr, 890 float& fftThSigma, 891 int& fftThTop); 868 892 void doSelectWaveNumbers(const int whichrow, 869 893 const std::vector<bool>& chanMask, … … 879 903 void setWaveNumberListUptoNyquistFreq(const int whichrow, 880 904 std::vector<int>& nWaves); 905 void initialiseBaselining(const std::string& blfile, 906 std::ofstream& ofs, 907 const bool outLogger, 908 bool& outTextFile, 909 bool& csvFormat, 910 casa::String& coordInfo, 911 bool& hasSameNchan, 912 const std::string& progressInfo, 913 bool& showProgress, 914 int& minNRow, 915 casa::Vector<casa::Double>& timeSecCol); 916 void finaliseBaselining(const bool outBaselineTable, 917 STBaselineTable* pbt, 918 const string& bltable, 919 const bool outTextFile, 920 std::ofstream& ofs); 921 void initLineFinder(const std::vector<int>& edge, 922 const float threshold, 923 const int chanAvgLimit, 924 STLineFinder& lineFinder); 881 925 bool hasSameNchanOverIFs(); 882 926 std::string getMaskRangeList(const std::vector<bool>& mask, … … 889 933 std::string formatBaselineParamsFooter(float rms, int nClipped, bool verbose, bool csvformat) const; 890 934 std::vector<bool> getCompositeChanMask(int whichrow, const std::vector<bool>& inMask); 891 //std::vector<bool> getCompositeChanMask(int whichrow, const std::vector<bool>& inMask, const std::vector<int>& edge, const int minEdgeSize, STLineFinder& lineFinder); 892 void outputFittingResult(bool outLogger, bool outTextFile, bool csvFormat, const std::vector<bool>& chanMask, int whichrow, const casa::String& coordInfo, bool hasSameNchan, std::ofstream& ofs, const casa::String& funcName, Fitter& fitter); 935 std::vector<bool> getCompositeChanMask(int whichrow, const std::vector<bool>& inMask, const std::vector<int>& edge, std::vector<int>& currEdge, STLineFinder& lineFinder); 893 936 void outputFittingResult(bool outLogger, bool outTextFile, bool csvFormat, const std::vector<bool>& chanMask, int whichrow, const casa::String& coordInfo, bool hasSameNchan, std::ofstream& ofs, const casa::String& funcName, const std::vector<int>& edge, const std::vector<float>& params, const int nClipped); 894 937 void outputFittingResult(bool outLogger, bool outTextFile, bool csvFormat, const std::vector<bool>& chanMask, int whichrow, const casa::String& coordInfo, bool hasSameNchan, std::ofstream& ofs, const casa::String& funcName, const std::vector<float>& params, const int nClipped);
Note: See TracChangeset
for help on using the changeset viewer.