Changeset 69 for trunk


Ignore:
Timestamp:
Sep 25, 2014 12:51:44 PM (10 years ago)
Author:
JohnLightfoot
Message:

clean central quarter only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cleanimage.py

    r56 r69  
    3434        residualimage = np.zeros(np.shape(dirtyimage), np.float)
    3535
    36 #        for iwn,wn in enumerate(wavenumber):
    37 #            print 'cleaning %s' % wn
    38 #            max = np.max(dirtyimage[:,:,iwn])
    39 #            components, residual = pclean.hogbom(dirty=dirtyimage[:,:,iwn],
    40 #              psf=dirtybeam[:,:,iwn],
    41 #              window=True, gain=0.1, thresh=max/100.0, niter=5000)
    42 #            cleanimage[:,:,iwn] = components
    43 #            residualimage[:,:,iwn] = residual
    44 
    4536        # calculate clean image for each wn
    4637        jobs = {}
     38        # clean only central quarter
     39        imsize = np.shape(dirtyimage)[:2]
     40        window = [slice(imsize[0]/4, imsize[0]*3/4), slice(imsize[1]/4, imsize[1]*3/4)]
    4741        for iwn,wn in enumerate(wavenumber):
    4842            # submit jobs
    49             print 'starting clean for', wn
    5043            immax = np.max(dirtyimage[:,:,iwn])
    51             indata = (dirtyimage[:,:,iwn], dirtybeam[:,:,iwn], True, 0.1,
     44            indata = (dirtyimage[:,:,iwn], dirtybeam[:,:,iwn], window, 0.1,
    5245              immax/100.0, 5000,)
    5346            jobs[wn] = self.job_server.submit(pythonclean.hogbom,
     
    5952
    6053        self.result['dirtyimage'] = dirtyimage
    61         self.result['cleanimage'] = cleanimage
     54        self.result['cleanimage'] = cleanimage + residualimage
    6255        self.result['residualimage'] = residualimage
    6356        self.result['spatial axis [arcsec]'] = spatial_axis
Note: See TracChangeset for help on using the changeset viewer.