Ignore:
Timestamp:
06/09/10 19:03:06 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: Yes

JIRA Issue: Yes (CAS-2211)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: ASAP 3.0.0 interface changes

Test Programs:

Put in Release Notes: Yes

Module(s): all the CASA sd tools and tasks are affected.

Description: Merged ATNF-ASAP 3.0.0 developments to CASA (alma) branch.

Note you also need to update casa/code/atnf.


Location:
branches/alma
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/alma

  • branches/alma/python/selector.py

    r1693 r1757  
    77    scantables to specific rows.
    88    """
    9     def __init(self):
    10         _selector.__init__(self)
     9    fields = ["pols", "ifs", "beams", "scans", "cycles", "name", "query"]
     10
     11    def __init__(self, *args, **kw):
     12        if len(args) == 1:
     13            if isinstance(args[0], self.__class__) \
     14               or isinstance(args[0], _selector):
     15                _selector.__init__(self, args[0])
     16            else:
     17                raise TypeError("Argument can only be a selector object")
     18        else:
     19            _selector.__init__(self)
     20            for k,v  in kw.items():
     21                if k in self.fields:
     22                    func = getattr(self, "set_%s" % k)
     23                    func(v)
    1124
    1225    def reset(self):
     
    4558        else:
    4659            raise TypeError('Unknown pol type. Please use [0,1...] or ["XX","YY"...]')
    47    
     60
    4861    # for the americans
    4962    set_polarizations = set_polarisations
     
    220233        Merge two selections.
    221234        """
     235        if self.is_empty():
     236            return other
     237        elif other.is_empty():
     238            return self
    222239        union = selector()
    223240        gets = [[self._getscans(), other._getscans(), union._setscans],
Note: See TracChangeset for help on using the changeset viewer.