From dc22ff3b5c8a0d2b0f3b0d19b739663fff863412 Mon Sep 17 00:00:00 2001 From: Darrell Schiebel Date: Tue, 30 Jan 2024 17:16:04 -0500 Subject: [PATCH] remove startup mask manipulations (for tclean) --- casagui/apps/_interactiveclean.py | 40 ------------------------------- 1 file changed, 40 deletions(-) diff --git a/casagui/apps/_interactiveclean.py b/casagui/apps/_interactiveclean.py index b1065b1..46ab006 100644 --- a/casagui/apps/_interactiveclean.py +++ b/casagui/apps/_interactiveclean.py @@ -252,39 +252,6 @@ def __init__( self, vis, imagename, usemask='user', mask='', initial_mask_pixel= self._color = { 'residual': 'black', 'flux': 'forestgreen' } - ### - ### Auto Masking et al. - self._usemask = 'user' - - ### - ### If the user has supplied a mask, do NOT modify it after initial tclean/deconvolve call... - ### otherwise if the 'initial_mask_pixel' is a boolean then initialize the mask pixels - ### to 'initial_mask_pixel' before loading the GUI... - ### - if type(initial_mask_pixel) is bool: - self._reset_mask_pixels = True - self._reset_mask_pixels_value = initial_mask_pixel - else: - self._reset_mask_pixels = False - self._reset_mask_pixels_value = None - - ### - ### set up masking mode based on 'usemask' and 'mask' - ### - if usemask == 'auto-multithresh': - self._usemask = 'auto-multithresh' - elif usemask == 'pb': - self._usemask = 'pb' - elif usemask == 'user': - if mask != '': - if isinstance( mask, str ) and os.path.isdir( mask ): - ### user has supplied a mask on disk - self._reset_mask_pixels = False - else: - raise RuntimeError( f'''user supplied mask does not exist or is not a directory: {mask}''' ) - else: - raise RuntimeError( f'''unrecognized mask type: {usemask}''' ) - ### ### clean generator ### @@ -1176,13 +1143,6 @@ def setup( self ): self.__reset( ) self._init_pipes() self._cube._init_pipes() - ### - ### The first time through, reinitialize the mask pixel values if the - ### user has not supplied a mask... - ### - if self._reset_mask_pixels: - self._reset_mask_pixels = False - self._cube.set_all_mask_pixels(self._reset_mask_pixels_value) @asynccontextmanager async def serve( self ):