#log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE *** #log# DO NOT CHANGE THIS LINE OR THE TWO BELOW -* coding: UTF-8 *- #log# opts = Struct({'__allownew': True, 'autocall': 2, 'banner': 0, 'colors': 'LightBG', 'ipythondir': '/home/teuben/.casa/ipython', 'logfile': 'ipython-20150427-171256.log', 'messages': 0, 'prompt_in1': 'CASA <\\#>: '}) #log# args = [] #log# It is safe to make manual edits below here. #log#----------------------------------------------------------------------- execfile("/astromake/opt/casa/casa-release-4.3.0-el6/lib/python2.7/assignmentFilter.py") import taskini import taskinit def cutz(fni,fno,z=None): """ cut out some central spectral portion e.g. z=[100,200] """ taskinit.ia.fromfits(infile=fni,overwrite=True) bmin = 0 bmax = 341 if z == None: r1 = taskinit.rg.box([bmin,bmin],[bmax,bmax]) else: r1 = taskinit.rg.box([bmin,bmin,z[0]],[bmax,bmax,z[1]]) i1 = taskinit.ia.subimage(region=r1,overwrite=True) i1.tofits(fno,overwrite=True) cutz('ngc253_fullcube_compact_spw3_clean.c.fits','ngc253_fullcube_compact_spw3_clean.ce.fits',[55,1010]) cutz('ngc253_fullcube_compact_spw2_clean.c.fits','ngc253_fullcube_compact_spw2_clean.ce.fits',[50,1005]) cutz('ngc253_fullcube_compact_spw1_clean.c.fits','ngc253_fullcube_compact_spw1_clean.ce.fits',[56,1011]) cutz('ngc253_fullcube_compact_spw0_clean.c.fits','ngc253_fullcube_compact_spw0_clean.ce.fits',[54,1009]) quit()