Changeset 319 for trunk/python


Ignore:
Timestamp:
01/28/05 14:47:22 (20 years ago)
Author:
kil064
Message:

function 'freq_align' now takes interpolation method string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r316 r319  
    204204        return
    205205       
    206 def freq_align(scan, reftime=None, insitu=None):
     206def freq_align(scan, reftime=None, method='cubic', insitu=None):
    207207    """
    208208        Return a scan where all rows have been aligned in frequency. The
     
    212212        reftime:     reference time to align at. By default, the time of
    213213                     the first row of data is used. 
     214        method:      Interpolation method for regridding the spectra. Choose
     215                     from "nearest", "linear", "cubic" (default) and "spline"
    214216        insitu:      if False a new scantable is returned.
    215217                     Otherwise, the scaling is done in-situ
     
    220222    if not insitu:
    221223        from asap._asap import freq_align as _align
    222         return scantable(_align(scan, reftime))
     224        return scantable(_align(scan, reftime, method))
    223225    else:
    224226        from asap._asap import freq_align_insitu as _align
    225         _align(scan, reftime)
     227        _align(scan, reftime, method)
    226228        return
    227229       
Note: See TracChangeset for help on using the changeset viewer.