Skip to content

Commit

Permalink
remove startup mask manipulations (for tclean)
Browse files Browse the repository at this point in the history
  • Loading branch information
schiebel committed Jan 30, 2024
1 parent 8024473 commit dc22ff3
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions casagui/apps/_interactiveclean.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
###
Expand Down Expand Up @@ -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 ):
Expand Down

0 comments on commit dc22ff3

Please sign in to comment.