Changeset 141 for trunk/python


Ignore:
Timestamp:
12/24/04 13:23:03 (20 years ago)
Author:
mar637
Message:

added insitu to scale.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r129 r141  
    11from scantable import scantable
    22
    3 def average_time(*args, **kwargs):
     3def average_time(*args,**kwargs):
    44    """
    55    Return the (time) average of a scan or list of scans. [in channels only]
     
    6060    return scantable(_quot(source, reference))
    6161
    62 def scale(scan, factor):
     62def scale(scan, factor, insitu=False):
    6363    """
    6464    Return a scan where all spectra are scaled by the give 'factor'
     
    6969        This currently applies the all beams/IFs/pols
    7070    """
    71     from asap._asap import scale as _scale
    72     return scantable(_scale(scan, factor))
     71    if not insitu:
     72        from asap._asap import scale as _scale
     73        return scantable(_scale(scan, factor))
     74    else:
     75        from asap._asap import scale_insitu as _scale
     76        _scale(scan, factor)
     77        return
     78       
    7379
    7480def add(scan, offset):
Note: See TracChangeset for help on using the changeset viewer.