Changeset 1883 for trunk/python/asapmath.py
- Timestamp:
- 08/20/10 18:03:31 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapmath.py
r1880 r1883 1 from asap.scantable import scantable 1 from asap.scantable import scantable, is_ms 2 2 from asap.parameters import rcParams 3 3 from asap.logging import asaplog, asaplog_post_dec … … 957 957 raise IOError(s) 958 958 # 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): 962 963 s = "File '%s' is not a Measurement set." % (filename) 963 964 raise IOError(s) … … 996 997 tb.open(tablename=filename,nomodify=True) 997 998 ant1=tb.getcol('ANTENNA1',0,-1,1) 999 tb.close() 998 1000 tmpname='asapmath.splitant.tmp' 999 1001 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) 1003 1006 tbsel.close() 1007 tb.close() 1004 1008 del tbsel 1005 1009 scan=scantable(tmpname,average=False,getpt=True,antenna=int(antid))
Note: See TracChangeset
for help on using the changeset viewer.