Ejemplo n.º 1
0
 def set_beams(self, beams=[]):
     """
     Set a sequence of Beam numbers (0-based).
     Parameters:
         beams:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(beams, int)
     if isinstance(vec,list):
         self._setbeams(vec)
     else:
         raise TypeError('Unknown Beam number type. Use lists of integers.')
Ejemplo n.º 2
0
 def set_ifs(self, ifs=[]):
     """
     Set a sequence of IF numbers (0-based).
     Parameters:
         ifs:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(ifs, int)
     if isinstance(vec,list):
         self._setifs(vec)
     else:
         raise TypeError('Unknown IFno type. Use lists of integers.')
Ejemplo n.º 3
0
 def set_scans(self, scans=[]):
     """
     Set a sequence of Scan numbers (0-based).
     Parameters:
         scans:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(scans, int)
     if isinstance(vec,list):
         self._setscans(vec)
     else:
         raise TypeError('Unknown Scan number type. Use lists of integers.')
Ejemplo n.º 4
0
 def set_types(self, types=[]):
     """
     Set a sequence of source types.
     Parameters:
         types:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(types, int)
     if isinstance(vec,list):
         self._settypes(vec)
     else:
         raise TypeError('Unknown row number type. Use lists of integers.')
Ejemplo n.º 5
0
 def set_cycles(self, cycles=[]):
     """
     Set a sequence of IF numbers (0-based).
     Parameters:
         cycless:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(cycles, int)
     if isinstance(vec,list):
         self._setcycles(vec)
     else:
         raise TypeError('Unknown Cycle number type. Use lists of integers.')
Ejemplo n.º 6
0
 def set_scans(self, scans=[]):
     """
     Set a sequence of Scan numbers (0-based).
     Parameters:
         scans:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(scans, int)
     if isinstance(vec, list):
         self._setscans(vec)
     else:
         raise TypeError('Unknown Scan number type. Use lists of integers.')
Ejemplo n.º 7
0
 def set_beams(self, beams=[]):
     """
     Set a sequence of Beam numbers (0-based).
     Parameters:
         beams:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(beams, int)
     if isinstance(vec, list):
         self._setbeams(vec)
     else:
         raise TypeError('Unknown Beam number type. Use lists of integers.')
Ejemplo n.º 8
0
 def set_ifs(self, ifs=[]):
     """
     Set a sequence of IF numbers (0-based).
     Parameters:
         ifs:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(ifs, int)
     if isinstance(vec, list):
         self._setifs(vec)
     else:
         raise TypeError('Unknown IFno type. Use lists of integers.')
Ejemplo n.º 9
0
 def set_types(self, types=[]):
     """
     Set a sequence of source types.
     Parameters:
         types:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(types, int)
     if isinstance(vec, list):
         self._settypes(vec)
     else:
         raise TypeError('Unknown row number type. Use lists of integers.')
Ejemplo n.º 10
0
 def set_cycles(self, cycles=[]):
     """
     Set a sequence of IF numbers (0-based).
     Parameters:
         cycless:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(cycles, int)
     if isinstance(vec, list):
         self._setcycles(vec)
     else:
         raise TypeError(
             'Unknown Cycle number type. Use lists of integers.')
Ejemplo n.º 11
0
 def set_rows(self, rows=[]):
     """
     Set a sequence of row numbers (0-based). Power users Only!
     NOTICE row numbers can be changed easily by sorting,
     prior selection, etc.
     Parameters:
         rows:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(rows, int)
     if isinstance(vec,list):
         self._setrows(vec)
     else:
         raise TypeError('Unknown row number type. Use lists of integers.')
Ejemplo n.º 12
0
 def set_rows(self, rows=[]):
     """
     Set a sequence of row numbers (0-based). Power users Only!
     NOTICE row numbers can be changed easily by sorting,
     prior selection, etc.
     Parameters:
         rows:    a list of integers. Default [] is to unset the selection.
     """
     vec = _to_list(rows, int)
     if isinstance(vec, list):
         self._setrows(vec)
     else:
         raise TypeError('Unknown row number type. Use lists of integers.')
Ejemplo n.º 13
0
    def set_polarisations(self, pols=[]):
        """
        Set the polarisations to be selected in the scantable.
        Parameters:
             pols:     a list of integers of 0-3, or strings, e.g ["I","Q"].
                       Default [] is no selection
        Example:
             sel = selector()
             # These are equivalent if data is 'linear'
             sel.set_polarisations(["XX","Re(XY)"])
             sel.set_polarisations([0,2])
             # reset the polarisation selection
             sel.set_polarisations()

        """
        vec = _to_list(pols, str) or _to_list(pols, int)
        if isinstance(vec, list): # is an empty and/or valid vector
            if len(vec) and isinstance(vec[-1],str):
                self._setpolstrings(vec)
                return
            self._setpols(vec)
        else:
            raise TypeError('Unknown pol type. Please use [0,1...] or ["XX","YY"...]')
Ejemplo n.º 14
0
    def set_polarisations(self, pols=[]):
        """
        Set the polarisations to be selected in the scantable.
        Parameters:
             pols:     a list of integers of 0-3, or strings, e.g ["I","Q"].
                       Default [] is no selection
        Example:
             sel = selector()
             # These are equivalent if data is 'linear'
             sel.set_polarisations(["XX","Re(XY)"])
             sel.set_polarisations([0,2])
             # reset the polarisation selection
             sel.set_polarisations()

        """
        vec = _to_list(pols, str) or _to_list(pols, int)
        if isinstance(vec, list):  # is an empty and/or valid vector
            if len(vec) and isinstance(vec[-1], str):
                self._setpolstrings(vec)
                return
            self._setpols(vec)
        else:
            raise TypeError(
                'Unknown pol type. Please use [0,1...] or ["XX","YY"...]')