Changeset 2767 for trunk/src/Scantable.h
- Timestamp:
- 02/08/13 22:23:22 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.h
r2737 r2767 28 28 #include <casa/Quanta/Quantum.h> 29 29 #include <casa/Utilities/CountedPtr.h> 30 31 30 #include <coordinates/Coordinates/SpectralCoordinate.h> 32 33 31 #include <measures/TableMeasures/ScalarMeasColumn.h> 34 35 32 #include <scimath/Mathematics/FFTServer.h> 36 37 33 #include <tables/Tables/ArrayColumn.h> 38 34 #include <tables/Tables/ScalarColumn.h> 39 35 #include <tables/Tables/Table.h> 40 36 41 42 37 #include "MathUtils.h" 38 #include "STBaselineEnum.h" 43 39 #include "STFit.h" 44 40 #include "STFitEntry.h" … … 507 503 void regridChannel( int nchan, double dnu, int irow ) ; 508 504 void regridChannel( int nchan, double dnu, double fmin, int irow ) ; 509 510 505 void regridSpecChannel( double dnu, int nchan=-1 ) ; 511 506 512 507 bool getFlagtraFast(casa::uInt whichrow); 513 508 514 void polyBaseline(const std::vector<bool>& mask, 515 int order, 509 std::vector<std::string> applyBaselineTable(const std::string& bltable, const std::string& outbltable, const bool outbltableexists, const bool overwrite); 510 std::vector<std::string> subBaseline(const std::vector<std::string>& blInfoList, const std::string& outbltable, const bool outbltableexists, const bool overwrite); 511 void polyBaseline(const std::vector<bool>& mask, 512 int order, 513 float thresClip, 514 int nIterClip, 516 515 bool getResidual=true, 517 516 const std::string& progressInfo="true,1000", 518 const bool outLogger=false, 519 const std::string& blfile=""); 517 const bool outLogger=false, 518 const std::string& blfile="", 519 const std::string& bltable=""); 520 520 void autoPolyBaseline(const std::vector<bool>& mask, 521 int order, 522 const std::vector<int>& edge, 523 float threshold=3.0, 524 int chanAvgLimit=1, 525 bool getResidual=true, 526 const std::string& progressInfo="true,1000", 527 const bool outLogger=false, 528 const std::string& blfile=""); 521 int order, 522 float thresClip, 523 int nIterClip, 524 const std::vector<int>& edge, 525 float threshold=3.0, 526 int chanAvgLimit=1, 527 bool getResidual=true, 528 const std::string& progressInfo="true,1000", 529 const bool outLogger=false, 530 const std::string& blfile="", 531 const std::string& bltable=""); 529 532 void chebyshevBaseline(const std::vector<bool>& mask, 530 533 int order, … … 534 537 const std::string& progressInfo="true,1000", 535 538 const bool outLogger=false, 536 const std::string& blfile=""); 539 const std::string& blfile="", 540 const std::string& bltable=""); 537 541 void autoChebyshevBaseline(const std::vector<bool>& mask, 538 542 int order, … … 545 549 const std::string& progressInfo="true,1000", 546 550 const bool outLogger=false, 547 const std::string& blfile=""); 551 const std::string& blfile="", 552 const std::string& bltable=""); 548 553 void cubicSplineBaseline(const std::vector<bool>& mask, 549 554 int nPiece, … … 553 558 const std::string& progressInfo="true,1000", 554 559 const bool outLogger=false, 555 const std::string& blfile=""); 560 const std::string& blfile="", 561 const std::string& bltable=""); 556 562 void autoCubicSplineBaseline(const std::vector<bool>& mask, 557 563 int nPiece, … … 564 570 const std::string& progressInfo="true,1000", 565 571 const bool outLogger=false, 566 const std::string& blfile=""); 572 const std::string& blfile="", 573 const std::string& bltable=""); 567 574 void sinusoidBaseline(const std::vector<bool>& mask, 568 const bool applyFFT, 569 const std::string& fftMethod, 570 const std::string& fftThresh, 575 const std::string& fftInfo, 571 576 const std::vector<int>& addNWaves, 572 577 const std::vector<int>& rejectNWaves, … … 576 581 const std::string& progressInfo="true,1000", 577 582 const bool outLogger=false, 578 const std::string& blfile=""); 583 const std::string& blfile="", 584 const std::string& bltable=""); 579 585 void autoSinusoidBaseline(const std::vector<bool>& mask, 580 const bool applyFFT, 581 const std::string& fftMethod, 582 const std::string& fftThresh, 586 const std::string& fftInfo, 583 587 const std::vector<int>& addNWaves, 584 588 const std::vector<int>& rejectNWaves, … … 591 595 const std::string& progressInfo="true,1000", 592 596 const bool outLogger=false, 593 const std::string& blfile=""); 597 const std::string& blfile="", 598 const std::string& bltable=""); 594 599 std::vector<float> execFFT(const int whichrow, 595 600 const std::vector<bool>& inMask, … … 628 633 float threshold, 629 634 int chanAvgLimit); 635 static std::vector<bool> getMaskFromMaskList(const int nchan, 636 const std::vector<int>& masklist); 637 static std::vector<int> splitToIntList(const std::string& str, const char delim); 638 static std::vector<string> splitToStringList(const std::string& str, const char delim); 639 630 640 631 641 … … 743 753 744 754 void fitBaseline(const std::vector<bool>& mask, int whichrow, Fitter& fitter); 755 double getNormalPolynomial(int n, double x); 745 756 double getChebyshevPolynomial(int n, double x); 757 std::vector<float> doPolynomialFitting(const std::vector<float>& data, 758 const std::vector<bool>& mask, 759 int order, 760 std::vector<float>& params, 761 float& rms, 762 std::vector<bool>& finalMask, 763 float clipth, 764 int clipn); 765 std::vector<float> doPolynomialFitting(const std::vector<float>& data, 766 const std::vector<bool>& mask, 767 int order, 768 std::vector<float>& params, 769 float& rms, 770 std::vector<bool>& finalMask, 771 int& nClipped, 772 float thresClip=3.0, 773 int nIterClip=0, 774 bool getResidual=true); 746 775 std::vector<float> doChebyshevFitting(const std::vector<float>& data, 776 const std::vector<bool>& mask, 777 int order, 778 std::vector<float>& params, 779 float& rms, 780 std::vector<bool>& finalMask, 781 float clipth, 782 int clipn); 783 std::vector<float> doChebyshevFitting(const std::vector<float>& data, 784 const std::vector<bool>& mask, 785 int order, 786 std::vector<float>& params, 787 float& rms, 788 std::vector<bool>& finalMask, 789 int& nClipped, 790 float thresClip=3.0, 791 int nIterClip=0, 792 bool getResidual=true); 793 std::vector<float> doLeastSquareFitting(const std::vector<float>& data, 794 const std::vector<bool>& mask, 795 double (Scantable::*pfunc)(int, double), 796 int order, 797 std::vector<float>& params, 798 float& rms, 799 std::vector<bool>& finalMask, 800 int& nClipped, 801 float thresClip=3.0, 802 int nIterClip=0, 803 bool getResidual=true); 804 std::vector<float> doCubicSplineFitting(const std::vector<float>& data, 747 805 const std::vector<bool>& mask, 748 int order,806 std::vector<int>& idxEdge, 749 807 std::vector<float>& params, 808 float& rms, 750 809 std::vector<bool>& finalMask, 751 float& rms, 752 int& nClipped, 753 float thresClip=3.0, 754 int nIterClip=1, 755 bool getResidual=true); 810 float clipth, 811 int clipn); 756 812 std::vector<float> doCubicSplineFitting(const std::vector<float>& data, 757 813 const std::vector<bool>& mask, … … 759 815 std::vector<int>& idxEdge, 760 816 std::vector<float>& params, 817 float& rms, 818 std::vector<bool>& finalMask, 819 float clipth, 820 int clipn); 821 std::vector<float> doCubicSplineFitting(const std::vector<float>& data, 822 const std::vector<bool>& mask, 823 int nPiece, 824 bool useGivenPieceBoundary, 825 std::vector<int>& idxEdge, 826 std::vector<float>& params, 827 float& rms, 828 std::vector<bool>& finalMask, 761 829 int& nClipped, 762 830 float thresClip=3.0, 763 int nIterClip= 1,831 int nIterClip=0, 764 832 bool getResidual=true); 765 833 std::vector<float> doSinusoidFitting(const std::vector<float>& data, … … 767 835 const std::vector<int>& waveNumbers, 768 836 std::vector<float>& params, 837 float& rms, 838 std::vector<bool>& finalMask, 839 float clipth, 840 int clipn); 841 std::vector<float> doSinusoidFitting(const std::vector<float>& data, 842 const std::vector<bool>& mask, 843 const std::vector<int>& waveNumbers, 844 std::vector<float>& params, 845 float& rms, 846 std::vector<bool>& finalMask, 769 847 int& nClipped, 770 848 float thresClip=3.0, 771 int nIterClip= 1,849 int nIterClip=0, 772 850 bool getResidual=true); 773 851 void selectWaveNumbers(const int whichrow, 774 852 const std::vector<bool>& chanMask, 775 const bool applyFFT, 776 const std::string& fftMethod, 777 const std::string& fftThresh, 853 const std::string& fftInfo, 854 //const bool applyFFT, 855 //const std::string& fftMethod, 856 //const std::string& fftThresh, 778 857 const std::vector<int>& addNWaves, 779 858 const std::vector<int>& rejectNWaves, 780 859 std::vector<int>& nWaves); 860 void parseFFTInfo(const std::string& fftInfo, 861 bool& applyFFT, 862 std::string& fftMethod, 863 std::string& fftThresh); 781 864 void parseThresholdExpression(const std::string& fftThresh, 782 865 std::string& fftThAttr, … … 821 904 int order); 822 905 double doGetRms(const std::vector<bool>& mask, const casa::Vector<casa::Float>& spec); 906 std::string packFittingResults(const int irow, const std::vector<float>& params, const float rms); 907 void parseBlInfo(const std::string& blInfo, int& whichrow, STBaselineFunc::FuncName& ftype, std::vector<int>& fpar, std::vector<bool>& mask, float& thresClip, int& nIterClip, bool& useLineFinder, float& thresLF, std::vector<int>& edgeLF, int& avgLF); 908 std::vector<float> doApplyBaselineTable(std::vector<float>& spec, std::vector<bool>& mask, const STBaselineFunc::FuncName ftype, std::vector<int>& fpar, std::vector<float>& params, float&rms); 909 std::vector<float> doSubtractBaseline(std::vector<float>& spec, std::vector<bool>& mask, const STBaselineFunc::FuncName ftype, std::vector<int>& fpar, std::vector<float>& params, float&rms, std::vector<bool>& finalmask, float clipth, int clipn, bool uself, int irow, float lfth, std::vector<int>& lfedge, int lfavg); 823 910 824 911 }; 825 826 912 } // namespace 827 913
Note: See TracChangeset
for help on using the changeset viewer.