Changeset 1588 for trunk/python
- Timestamp:
- 07/02/09 11:02:45 (15 years ago)
- Location:
- trunk/python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/__init__.py
r1586 r1588 32 32 os.mkdir(userdir) 33 33 shutil.copyfile(asapdata+"/data/ipythonrc-asap", userdir+"/ipythonrc-asap") 34 shutil.copyfile(asapdata+"/data/ipy_user_conf.py", 34 shutil.copyfile(asapdata+"/data/ipy_user_conf.py", 35 35 userdir+"/ipy_user_conf.py") 36 36 f = file(userdir+"/asapuserfuncs.py", "w") … … 41 41 # upgrade to support later ipython versions 42 42 if not os.path.exists(userdir+"/ipy_user_conf.py"): 43 shutil.copyfile(asapdata+"/data/ipy_user_conf.py", 43 shutil.copyfile(asapdata+"/data/ipy_user_conf.py", 44 44 userdir+"/ipy_user_conf.py") 45 45 … … 284 284 285 285 def _n_bools(n, val): 286 return [ val for i in xrange(n) ] 286 return [ val for i in xrange(n) ] 287 287 288 288 def _is_sequence_or_number(param, ptype=int): … … 395 395 def is_ipython(): 396 396 return '__IP' in dir(sys.modules["__main__"]) 397 397 398 if is_ipython(): 398 399 def version(): print "ASAP %s(%s)"% (__version__, __date__) 399 400 def list_scans(t = scantable): 400 401 def list_scans(t = scantable): 401 402 import inspect 402 403 print "The user created scantables are: ", … … 499 500 stddev - Determine the standard deviation of the current 500 501 beam/if/pol 502 get_row_selector - get the selection object for a specified row 503 number 501 504 [Selection] 502 505 selector - a selection object to set a subset of a scantable -
trunk/python/scantable.py
r1586 r1588 1697 1697 s = None 1698 1698 if isinstance(other, scantable): 1699 1699 s = scantable(self._math._binaryop(self, other, "SUB")) 1700 1700 elif isinstance(other, float): 1701 1701 s = scantable(self._math._unaryop(self, other, "SUB", False)) … … 1713 1713 s = None 1714 1714 if isinstance(other, scantable): 1715 1715 s = scantable(self._math._binaryop(self, other, "MUL")) 1716 1716 elif isinstance(other, float): 1717 1717 s = scantable(self._math._unaryop(self, other, "MUL", False)) … … 1776 1776 self.set_selection(basesel) 1777 1777 1778 def get_row_selector(self, rowno): 1779 return selector(beams=self.getbeam(rowno), 1780 ifs=self.getif(rowno), 1781 pols=self.getpol(rowno), 1782 scans=self.getscan(rowno), 1783 cycles=self.getcycle(rowno)) 1778 1784 1779 1785 def _add_history(self, funcname, parameters):
Note:
See TracChangeset
for help on using the changeset viewer.