casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Functions
asap.utils Namespace Reference

Functions

def mask_and
def mask_or
def mask_not
def _n_bools
def _is_sequence_or_number
def _to_list
def unique
def list_files
def page
def toggle_verbose

Function Documentation

def asap.utils._is_sequence_or_number (   param,
  ptype = int 
) [private]

Definition at line 17 of file utils.py.

Referenced by asap.utils._to_list().

def asap.utils._n_bools (   n,
  val 
) [private]
def asap.utils._to_list (   param,
  ptype = int 
) [private]
def asap.utils.list_files (   path = ".",
  suffix = "rpf" 
)
Return a list files readable by asap, such as rpf, sdfits, mbf, asap
Parameters:
    path:     The directory to list (default '.')
    suffix:   The file extension (default rpf)
Example:
    files = list_files("data/","sdfits")
    print files
    ['data/2001-09-01_0332_P363.sdfits',
    'data/2003-04-04_131152_t0002.sdfits',
    'data/Sgr_86p262_best_SPC.sdfits']

Definition at line 48 of file utils.py.

def asap.utils.mask_and (   a,
  b 
)
def asap.utils.mask_not (   a)
def asap.utils.mask_or (   a,
  b 
)
def asap.utils.page (   message)
Run the input message through a pager. This is only done if
``rcParams["verbose"]`` is set.

Definition at line 69 of file utils.py.

Referenced by asap.scantable.scantable.history().

Definition at line 89 of file utils.py.

def asap.utils.unique (   x)
Return the unique values in a list
Parameters:
    x:      the list to reduce
Examples:
    x = [1,2,3,3,4]
    print unique(x)
    [1,2,3,4]

Definition at line 36 of file utils.py.

References asap.asapmath.keys.

Referenced by asap.selector.selector.__add__(), flaghelper.compressSelectionList(), and asap.scantable.scantable.drop_scan().