Changeset 1880
- Timestamp:
- 08/20/10 12:53:05 (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/atnf/PKSIO/PKSMS2reader.cc
r1818 r1880 101 101 if ( antenna.length() == 0 ) { 102 102 cAntId.resize( 1 ) ; 103 cAntId[0] = 0 ; 103 //cAntId[0] = 0 ; 104 ROScalarColumn<Int> ant1Col( cPKSMS, "ANTENNA1" ) ; 105 cAntId[0] = ant1Col(0) ; 104 106 } 105 107 else { -
trunk/python/asapmath.py
r1862 r1880 945 945 """ 946 946 # Import the table toolkit from CASA 947 948 947 import casac 949 948 tbtool = casac.homefinder.find_home_by_name('tableHome') 950 949 tb = tbtool.create() 951 tb2 = tbtool.create()952 950 # Check the input filename 953 951 if isinstance(filename, str): … … 973 971 prefix=filename.rstrip('/') 974 972 # Now do the actual splitting. 973 # 2010/08/20 TN 974 # The antenna parameter for scantable constructor is ineffective at the moemnt. 975 # Thus, we should go back to original implementation of splitant. 976 ## outfiles=[] 977 ## tb.open(tablename=filename+'/ANTENNA',nomodify=True) 978 ## nant=tb.nrows() 979 ## antnames=tb.getcol('NAME',0,nant,1) 980 ## antpos=tb.getcol('POSITION',0,nant,1).transpose() 981 ## tb.close() 982 ## tb.open(tablename=filename,nomodify=True) 983 ## ant1=tb.getcol('ANTENNA1',0,-1,1) 984 ## tb.close() 985 ## for antid in set(ant1): 986 ## scan=scantable(filename,average=False,getpt=True,antenna=int(antid)) 987 ## outname=prefix+antnames[antid]+'.asap' 988 ## scan.save(outname,format='ASAP',overwrite=overwrite) 989 ## del scan 990 ## outfiles.append(outname) 975 991 outfiles=[] 976 992 tb.open(tablename=filename+'/ANTENNA',nomodify=True) 977 993 nant=tb.nrows() 978 994 antnames=tb.getcol('NAME',0,nant,1) 979 antpos=tb.getcol('POSITION',0,nant,1).transpose()980 995 tb.close() 981 996 tb.open(tablename=filename,nomodify=True) 982 997 ant1=tb.getcol('ANTENNA1',0,-1,1) 983 t b.close()998 tmpname='asapmath.splitant.tmp' 984 999 for antid in set(ant1): 985 scan=scantable(filename,average=False,getpt=True,antenna=int(antid)) 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) 1003 tbsel.close() 1004 del tbsel 1005 scan=scantable(tmpname,average=False,getpt=True,antenna=int(antid)) 986 1006 outname=prefix+antnames[antid]+'.asap' 987 1007 scan.save(outname,format='ASAP',overwrite=overwrite) 988 1008 del scan 989 1009 outfiles.append(outname) 990 del tb, tb2 1010 os.system('rm -rf '+tmpname) 1011 tb.close() 1012 del tb 991 1013 return outfiles 992 1014 -
trunk/src/PKSFiller.cpp
r1874 r1880 74 74 Vector<uInt> nchans,npols; 75 75 76 String antenna(" 0");76 String antenna(""); 77 77 78 78 reader_ = getPKSreader(inName, antenna, 0, 0, format, beams, ifs,
Note:
See TracChangeset
for help on using the changeset viewer.