Changeset 172


Ignore:
Timestamp:
01/06/05 14:20:34 (20 years ago)
Author:
kil064
Message:

add insitu vinding to function hanning
fix up some inconsietnt docs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r167 r172  
    9292    """
    9393    Return a scan where all spectra have been binned up
    94         width        The bin width (default=5) in pixels
     94        width:       The bin width (default=5) in pixels
    9595        insitu:      if False (default) a new scantable is returned.
    9696                     Otherwise, the addition is done in-situ
     
    108108    Average the Polarisations together.
    109109    Parameters:
    110         scan   - a scantable
    111         mask   - an optional mask defining the region, where the
    112                  averaging will be applied. The output will have all
    113                  specified points masked.
    114         insitu:      if False (default) a new scantable is returned.
     110        scan:        The scantable
     111        mask:        An optional mask defining the region, where the
     112                     averaging will be applied. The output will have all
     113                     specified points masked.
     114        insitu:      If False (default) a new scantable is returned.
    115115                     Otherwise, the averaging is done in-situ
    116116    Example:
     
    127127        return
    128128   
    129 def hanning(scan):
     129def hanning(scan, insitu=False):
    130130    """
    131131    Hanning smooth the channels.
    132132    Parameters:
    133          scan    - the input scan
     133        scan:       The input scan
     134        insitu:     If False (default) a new scantable is returned.
     135                    Otherwise, the scaling is done in-situ
     136
    134137    Example:
    135138         none
    136139    """
    137     from asap._asap import hanning as _han
    138     return scantable(_han(scan))
    139 
     140    if not insitu:
     141        from asap._asap import hanning as _hann
     142        return scantable(_hann(scan))
     143    else:
     144        from asap._asap import hanning_insitu as _hann
     145        _hann(scan)
     146        return
    140147   
    141148def poly_baseline(scan, mask=None, order=0):
Note: See TracChangeset for help on using the changeset viewer.