Changeset 1554 for trunk


Ignore:
Timestamp:
03/30/09 11:01:15 (16 years ago)
Author:
Malte Marquarding
Message:

Support maks windows of style [channel]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r1545 r1554  
    763763            c)
    764764            mask only channel 400
    765             msk =  scan.create_mask([400, 400])
    766         """
    767         row = 0
    768         if kwargs.has_key("row"):
    769             row = kwargs.get("row")
     765            msk =  scan.create_mask([400])
     766        """
     767        row = kwargs.get("row", 0)
    770768        data = self._getabcissa(row)
    771769        u = self._getcoordinfo()[0]
     
    784782             and args or args[0]
    785783        for window in ws:
    786             if len(window) != 2:
    787                 raise ValueError("A window needs to be defined as [start, end]")
     784            if len(window) == 1:
     785                window = [window[0], window[0]]
     786            if len(window) == 0 or  len(window) > 2:
     787                raise ValueError("A window needs to be defined as [start(, end)]")
    788788            if window[0] > window[1]:
    789789                tmp = window[0]
Note: See TracChangeset for help on using the changeset viewer.