Changeset 1641
- Timestamp:
- 10/02/09 15:34:14 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STLineFinder.cpp
r1497 r1641 474 474 running_box=new RunningBox(spectrum,mask,edge,max_box_nchan); 475 475 476 477 476 // determine the off-line variance first 478 477 // an assumption made: lines occupy a small part of the spectrum … … 516 515 517 516 signs[ch]=getAboveMeanSign(); 518 // os<<ch<<" "<<spectrum[ch]<<" "<<fabs(running_box->aboveMean())<<" "<< 519 // threshold*offline_variance<<endl; 520 521 const Float buf=running_box->aboveMean(); 522 if (buf>0) signs[ch]=1; 523 else if (buf<0) signs[ch]=-1; 524 else if (buf==0) signs[ch]=0; 525 //os<<ch<<" "<<spectrum[ch]<<" "<<running_box->getLinMean()<<" "<< 526 // threshold*offline_variance<<endl; 517 //os<<ch<<" "<<spectrum[ch]<<" "<<fabs(running_box->aboveMean())<<" "<< 518 //threshold*offline_variance<<endl; 527 519 } 528 520 if (lines.size()) … … 700 692 throw AipsError("STLineFinder::findLines - in_scan and in_mask have different" 701 693 "number of spectral channels."); 694 695 // taking flagged channels into account 696 vector<bool> flaggedChannels = scan->getMask(whichRow); 697 if (flaggedChannels.size()) { 698 // there is a mask set for this row 699 if (flaggedChannels.size() != mask.nelements()) { 700 throw AipsError("STLineFinder::findLines - internal inconsistency: number of mask elements do not match the number of channels"); 701 } 702 for (size_t ch = 0; ch<mask.nelements(); ++ch) { 703 mask[ch] &= flaggedChannels[ch]; 704 } 705 } 706 702 707 // number of elements in in_edge 703 708 if (in_edge.size()>2)
Note:
See TracChangeset
for help on using the changeset viewer.