Changeset 167 for trunk/python


Ignore:
Timestamp:
12/27/04 22:14:55 (20 years ago)
Author:
kil064
Message:

Reimplement 'bin' with insitu version as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r166 r167  
    8989        return
    9090       
    91 def bin(scan, binwidth=5):
     91def bin(scan, width=5, insitu=False):
    9292    """
     93    Return a scan where all spectra have been binned up
     94        width        The bin width (default=5) in pixels
     95        insitu:      if False (default) a new scantable is returned.
     96                     Otherwise, the addition is done in-situ
    9397    """
    94     from asap._asap import bin as _bin
    95     return scantable(_bin(scan, binwidth))
     98    if not insitu:
     99        from asap._asap import bin as _bin
     100        return scantable(_bin(scan, width))
     101    else:
     102        from asap._asap import bin_insitu as _bin
     103        _bin(scan, width)
     104        return
    96105
    97106def average_pol(scan, mask=None, insitu=False):
Note: See TracChangeset for help on using the changeset viewer.