Changeset 1858
- Timestamp:
- 08/05/10 11:46:40 (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/source/api.rst
r1852 r1858 2 2 API documentation 3 3 ================= 4 5 Module :mod:`asap.logging`6 ==========================7 8 .. automodule:: asap.logging9 :members:10 :undoc-members:11 12 4 13 5 Module :mod:`asap.scantable` … … 18 10 .. :undoc-members: 19 11 .. :inherited-members: 12 13 Module :mod:`asap.env` 14 ====================== 15 16 .. automodule:: asap.env 17 :members: 18 .. :undoc-members: 19 20 Module :mod:`asap.parameters` 21 ============================= 22 23 .. automodule:: asap.parameters 24 :members: 25 :undoc-members: 26 27 Module :mod:`asap.logging` 28 ========================== 29 30 .. automodule:: asap.logging 31 :members: 32 .. :undoc-members: 33 -
trunk/doc/source/conf.py
r1852 r1858 209 209 autoclass_content = "both" 210 210 211 todo_include_todos = True 212 211 213 # -- Options for manual page output -------------------------------------------- 212 214 -
trunk/doc/source/developer/index.rst
r1852 r1858 7 7 8 8 scantable 9 todo -
trunk/doc/source/developer/scantable.rst
r1854 r1858 237 237 * **FORMATTEDNAME** - *String()* 238 238 239 .. todo:: add all sub-table descriptions 239 240 240 241 ======================== -
trunk/python/asapplotter.py
r1824 r1858 14 14 By default the plotter is set up to plot polarisations 15 15 'colour stacked' and scantables across panels. 16 Note: 16 17 .. note:: 18 17 19 Currenly it only plots 'spectra' not Tsys or 18 20 other variables. 21 19 22 """ 20 23 def __init__(self, visible=None , **kwargs): … … 113 116 self._plotter.tidy() 114 117 self._plotter.show(hardrefresh=False) 115 print_log()116 118 return 117 119 … … 352 354 353 355 def set_panelling(self, what=None): 356 """Set the 'panelling' mode i.e. which type of spectra should be 357 spread across different panels. 358 """ 359 354 360 mode = what 355 361 if mode is None: … … 382 388 383 389 def set_stacking(self, what=None): 390 """Set the 'stacking' mode i.e. which type of spectra should be 391 overlayed. 392 """ 384 393 mode = what 385 394 if mode is None: -
trunk/python/env.py
r1848 r1858 1 """This module has various functions for environment specific setings. 2 """ 1 3 __all__ = ["is_casapy", "is_ipython", "setup_env", "get_revision"] 2 4 … … 7 9 8 10 def is_casapy(): 11 """Are we running inside casapy?""" 9 12 try: 10 13 from taskinit import casalog … … 14 17 15 18 def is_ipython(): 19 """Are we running inside IPython?""" 16 20 return 'IPython' in sys.modules.keys() 17 21 18 22 def setup_env(): 23 """Set-up environment variables for casa and initialise ~/.asap on first 24 use. 25 """ 19 26 # Set up CASAPATH and first time use of asap i.e. ~/.asap/* 20 27 plf = None … … 59 66 60 67 def get_revision(): 68 """Get the revision of the software. Only useful within casapy.""" 61 69 if not is_casapy: 62 70 return ' unknown ' -
trunk/python/logging.py
r1833 r1858 1 __all__ = ["asaplog", "print_log", "print_log_dec"] 1 """This module presents a logging abstraction layer on top of casa. 2 """ 3 __all__ = ["asaplog", "print_log", "print_log_dec", "AsapLogger"] 2 4 3 5 from asap.env import is_casapy … … 10 12 11 13 12 class _asaplog(object): 13 """Wrapper object to allow for both casapy and asap logging""" 14 class AsapLogger(object): 15 """Wrapper object to allow for both casapy and asap logging. 16 17 Inside casapy this will connect to `taskinit.casalog`. Otherwise it will 18 create its own casa log sink. 19 20 .. note:: Do instantiate a new one - use the :obj:`asaplog` instead. 21 22 """ 14 23 def __init__(self): 15 24 self._enabled = False … … 25 34 """Post the messages to the logger. This will clear the buffered 26 35 logs. 36 37 Parameters: 38 39 level: The log level (severity). One of INFO, WARN, ERROR. 40 27 41 """ 28 42 if not self._enabled: … … 41 55 42 56 def push(self, msg, newline=True): 43 """Push logs into the buffer. post needs to be called to send them.""" 57 """Push logs into the buffer. post needs to be called to send them. 58 59 Parameters: 60 61 msg: the log message (string) 62 63 newline: should we terminate with a newline (default yes) 64 65 """ 44 66 from asap import rcParams 45 67 if self._enabled: … … 58 80 self._enabled = flag 59 81 60 asaplog = _asaplog() 82 asaplog = AsapLogger() 83 """Default asap logger""" 61 84 62 85 def print_log_dec(f, level='INFO'): 86 """Decorator which posts log at completion of the wrapped method. 87 Example:: 88 89 @print_log_dec 90 def test(self): 91 do_stuff() 92 asaplog.push('testing...', False) 93 do_more_stuff() 94 asaplog.push('finished') 95 """ 63 96 @wraps_dec(f) 64 97 def wrap_it(*args, **kw): … … 69 102 70 103 def print_log(level='INFO'): 71 """Alias for asaplog.post ."""104 """Alias for asaplog.post(level)""" 72 105 asaplog.post(level) -
trunk/python/parameters.py
r1834 r1858 1 """This module provides functions to set up resource parameters (rc). 2 These can be set in a file .asaprc or using functions. 3 """ 1 4 __all__ = ["rc", "list_rcparameters", "rcParams", "rcParamsDefault"] 2 5
Note:
See TracChangeset
for help on using the changeset viewer.