Changeset 3044
- Timestamp:
- 08/07/15 16:42:16 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r3043 r3044 4765 4765 if (!applyFFT) { 4766 4766 nWaves = selectWaveNumbers(addNWaves, rejectNWaves); 4767 if (nWaves.size()==0) //no wave numbers to fit 4768 throw(AipsError("No valid wave numbers to fit")); 4767 4769 modelReservoir = getSinusoidModelReservoir(nWaves, nChanNos); 4768 4770 } … … 4771 4773 std::vector<float> sp = getSpectrum(whichrow); 4772 4774 chanMask = getCompositeChanMask(whichrow, mask); 4773 std::vector<std::vector<double> > model; 4775 std::vector<std::vector<double> > model; 4776 bool canfit = true; 4774 4777 if (applyFFT) { 4775 4778 nWaves = selectWaveNumbers(whichrow, chanMask, true, fftMethod, fftThresh, 4776 4779 addNWaves, rejectNWaves); 4780 if (nWaves.size()==0) {// no wave numbers to fit. 4781 canfit = false; 4782 break; 4783 } 4777 4784 model = getSinusoidModel(nWaves, sp.size()); 4778 4785 } else { … … 4784 4791 4785 4792 //if (flagrowCol_(whichrow) == 0) { 4786 if ( flagrowCol_(whichrow)==0 && nValidMask(chanMask)>0) {4793 if (canfit && flagrowCol_(whichrow)==0 && nValidMask(chanMask)>0) { 4787 4794 int nClipped = 0; 4788 4795 std::vector<float> res; … … 4882 4889 if (!applyFFT) { 4883 4890 nWaves = selectWaveNumbers(addNWaves, rejectNWaves); 4891 if (nWaves.size()==0) //no wave numbers to fit 4892 throw(AipsError("No valid wave numbers to fit")); 4884 4893 modelReservoir = getSinusoidModelReservoir(nWaves, nChanNos); 4885 4894 } … … 4890 4899 chanMask = getCompositeChanMask(whichrow, mask, edge, currentEdge, lineFinder); 4891 4900 std::vector<std::vector<double> > model; 4901 bool canfit=true; 4892 4902 if (applyFFT) { 4893 4903 nWaves = selectWaveNumbers(whichrow, chanMask, true, fftMethod, fftThresh, 4894 4904 addNWaves, rejectNWaves); 4905 if (nWaves.size()==0) { // no wave numbers to fit. 4906 canfit = false; 4907 break; 4908 } 4895 4909 model = getSinusoidModel(nWaves, sp.size()); 4896 4910 } else { … … 4902 4916 4903 4917 //if (flagrowCol_(whichrow) == 0) { 4904 if ( flagrowCol_(whichrow)==0 && nValidMask(chanMask)>0) {4918 if (canfit && flagrowCol_(whichrow)==0 && nValidMask(chanMask)>0) { 4905 4919 int nClipped = 0; 4906 4920 std::vector<float> res;
Note:
See TracChangeset
for help on using the changeset viewer.