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

Classes

class  scantable

Functions

def preserve_selection
def is_scantable
def is_ms
 return (os.path.isdir(filename) and not os.path.exists(filename+'/table.f1') and os.path.exists(filename+'/table.info'))
def normalise_edge_param
def raise_fitting_failure_exception
def pack_progress_params

Detailed Description

This module defines the scantable class.

Function Documentation

def asap.scantable.is_ms (   filename)

return (os.path.isdir(filename) and not os.path.exists(filename+'/table.f1') and os.path.exists(filename+'/table.info'))

Is the given file a MeasurementSet?

Parameters:

    filename: the name of the file/directory to test

Definition at line 58 of file scantable.py.

Referenced by task_sdscale.sdscale_worker.__get_outform(), asap.scantable.scantable._fill(), sdutil.sdtask_template_imaging.initialize(), asap.asapmath.splitant(), and tests.test_sdcoadd.sdcoadd_basicTest.test03().

def asap.scantable.is_scantable (   filename)
\
Convert a given edge value to a one-dimensional array that can be
given to baseline-fitting/subtraction functions.
The length of the output value will be an even because values for
the both sides of spectra are to be contained for each IF. When
the length is 2, the values will be applied to all IFs. If the length
is larger than 2, it will be 2*ifnos(). 
Accepted format of edge include:
        * an integer - will be used for both sides of spectra of all IFs.
              e.g. 10 is converted to [10,10]
        * an empty list/tuple [] - converted to [0, 0] and used for all IFs. 
        * a list/tuple containing an integer - same as the above case.
              e.g. [10] is converted to [10,10]
        * a list/tuple containing two integers - will be used for all IFs. 
              e.g. [5,10] is output as it is. no need to convert.
        * a list/tuple of lists/tuples containing TWO integers -
              each element of edge will be used for each IF.
              e.g. [[5,10],[15,20]] - [5,10] for IF[0] and [15,20] for IF[1].
              
              If an element contains the same integer values, the input 'edge'
              parameter can be given in a simpler shape in the following cases:
                  ** when len(edge)!=2
                      any elements containing the same values can be replaced
                      to single integers.
                      e.g. [[15,15]] can be simplified to [15] (or [15,15] or 15 also). 
                      e.g. [[1,1],[2,2],[3,3]] can be simplified to [1,2,3]. 
                  ** when len(edge)=2
                      care is needed for this case: ONLY ONE of the
                      elements can be a single integer,
                      e.g. [[5,5],[10,10]] can be simplified to [5,[10,10]]
                           or [[5,5],10], but can NOT be simplified to [5,10].
                           when [5,10] given, it is interpreted as
                           [[5,10],[5,10],[5,10],...] instead, as shown before. 

Definition at line 79 of file scantable.py.

Referenced by asap.scantable.scantable.auto_chebyshev_baseline(), asap.scantable.scantable.auto_cspline_baseline(), asap.scantable.scantable.auto_poly_baseline(), and asap.scantable.scantable.auto_sinusoid_baseline().

def asap.scantable.pack_progress_params (   showprogress,
  minnrow 
)

Definition at line 22 of file scantable.py.