Changeset 1843


Ignore:
Timestamp:
08/04/10 12:31:09 (14 years ago)
Author:
Malte Marquarding
Message:

Ticket #192: enabling new filler. Get rid of unused asapreader.

Location:
trunk/python
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r1824 r1843  
    77from asap.env import is_casapy
    88from asap._asap import Scantable
     9from asap._asap import filler
    910from asap.parameters import rcParams
    1011from asap.logging import asaplog, print_log, print_log_dec
     
    5354                         The default (True) is taken from .asaprc.
    5455            unit:         brightness unit; must be consistent with K or Jy.
    55                          Over-rides the default selected by the reader
     56                         Over-rides the default selected by the filler
    5657                         (input rpfits/sdfits/ms) or replaces the value
    5758                         in existing scantables
     
    6263            antenna:     Antenna selection. integer (id) or string (name
    6364                         or id).
    64             parallactify: Indcicate that the data had been parallatified.
     65            parallactify: Indicate that the data had been parallatified.
    6566                          Default is taken form rc file.
    6667        """
     
    6970        if getpt is None:
    7071            getpt = True
     72        if antenna is not None:
     73            asaplog.push("Antenna selection currently unsupported."
     74                         "Using '0'")
     75            print_log('WARN')
    7176        if antenna is None:
    7277            antenna = ''
    7378        elif type(antenna) == int:
    74             antenna = '%s'%antenna
     79            antenna = '%s' % antenna
    7580        elif type(antenna) == list:
    7681            tmpstr = ''
     
    914919        Flag the selected data in row-based manner.
    915920        Parameters:
    916             rows:   list of row numbers to be flagged. Default is no row (must be explicitly specified to execute row-based flagging).
     921            rows:   list of row numbers to be flagged. Default is no row
     922                    (must be explicitly specified to execute row-based flagging).
    917923            unflag: if True, unflag the data.
    918924        """
     
    15971603    def parallactify(self, pflag):
    15981604        """
    1599         Set a flag to inidcate whether this data should be treated as having
     1605        Set a flag to indicate whether this data should be treated as having
    16001606        been 'parallactified' (total phase == 0.0)
    16011607        Parameters:
    1602             pflag:  Bool inidcating whether to turn this on (True) or
     1608            pflag:  Bool indicating whether to turn this on (True) or
    16031609                    off (False)
    16041610        """
     
    23612367
    23622368    def _fill(self, names, unit, average, getpt, antenna):
    2363         import os
    2364         from asap._asap import stfiller
    23652369        first = True
    23662370        fullnames = []
     
    23722376                if rcParams['verbose']:
    23732377                    asaplog.push(msg)
    2374                     #print asaplog.pop().strip()
    23752378                    print_log( 'ERROR' )
    23762379                    return
     
    23822385        for name in fullnames:
    23832386            tbl = Scantable(stype)
    2384             r = stfiller(tbl)
     2387            r = filler(tbl)
    23852388            rx = rcParams['scantable.reference']
    2386             r._setreferenceexpr(rx)
     2389            r.setreferenceexpr(rx)
    23872390            msg = "Importing %s..." % (name)
    23882391            asaplog.push(msg, False)
    23892392            print_log()
    2390             r._open(name, antenna, -1, -1, getpt)
    2391             r._read()
     2393            r.open(name)# antenna, -1, -1, getpt)
     2394            r.fill()
    23922395            if average:
    23932396                tbl = self._math._average((tbl, ), (), 'NONE', 'SCAN')
     
    23952398                tbl = self._math._merge([self, tbl])
    23962399            Scantable.__init__(self, tbl)
    2397             r._close()
     2400            r.close()
    23982401            del r, tbl
    23992402            first = False
Note: See TracChangeset for help on using the changeset viewer.