Ignore:
Timestamp:
02/01/05 13:21:27 (19 years ago)
Author:
vor010
Message:

SDLineFinder - now algorithm does many iterations
to ensure that weak lines, which are close to the strong ones, are also found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDLineFinder.h

    r331 r343  
    8787protected:
    8888   // concatenate two lists preserving the order. If two lines appear to
    89    // be adjacent, they are joined into the new one
     89   // be adjacent or have a non-void intersection, they are joined into
     90   // the new line
    9091   void addNewSearchResult(const std::list<std::pair<int, int> > &newlines)
    9192                           throw(casa::AipsError);
     93                           
     94   // An auxiliary object function to test whether two lines have a non-void
     95   // intersection
     96   class IntersectsWith : public std::unary_function<pair<int,int>, bool> {
     97       std::pair<int,int> line1;           // range of the first line
     98                                           // start channel and stop+1
     99   public:
     100        IntersectsWith(const std::pair<int,int> &in_line1);
     101        // return true if line2 intersects with line1 with at least one
     102        // common channel, and false otherwise
     103        bool operator()(const std::pair<int,int> &line2) const throw();
     104   };
     105
     106   // An auxiliary object function to build a union of several lines
     107   // to account for a possibility of merging the nearby lines
     108   class BuildUnion {
     109       std::pair<int,int> temp_line;       // range of the first line
     110                                           // start channel and stop+1
     111   public:
     112        BuildUnion(const std::pair<int,int> &line1);
     113        // update temp_line with a union of temp_line and new_line
     114        // provided there is no gap between the lines
     115        void operator()(const std::pair<int,int> &new_line) throw();
     116        // return the result (temp_line)
     117        const std::pair<int,int>& result() const throw();
     118   };
     119   
     120   // An auxiliary object function to test whether a specified line
     121   // is at lower spectral channels (to preserve the order in the line list)
     122   class LaterThan : public std::unary_function<pair<int,int>, bool> {
     123       std::pair<int,int> line1;           // range of the first line
     124                                           // start channel and stop+1
     125   public:
     126        LaterThan(const std::pair<int,int> &in_line1);
     127
     128        // return true if line2 should be placed later than line1
     129        // in the ordered list (so, it is at greater channel numbers)
     130        bool operator()(const std::pair<int,int> &line2) const throw();
     131   };
     132   
    92133private:
    93134   casa::CountedConstPtr<SDMemTable> scan; // the scan to work with
Note: See TracChangeset for help on using the changeset viewer.