Ignore:
Timestamp:
08/20/10 18:03:31 (14 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: read MS in reference table

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Bug fix on is_scantable() and similar routine in the codes.
They are now able to recognize reference table correctly.

splitant() is working with reference table. Thus, performance
is a bit improved since deep copy is no longer necessary.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r1880 r1883  
    1 from asap.scantable import scantable
     1from asap.scantable import scantable, is_ms
    22from asap.parameters import rcParams
    33from asap.logging import asaplog, asaplog_post_dec
     
    957957            raise IOError(s)
    958958        # check if input file is MS
    959         if not os.path.isdir(filename) \
    960                or not os.path.exists(filename+'/ANTENNA') \
    961                or not os.path.exists(filename+'/table.f1'):
     959        #if not os.path.isdir(filename) \
     960        #       or not os.path.exists(filename+'/ANTENNA') \
     961        #       or not os.path.exists(filename+'/table.f1'):
     962        if not is_ms(filename):
    962963            s = "File '%s' is not a Measurement set." % (filename)
    963964            raise IOError(s)
     
    996997    tb.open(tablename=filename,nomodify=True)
    997998    ant1=tb.getcol('ANTENNA1',0,-1,1)
     999    tb.close()
    9981000    tmpname='asapmath.splitant.tmp'
    9991001    for antid in set(ant1):
    1000         tbsel=tb.query('ANTENNA1 == %s && ANTENNA2 == %s'%(antid,antid))
    1001         tbsel.copy(tmpname,deep=True)
    1002         #tbsel=tb.query('ANTENNA1 == %s && ANTENNA2 == %s'%(antid,antid),tmpname)
     1002        tb.open(tablename=filename,nomodify=True)
     1003        #tbsel=tb.query('ANTENNA1 == %s && ANTENNA2 == %s'%(antid,antid))
     1004        #tbsel.copy(tmpname,deep=True)
     1005        tbsel=tb.query('ANTENNA1 == %s && ANTENNA2 == %s'%(antid,antid),tmpname)
    10031006        tbsel.close()
     1007        tb.close()
    10041008        del tbsel
    10051009        scan=scantable(tmpname,average=False,getpt=True,antenna=int(antid))
Note: See TracChangeset for help on using the changeset viewer.