Commits
39 39 | |
40 40 | ### |
41 41 | ### import check versions |
42 42 | ### |
43 43 | _GCV001 = True |
44 44 | _GCV002 = True |
45 45 | _GCV003 = True |
46 46 | _GCV004 = True |
47 47 | |
48 48 | |
49 - | print("USING THIS GCLEAN") |
50 - | |
51 49 | # from casatasks.private.imagerhelpers._gclean import gclean |
52 50 | class gclean: |
53 51 | '''gclean(...) creates a stream of convergence records which indicate |
54 52 | the convergence quaility of the tclean process. The initial record |
55 53 | describes the initial dirty image. |
56 54 | It is designed for use with the interactive clean GUI, but it could |
57 55 | be used independently. It can be used as a regular generator: |
58 56 | for rec in gclean( vis='refim_point_withline.ms', imagename='test', imsize=512, cell='12.0arcsec', |
59 57 | specmode='cube', interpolation='nearest', nchan=5, start='1.0GHz', width='0.2GHz', |
60 58 | pblimit=-1e-05, deconvolver='hogbom', niter=500, cyclefactor=3, scales=[0, 3, 10] ): |
483 481 | # The order of the dicts into merge is important. |
484 482 | self.current_imdict.returndict = self.current_imdict.merge(tclean_ret, deconv_ret) |
485 483 | |
486 484 | # Append new return dict to global return dict |
487 485 | self.global_imdict.returndict = self.global_imdict.concat(self.global_imdict.returndict, self.current_imdict.returndict) |
488 486 | self._major_done = self.current_imdict.returndict['nmajordone'] |
489 487 | |
490 488 | ## Decrement count for the major cycle just done... |
491 489 | self.__decrement_counts() |
492 490 | |
493 - | else: |
494 - | print("NO DECONVOLUTION ITERATIONS because of zero mask. Skipped major cycle and return dictionary update.\n") |
491 + | #else: |
492 + | # print("NO DECONVOLUTION ITERATIONS because of zero mask. Skipped major cycle and return dictionary update.\n") |
495 493 | |
496 494 | |
497 495 | # Use global imdict for convergence check |
498 496 | if deconv_ret['stopcode'] == 7: ## Tell the convergence checker that the mask is zero and iterations were skipped |
499 497 | self.hasit, self.stopdescription = self.global_imdict.has_converged(self._niter, self._threshold, self._nmajor, masksum=0) |
500 498 | else: |
501 499 | self.hasit, self.stopdescription = self.global_imdict.has_converged(self._niter, self._threshold, self._nmajor) |
502 500 | |
503 501 | |
504 502 | self.global_imdict.returndict['stopcode'] = self.hasit |