Changeset 2672 for trunk/python


Ignore:
Timestamp:
10/18/12 21:06:07 (12 years ago)
Author:
Malte Marquarding
Message:

introduce 'reshape' method; this includes a fix to c++ for the upper boundary assertion

Location:
trunk/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/ipysupport.py

    r2499 r2672  
    9797        resample        - return a scan with resampled channels
    9898        smooth          - return the spectrally smoothed scan
     99        reshape         - cut out channel range
    99100        poly_baseline   - fit a polynomial baseline to all Beams/IFs/Pols
    100101        auto_poly_baseline - automatically fit a polynomial baseline
  • trunk/python/scantable.py

    r2645 r2672  
    21922192
    21932193    @asaplog_post_dec
     2194    def reshape(self, first, last, insitu=None):
     2195        """Resize the band by providing first and last channel.
     2196        This will cut off all channels outside [first, last].
     2197        """
     2198        if insitu is None:
     2199            insitu = rcParams['insitu']
     2200        varlist = vars()
     2201        if last < 0:
     2202            last = self.nchan()-1 + last
     2203        s = None
     2204        if insitu:
     2205            s = self
     2206        else:
     2207            s = self.copy()
     2208        s._reshape(first,last)
     2209        s._add_history("reshape", varlist)
     2210        if not insitu:
     2211            return s       
     2212
     2213    @asaplog_post_dec
    21942214    def resample(self, width=5, method='cubic', insitu=None):
    21952215        """\
Note: See TracChangeset for help on using the changeset viewer.