Changeset 516


Ignore:
Timestamp:
02/28/05 16:56:53 (20 years ago)
Author:
vor010
Message:

LineFinder/automatic baseline fitter: a bug related to multiple-row scantable handling has been corrected.
Help is changed to describe a new interface. Parameter checking + vector to tuple conversion for the edge parameter have been added

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/install.sh

    r512 r516  
    1212    ASAPDIR='/DATA/KAPUTAR_2/vor010/ASAP/site-packages/asap'
    1313    SRCDIR='/DATA/KAPUTAR_2/vor010/ASAP/asap'
    14     BINDIR='/DATA/KAPUTAR_2/vor010/ASAP/'
     14    BINDIR='/DATA/KAPUTAR_2/vor010/ASAP/executables'
    1515else
    1616    ASAPDIR='/usr/local/lib/python2.3/site-packages/asap'
  • trunk/python/asaplinefind.py

    r514 r516  
    1515       else:
    1616          print "No lines found!"
    17        sc2=poly_baseline(sc,fl.get_mask(),7)
     17       sc2=sc.poly_baseline(fl.get_mask(),7)
    1818   
    1919    The algorithm involves a simple threshold criterion. The line is
     
    7979        if not scan:
    8080           raise RuntimeError, 'Please give a correct scan'
     81        from asap import _is_sequence_or_number as _is_valid
     82
     83        if not _is_valid(edge, int):
     84           raise RuntimeError, "Parameter 'edge' as to be an integer or \
     85           a pair of integers"
     86
    8187        if len(edge)>2:
    8288           raise RuntimeError, "The edge parameter should have two \
     
    8490        if mask is None:
    8591            from numarray import ones
    86             self.finder.setscan(scan,ones(scan.nchan()),edge)
     92            self.finder.setscan(scan,ones(scan.nchan()),tuple(edge))
    8793        else:   
    88             self.finder.setscan(scan,mask,edge)
     94            self.finder.setscan(scan,mask,tuple(edge))
    8995        return
    9096    def find_lines(self,nRow=0):
     
    121127        else:
    122128            return self.finder.getlinerangesinchannels()
    123 
  • trunk/python/scantable.py

    r513 r516  
    11031103
    11041104        Example:
    1105             sc2=auto_poly_baseline(order=7)
     1105            scan2=scan.auto_poly_baseline(order=7)
    11061106        """
    11071107        if insitu is None: insitu = rcParams['insitu']
     
    11121112       
    11131113        if not _is_valid(edge, int):
    1114             print "Parameter 'edge' as to be an integer or a pair of integers"
    1115             return
     1114            raise RuntimeError, "Parameter 'edge' has to be an integer or a \
     1115            pair of integers specified as a tuple"
    11161116       
    11171117        # setup fitter
  • trunk/src/SDLineFinder.cc

    r370 r516  
    628628       scan=in_scan.getCP();
    629629       AlwaysAssert(!scan.null(),AipsError);
    630        if (scan->nRow()!=1)
    631            throw AipsError("SDLineFinder::setScan - in_scan contains more than 1 row."
    632                            "Choose one first.");       
     630
    633631       mask=in_mask;
    634632       if (mask.nelements()!=scan->nChan())
Note: See TracChangeset for help on using the changeset viewer.