##################### generated by xml-casa (v2) from hif_editimlist.xml ############
##################### 3cebb911ef7f19e412fbae4c7d7cccdc ##############################
from __future__ import absolute_import
from casashell.private.stack_manip import find_local as __sf__
from casashell.private.stack_manip import find_frame as _find_frame
from casatools.typecheck import validator as _pc
from casatools.coercetype import coerce as _coerce
from pipeline.hif.cli import hif_editimlist as _hif_editimlist_t
from collections import OrderedDict
import numpy
import sys
import os
import shutil
[docs]def static_var(varname, value):
def decorate(func):
setattr(func, varname, value)
return func
return decorate
class _hif_editimlist:
"""
hif_editimlist ---- Add to a list of images to be produced with hif_makeimages()
Add to a list of images to be produced with hif_makeimages(), which uses hif_tclean() to invoke CASA tclean.
Many of the hif_editimlist() inputs map directly to tclean parameters.
If pipeline mode is 'getinputs' then None is returned. Otherwise
the results object for the pipeline task is returned.
--------- parameter descriptions ---------------------------------------------
imagename Prefix for output image names.
search_radius_arcsec Size of the field finding beam search radius in arcsec.
cell Image X and Y cell size(s) with units or pixels per beam.
Single value same for both. \'<number>ppb\' for pixels per beam.
Compute cell size based on the UV coverage of all the fields
to be imaged and use a 5 pix per beam sampling.
The pix per beam specification uses the above default cell size
('5ppb') and scales it accordingly.
example: ['0.5arcsec', '0.5arcsec'] '3ppb'
cfcache Convolution function cache directory name
conjbeams Use conjugate frequency in tclean for wideband A-terms.
cyclefactor Controls the depth of clean in minor cycles based on PSF.
cycleniter Controls max number of minor cycle iterations in a single major cycle.
datacolumn Data column to image
deconvolver Minor cycle algorithm (multiscale or mtmfs)
editmode The edit mode of the task (e.g. add, edit). Defaults to 'add'.
field Set of data selection field names or ids.
imaging_mode Identity of product type (e.g. VLASS quick look) desired. This will determine the heuristics used.
imsize Image X and Y size(s) in pixels or PB level (single fields), \'\' for default. Single value same for both. \'<number>pb\' for PB level.
intent Set of data selection intents
gridder Name of the gridder to use with tclean
mask Used to declare whether to use a predefined mask for tclean.
nbin Channel binning factor.
nchan Number of channels, -1 = all
niter The max total number of minor cycle iterations allowed for tclean
nterms Number of Taylor coefficients in the spectral model
parameter_file keyword=value text file as alternative method of input parameters
pblimit PB gain level at which to cut off normalizations
phasecenter The default phase center is set to the mean of the field
directions of all fields that are to be image together.
example: 0, 'J2000 19h30m00 -40d00m00'
reffreq Reference frequency of the output image coordinate system
restfreq List of rest frequencies or a rest frequency in a string for output image.
robust Briggs robustness parameter for tclean
scales The scales for multi-scale imaging.
specmode Spectral gridding type (mfs, cont, cube, \'\' for default)
spw Set of data selection spectral window/channels, \'\' for all
start First channel for frequency mode images.
Starts at first input channel of the spw.
example: '22.3GHz'
stokes Stokes Planes to make
sensitivity
threshold Stopping threshold (number in units of Jy, or string)
nsigma Multiplicative factor for rms-based threshold stopping
uvtaper Used to set a uv-taper during clean.
uvrange Set of data selection uv ranges, \'\' for all.
width Channel width
pipelinemode The pipeline operating mode. In 'automatic' mode the pipeline
determines the values of all context defined pipeline inputs automatically.
In 'interactive' mode the user can set the pipeline context defined
parameters manually. In 'getinputs' mode the user can check the settings
of all pipeline parameters without running the task.
dryrun Run the task (False) or display the command(True)
acceptresults Add the results to the pipeline context
--------- examples -----------------------------------------------------------
"""
_info_group_ = """pipeline"""
_info_desc_ = """Add to a list of images to be produced with hif_makeimages()"""
__schema = {'imagename': {'type': 'cStr', 'coerce': _coerce.to_str}, 'search_radius_arcsec': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'cell': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'cfcache': {'type': 'cStr', 'coerce': _coerce.to_str}, 'conjbeams': {'type': 'cBool'}, 'cyclefactor': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'cycleniter': {'type': 'cInt'}, 'datacolumn': {'type': 'cStr', 'coerce': _coerce.to_str}, 'deconvolver': {'type': 'cStr', 'coerce': _coerce.to_str}, 'editmode': {'type': 'cStr', 'coerce': _coerce.to_str}, 'field': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'imaging_mode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'VLASS-QL', 'VLA', 'VLASS-SE-CUBE', 'VLASS-SE-CONT', 'ALMA', 'VLASS-SE-TAPER', '' ]}, 'imsize': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'intent': {'type': 'cStr', 'coerce': _coerce.to_str}, 'gridder': {'type': 'cStr', 'coerce': _coerce.to_str}, 'mask': {'type': 'cStr', 'coerce': _coerce.to_str}, 'nbin': {'type': 'cInt'}, 'nchan': {'type': 'cInt'}, 'niter': {'type': 'cInt'}, 'nterms': {'type': 'cInt'}, 'parameter_file': {'type': 'cStr', 'coerce': _coerce.to_str}, 'pblimit': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'phasecenter': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'reffreq': {'type': 'cStr', 'coerce': _coerce.to_str}, 'restfreq': {'type': 'cStr', 'coerce': _coerce.to_str}, 'robust': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'scales': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'specmode': {'type': 'cStr', 'coerce': _coerce.to_str}, 'spw': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cInt'}]}, 'start': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'stokes': {'type': 'cStr', 'coerce': _coerce.to_str}, 'sensitivity': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'threshold': {'type': 'cStr', 'coerce': _coerce.to_str}, 'nsigma': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'uvtaper': {'type': 'cStr', 'coerce': _coerce.to_str}, 'uvrange': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}]}, 'width': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
def __init__(self):
self.__stdout = None
self.__stderr = None
self.__root_frame_ = None
def __globals_(self):
if self.__root_frame_ is None:
self.__root_frame_ = _find_frame( )
assert self.__root_frame_ is not None, "could not find CASAshell global frame"
return self.__root_frame_
def __to_string_(self,value):
if type(value) is str:
return "'%s'" % value
else:
return str(value)
def __validate_(self,doc,schema):
return _pc.validate(doc,schema)
def __do_inp_output(self,param_prefix,description_str,formatting_chars):
out = self.__stdout or sys.stdout
description = description_str.split( )
prefix_width = 23 + 20 + 4
output = [ ]
addon = ''
first_addon = True
while len(description) > 0:
## starting a new line.....................................................................
if len(output) == 0:
## for first line add parameter information............................................
if len(param_prefix)-formatting_chars > prefix_width - 1:
output.append(param_prefix)
continue
addon = param_prefix + ' #'
first_addon = True
addon_formatting = formatting_chars
else:
## for subsequent lines space over prefix width........................................
addon = (' ' * prefix_width) + '#'
first_addon = False
addon_formatting = 0
## if first word of description puts us over the screen width, bail........................
if len(addon + description[0]) - addon_formatting + 1 > self.term_width:
## if we're doing the first line make sure it's output.................................
if first_addon: output.append(addon)
break
while len(description) > 0:
## if the next description word puts us over break for the next line...................
if len(addon + description[0]) - addon_formatting + 1 > self.term_width: break
addon = addon + ' ' + description[0]
description.pop(0)
output.append(addon)
out.write('\n'.join(output) + '\n')
#--------- return nonsubparam values ----------------------------------------------
def __nchan_dflt( self, glb ):
return int(-1)
def __nchan( self, glb ):
if 'nchan' in glb: return glb['nchan']
return int(-1)
def __phasecenter_dflt( self, glb ):
return ''
def __phasecenter( self, glb ):
if 'phasecenter' in glb: return glb['phasecenter']
return ''
def __cfcache_dflt( self, glb ):
return ''
def __cfcache( self, glb ):
if 'cfcache' in glb: return glb['cfcache']
return ''
def __nsigma_dflt( self, glb ):
return float(-999.0)
def __nsigma( self, glb ):
if 'nsigma' in glb: return glb['nsigma']
return float(-999.0)
def __imaging_mode_dflt( self, glb ):
return ''
def __imaging_mode( self, glb ):
if 'imaging_mode' in glb: return glb['imaging_mode']
return ''
def __datacolumn_dflt( self, glb ):
return ''
def __datacolumn( self, glb ):
if 'datacolumn' in glb: return glb['datacolumn']
return ''
def __spw_dflt( self, glb ):
return ''
def __spw( self, glb ):
if 'spw' in glb: return glb['spw']
return ''
def __nbin_dflt( self, glb ):
return int(-1)
def __nbin( self, glb ):
if 'nbin' in glb: return glb['nbin']
return int(-1)
def __cycleniter_dflt( self, glb ):
return int(-999)
def __cycleniter( self, glb ):
if 'cycleniter' in glb: return glb['cycleniter']
return int(-999)
def __dryrun_dflt( self, glb ):
return False
def __dryrun( self, glb ):
if 'dryrun' in glb: return glb['dryrun']
return False
def __scales_dflt( self, glb ):
return numpy.array( [ ] )
def __scales( self, glb ):
if 'scales' in glb: return glb['scales']
return numpy.array( [ ] )
def __width_dflt( self, glb ):
return ''
def __width( self, glb ):
if 'width' in glb: return glb['width']
return ''
def __threshold_dflt( self, glb ):
return ''
def __threshold( self, glb ):
if 'threshold' in glb: return glb['threshold']
return ''
def __cell_dflt( self, glb ):
return [ ]
def __cell( self, glb ):
if 'cell' in glb: return glb['cell']
return [ ]
def __restfreq_dflt( self, glb ):
return ''
def __restfreq( self, glb ):
if 'restfreq' in glb: return glb['restfreq']
return ''
def __uvrange_dflt( self, glb ):
return ''
def __uvrange( self, glb ):
if 'uvrange' in glb: return glb['uvrange']
return ''
def __niter_dflt( self, glb ):
return int(0)
def __niter( self, glb ):
if 'niter' in glb: return glb['niter']
return int(0)
def __sensitivity_dflt( self, glb ):
return float(0.0)
def __sensitivity( self, glb ):
if 'sensitivity' in glb: return glb['sensitivity']
return float(0.0)
def __cyclefactor_dflt( self, glb ):
return float(-999.0)
def __cyclefactor( self, glb ):
if 'cyclefactor' in glb: return glb['cyclefactor']
return float(-999.0)
def __mask_dflt( self, glb ):
return ''
def __mask( self, glb ):
if 'mask' in glb: return glb['mask']
return ''
def __deconvolver_dflt( self, glb ):
return ''
def __deconvolver( self, glb ):
if 'deconvolver' in glb: return glb['deconvolver']
return ''
def __editmode_dflt( self, glb ):
return ''
def __editmode( self, glb ):
if 'editmode' in glb: return glb['editmode']
return ''
def __pblimit_dflt( self, glb ):
return float(-999.0)
def __pblimit( self, glb ):
if 'pblimit' in glb: return glb['pblimit']
return float(-999.0)
def __intent_dflt( self, glb ):
return ''
def __intent( self, glb ):
if 'intent' in glb: return glb['intent']
return ''
def __stokes_dflt( self, glb ):
return ''
def __stokes( self, glb ):
if 'stokes' in glb: return glb['stokes']
return ''
def __parameter_file_dflt( self, glb ):
return ''
def __parameter_file( self, glb ):
if 'parameter_file' in glb: return glb['parameter_file']
return ''
def __imsize_dflt( self, glb ):
return numpy.array( [ ] )
def __imsize( self, glb ):
if 'imsize' in glb: return glb['imsize']
return numpy.array( [ ] )
def __search_radius_arcsec_dflt( self, glb ):
return float(1000.0)
def __search_radius_arcsec( self, glb ):
if 'search_radius_arcsec' in glb: return glb['search_radius_arcsec']
return float(1000.0)
def __pipelinemode_dflt( self, glb ):
return 'automatic'
def __pipelinemode( self, glb ):
if 'pipelinemode' in glb: return glb['pipelinemode']
return 'automatic'
def __field_dflt( self, glb ):
return [ ]
def __field( self, glb ):
if 'field' in glb: return glb['field']
return [ ]
def __nterms_dflt( self, glb ):
return int(0)
def __nterms( self, glb ):
if 'nterms' in glb: return glb['nterms']
return int(0)
def __reffreq_dflt( self, glb ):
return ''
def __reffreq( self, glb ):
if 'reffreq' in glb: return glb['reffreq']
return ''
def __uvtaper_dflt( self, glb ):
return ''
def __uvtaper( self, glb ):
if 'uvtaper' in glb: return glb['uvtaper']
return ''
def __imagename_dflt( self, glb ):
return ''
def __imagename( self, glb ):
if 'imagename' in glb: return glb['imagename']
return ''
def __specmode_dflt( self, glb ):
return ''
def __specmode( self, glb ):
if 'specmode' in glb: return glb['specmode']
return ''
def __robust_dflt( self, glb ):
return float(-999.0)
def __robust( self, glb ):
if 'robust' in glb: return glb['robust']
return float(-999.0)
def __gridder_dflt( self, glb ):
return ''
def __gridder( self, glb ):
if 'gridder' in glb: return glb['gridder']
return ''
def __conjbeams_dflt( self, glb ):
return False
def __conjbeams( self, glb ):
if 'conjbeams' in glb: return glb['conjbeams']
return False
def __start_dflt( self, glb ):
return ''
def __start( self, glb ):
if 'start' in glb: return glb['start']
return ''
def __acceptresults_dflt( self, glb ):
return True
def __acceptresults( self, glb ):
if 'acceptresults' in glb: return glb['acceptresults']
return True
#--------- return inp/go default --------------------------------------------------
#--------- return subparam values -------------------------------------------------
#--------- subparam inp output ----------------------------------------------------
def __imagename_inp(self):
description = 'Prefix for output image names.'
value = self.__imagename( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'imagename': value},{'imagename': self.__schema['imagename']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('imagename',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __search_radius_arcsec_inp(self):
description = 'Size of the field finding beam search radius in arcsec.'
value = self.__search_radius_arcsec( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'search_radius_arcsec': value},{'search_radius_arcsec': self.__schema['search_radius_arcsec']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('search_radius_arcsec',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __cell_inp(self):
description = 'Image X and Y cell size(s) with units or pixels per beam'
value = self.__cell( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'cell': value},{'cell': self.__schema['cell']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('cell',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __cfcache_inp(self):
description = 'Convolution function cache directory name'
value = self.__cfcache( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'cfcache': value},{'cfcache': self.__schema['cfcache']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('cfcache',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __conjbeams_inp(self):
description = 'Use conjugate frequency in tclean for wideband A-terms.'
value = self.__conjbeams( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'conjbeams': value},{'conjbeams': self.__schema['conjbeams']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('conjbeams',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __cyclefactor_inp(self):
description = 'Controls the depth of clean in minor cycles based on PSF.'
value = self.__cyclefactor( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'cyclefactor': value},{'cyclefactor': self.__schema['cyclefactor']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('cyclefactor',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __cycleniter_inp(self):
description = 'Controls max number of minor cycle iterations in a single major cycle.'
value = self.__cycleniter( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'cycleniter': value},{'cycleniter': self.__schema['cycleniter']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('cycleniter',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __datacolumn_inp(self):
description = 'Data column to image'
value = self.__datacolumn( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'datacolumn': value},{'datacolumn': self.__schema['datacolumn']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('datacolumn',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __deconvolver_inp(self):
description = 'Minor cycle algorithm (multiscale or mtmfs)'
value = self.__deconvolver( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'deconvolver': value},{'deconvolver': self.__schema['deconvolver']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('deconvolver',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __editmode_inp(self):
description = 'The edit mode of the task (e.g. add, edit). Defaults to \'add\'.'
value = self.__editmode( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'editmode': value},{'editmode': self.__schema['editmode']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('editmode',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __field_inp(self):
description = 'Set of data selection field names or ids.'
value = self.__field( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'field': value},{'field': self.__schema['field']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('field',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __imaging_mode_inp(self):
description = 'Identity of product type (e.g. VLASS quick look) desired. This will determine the heuristics used.'
value = self.__imaging_mode( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'imaging_mode': value},{'imaging_mode': self.__schema['imaging_mode']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('imaging_mode',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __imsize_inp(self):
description = 'Image X and Y size(s) in pixels or PB level (single fields), \'\' for default. Single value same for both. \'<number>pb\' for PB level.'
value = self.__imsize( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'imsize': value},{'imsize': self.__schema['imsize']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('imsize',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __intent_inp(self):
description = 'Set of data selection intents'
value = self.__intent( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'intent': value},{'intent': self.__schema['intent']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('intent',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __gridder_inp(self):
description = 'Name of the gridder to use with tclean'
value = self.__gridder( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'gridder': value},{'gridder': self.__schema['gridder']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('gridder',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __mask_inp(self):
description = 'Used to declare whether to use a predefined mask for tclean.'
value = self.__mask( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'mask': value},{'mask': self.__schema['mask']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('mask',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __nbin_inp(self):
description = 'Channel binning factor.'
value = self.__nbin( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'nbin': value},{'nbin': self.__schema['nbin']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('nbin',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __nchan_inp(self):
description = 'Number of channels, -1 = all'
value = self.__nchan( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'nchan': value},{'nchan': self.__schema['nchan']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('nchan',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __niter_inp(self):
description = 'The max total number of minor cycle iterations allowed for tclean'
value = self.__niter( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'niter': value},{'niter': self.__schema['niter']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('niter',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __nterms_inp(self):
description = 'Number of Taylor coefficients in the spectral model'
value = self.__nterms( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'nterms': value},{'nterms': self.__schema['nterms']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('nterms',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __parameter_file_inp(self):
description = 'keyword=value text file as alternative method of input parameters'
value = self.__parameter_file( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'parameter_file': value},{'parameter_file': self.__schema['parameter_file']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('parameter_file',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __pblimit_inp(self):
description = 'PB gain level at which to cut off normalizations'
value = self.__pblimit( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'pblimit': value},{'pblimit': self.__schema['pblimit']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('pblimit',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __phasecenter_inp(self):
description = 'Image center (direction or field index, \'\' for default)'
value = self.__phasecenter( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'phasecenter': value},{'phasecenter': self.__schema['phasecenter']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('phasecenter',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __reffreq_inp(self):
description = 'Reference frequency of the output image coordinate system'
value = self.__reffreq( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'reffreq': value},{'reffreq': self.__schema['reffreq']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('reffreq',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __restfreq_inp(self):
description = 'List of rest frequencies or a rest frequency in a string for output image.'
value = self.__restfreq( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'restfreq': value},{'restfreq': self.__schema['restfreq']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('restfreq',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __robust_inp(self):
description = 'Briggs robustness parameter for tclean'
value = self.__robust( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'robust': value},{'robust': self.__schema['robust']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('robust',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __scales_inp(self):
description = 'The scales for multi-scale imaging.'
value = self.__scales( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'scales': value},{'scales': self.__schema['scales']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('scales',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __specmode_inp(self):
description = 'Spectral gridding type (mfs, cont, cube, \'\' for default)'
value = self.__specmode( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'specmode': value},{'specmode': self.__schema['specmode']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('specmode',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __spw_inp(self):
description = 'Set of data selection spectral window/channels, \'\' for all'
value = self.__spw( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'spw': value},{'spw': self.__schema['spw']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('spw',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __start_inp(self):
description = 'First channel for frequency mode images.'
value = self.__start( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'start': value},{'start': self.__schema['start']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('start',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __stokes_inp(self):
description = 'Stokes Planes to make'
value = self.__stokes( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'stokes': value},{'stokes': self.__schema['stokes']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('stokes',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __sensitivity_inp(self):
description = ''
value = self.__sensitivity( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'sensitivity': value},{'sensitivity': self.__schema['sensitivity']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('sensitivity',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __threshold_inp(self):
description = 'Stopping threshold (number in units of Jy, or string)'
value = self.__threshold( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'threshold': value},{'threshold': self.__schema['threshold']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('threshold',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __nsigma_inp(self):
description = 'Multiplicative factor for rms-based threshold stopping'
value = self.__nsigma( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'nsigma': value},{'nsigma': self.__schema['nsigma']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('nsigma',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __uvtaper_inp(self):
description = 'Used to set a uv-taper during clean.'
value = self.__uvtaper( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'uvtaper': value},{'uvtaper': self.__schema['uvtaper']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('uvtaper',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __uvrange_inp(self):
description = 'Set of data selection uv ranges, \'\' for all.'
value = self.__uvrange( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'uvrange': value},{'uvrange': self.__schema['uvrange']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('uvrange',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __width_inp(self):
description = 'Channel width'
value = self.__width( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'width': value},{'width': self.__schema['width']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('width',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __pipelinemode_inp(self):
description = 'The pipeline operating mode. In \'automatic\' mode the pipeline determines the values of all context defined pipeline inputs automatically. In \'interactive\' mode the user can set the pipeline context defined parameters manually. In \'getinputs\' mode the user can check the settings of all pipeline parameters without running the task.'
value = self.__pipelinemode( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'pipelinemode': value},{'pipelinemode': self.__schema['pipelinemode']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('pipelinemode',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __dryrun_inp(self):
description = 'Run the task (False) or display the command(True)'
value = self.__dryrun( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'dryrun': value},{'dryrun': self.__schema['dryrun']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('dryrun',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
def __acceptresults_inp(self):
description = 'Add the results to the pipeline context'
value = self.__acceptresults( self.__globals_( ) )
(pre,post) = ('','') if self.__validate_({'acceptresults': value},{'acceptresults': self.__schema['acceptresults']}) else ('\x1B[91m','\x1B[0m')
self.__do_inp_output('%-20.20s = %s%-23s%s' % ('acceptresults',pre,self.__to_string_(value),post),description,0+len(pre)+len(post))
#--------- global default implementation-------------------------------------------
@static_var('state', __sf__('casa_inp_go_state'))
def set_global_defaults(self):
self.set_global_defaults.state['last'] = self
glb = self.__globals_( )
if 'sensitivity' in glb: del glb['sensitivity']
if 'parameter_file' in glb: del glb['parameter_file']
if 'stokes' in glb: del glb['stokes']
if 'deconvolver' in glb: del glb['deconvolver']
if 'dryrun' in glb: del glb['dryrun']
if 'mask' in glb: del glb['mask']
if 'editmode' in glb: del glb['editmode']
if 'field' in glb: del glb['field']
if 'pblimit' in glb: del glb['pblimit']
if 'pipelinemode' in glb: del glb['pipelinemode']
if 'datacolumn' in glb: del glb['datacolumn']
if 'intent' in glb: del glb['intent']
if 'search_radius_arcsec' in glb: del glb['search_radius_arcsec']
if 'nterms' in glb: del glb['nterms']
if 'nchan' in glb: del glb['nchan']
if 'reffreq' in glb: del glb['reffreq']
if 'conjbeams' in glb: del glb['conjbeams']
if 'gridder' in glb: del glb['gridder']
if 'cycleniter' in glb: del glb['cycleniter']
if 'imagename' in glb: del glb['imagename']
if 'imsize' in glb: del glb['imsize']
if 'acceptresults' in glb: del glb['acceptresults']
if 'imaging_mode' in glb: del glb['imaging_mode']
if 'specmode' in glb: del glb['specmode']
if 'uvtaper' in glb: del glb['uvtaper']
if 'nbin' in glb: del glb['nbin']
if 'cyclefactor' in glb: del glb['cyclefactor']
if 'restfreq' in glb: del glb['restfreq']
if 'scales' in glb: del glb['scales']
if 'robust' in glb: del glb['robust']
if 'threshold' in glb: del glb['threshold']
if 'niter' in glb: del glb['niter']
if 'cell' in glb: del glb['cell']
if 'uvrange' in glb: del glb['uvrange']
if 'phasecenter' in glb: del glb['phasecenter']
if 'start' in glb: del glb['start']
if 'width' in glb: del glb['width']
if 'spw' in glb: del glb['spw']
if 'nsigma' in glb: del glb['nsigma']
if 'cfcache' in glb: del glb['cfcache']
#--------- inp function -----------------------------------------------------------
def inp(self):
print("# hif_editimlist -- %s" % self._info_desc_)
self.term_width, self.term_height = shutil.get_terminal_size(fallback=(80, 24))
self.__imagename_inp( )
self.__search_radius_arcsec_inp( )
self.__cell_inp( )
self.__cfcache_inp( )
self.__conjbeams_inp( )
self.__cyclefactor_inp( )
self.__cycleniter_inp( )
self.__datacolumn_inp( )
self.__deconvolver_inp( )
self.__editmode_inp( )
self.__field_inp( )
self.__imaging_mode_inp( )
self.__imsize_inp( )
self.__intent_inp( )
self.__gridder_inp( )
self.__mask_inp( )
self.__nbin_inp( )
self.__nchan_inp( )
self.__niter_inp( )
self.__nterms_inp( )
self.__parameter_file_inp( )
self.__pblimit_inp( )
self.__phasecenter_inp( )
self.__reffreq_inp( )
self.__restfreq_inp( )
self.__robust_inp( )
self.__scales_inp( )
self.__specmode_inp( )
self.__spw_inp( )
self.__start_inp( )
self.__stokes_inp( )
self.__sensitivity_inp( )
self.__threshold_inp( )
self.__nsigma_inp( )
self.__uvtaper_inp( )
self.__uvrange_inp( )
self.__width_inp( )
self.__pipelinemode_inp( )
self.__dryrun_inp( )
self.__acceptresults_inp( )
#--------- tget function ----------------------------------------------------------
@static_var('state', __sf__('casa_inp_go_state'))
def tget(self,file=None):
from casashell.private.stack_manip import find_frame
from runpy import run_path
filename = None
if file is None:
if os.path.isfile("hif_editimlist.last"):
filename = "hif_editimlist.last"
elif isinstance(file, str):
if os.path.isfile(file):
filename = file
if filename is not None:
glob = find_frame( )
newglob = run_path( filename, init_globals={ } )
for i in newglob:
glob[i] = newglob[i]
self.tget.state['last'] = self
else:
print("could not find last file, setting defaults instead...")
self.set_global_defaults( )
def __call__( self, imagename=None, search_radius_arcsec=None, cell=None, cfcache=None, conjbeams=None, cyclefactor=None, cycleniter=None, datacolumn=None, deconvolver=None, editmode=None, field=None, imaging_mode=None, imsize=None, intent=None, gridder=None, mask=None, nbin=None, nchan=None, niter=None, nterms=None, parameter_file=None, pblimit=None, phasecenter=None, reffreq=None, restfreq=None, robust=None, scales=None, specmode=None, spw=None, start=None, stokes=None, sensitivity=None, threshold=None, nsigma=None, uvtaper=None, uvrange=None, width=None, pipelinemode=None, dryrun=None, acceptresults=None ):
def noobj(s):
if s.startswith('<') and s.endswith('>'):
return "None"
else:
return s
_prefile = os.path.realpath('hif_editimlist.pre')
_postfile = os.path.realpath('hif_editimlist.last')
_return_result_ = None
_arguments = [imagename,search_radius_arcsec,cell,cfcache,conjbeams,cyclefactor,cycleniter,datacolumn,deconvolver,editmode,field,imaging_mode,imsize,intent,gridder,mask,nbin,nchan,niter,nterms,parameter_file,pblimit,phasecenter,reffreq,restfreq,robust,scales,specmode,spw,start,stokes,sensitivity,threshold,nsigma,uvtaper,uvrange,width,pipelinemode,dryrun,acceptresults]
_invocation_parameters = OrderedDict( )
if any(map(lambda x: x is not None,_arguments)):
# invoke python style
# set the non sub-parameters that are not None
local_global = { }
if imagename is not None: local_global['imagename'] = imagename
if search_radius_arcsec is not None: local_global['search_radius_arcsec'] = search_radius_arcsec
if cell is not None: local_global['cell'] = cell
if cfcache is not None: local_global['cfcache'] = cfcache
if conjbeams is not None: local_global['conjbeams'] = conjbeams
if cyclefactor is not None: local_global['cyclefactor'] = cyclefactor
if cycleniter is not None: local_global['cycleniter'] = cycleniter
if datacolumn is not None: local_global['datacolumn'] = datacolumn
if deconvolver is not None: local_global['deconvolver'] = deconvolver
if editmode is not None: local_global['editmode'] = editmode
if field is not None: local_global['field'] = field
if imaging_mode is not None: local_global['imaging_mode'] = imaging_mode
if imsize is not None: local_global['imsize'] = imsize
if intent is not None: local_global['intent'] = intent
if gridder is not None: local_global['gridder'] = gridder
if mask is not None: local_global['mask'] = mask
if nbin is not None: local_global['nbin'] = nbin
if nchan is not None: local_global['nchan'] = nchan
if niter is not None: local_global['niter'] = niter
if nterms is not None: local_global['nterms'] = nterms
if parameter_file is not None: local_global['parameter_file'] = parameter_file
if pblimit is not None: local_global['pblimit'] = pblimit
if phasecenter is not None: local_global['phasecenter'] = phasecenter
if reffreq is not None: local_global['reffreq'] = reffreq
if restfreq is not None: local_global['restfreq'] = restfreq
if robust is not None: local_global['robust'] = robust
if scales is not None: local_global['scales'] = scales
if specmode is not None: local_global['specmode'] = specmode
if spw is not None: local_global['spw'] = spw
if start is not None: local_global['start'] = start
if stokes is not None: local_global['stokes'] = stokes
if sensitivity is not None: local_global['sensitivity'] = sensitivity
if threshold is not None: local_global['threshold'] = threshold
if nsigma is not None: local_global['nsigma'] = nsigma
if uvtaper is not None: local_global['uvtaper'] = uvtaper
if uvrange is not None: local_global['uvrange'] = uvrange
if width is not None: local_global['width'] = width
if pipelinemode is not None: local_global['pipelinemode'] = pipelinemode
if dryrun is not None: local_global['dryrun'] = dryrun
if acceptresults is not None: local_global['acceptresults'] = acceptresults
# the invocation parameters for the non-subparameters can now be set - this picks up those defaults
_invocation_parameters['imagename'] = self.__imagename( local_global )
_invocation_parameters['search_radius_arcsec'] = self.__search_radius_arcsec( local_global )
_invocation_parameters['cell'] = self.__cell( local_global )
_invocation_parameters['cfcache'] = self.__cfcache( local_global )
_invocation_parameters['conjbeams'] = self.__conjbeams( local_global )
_invocation_parameters['cyclefactor'] = self.__cyclefactor( local_global )
_invocation_parameters['cycleniter'] = self.__cycleniter( local_global )
_invocation_parameters['datacolumn'] = self.__datacolumn( local_global )
_invocation_parameters['deconvolver'] = self.__deconvolver( local_global )
_invocation_parameters['editmode'] = self.__editmode( local_global )
_invocation_parameters['field'] = self.__field( local_global )
_invocation_parameters['imaging_mode'] = self.__imaging_mode( local_global )
_invocation_parameters['imsize'] = self.__imsize( local_global )
_invocation_parameters['intent'] = self.__intent( local_global )
_invocation_parameters['gridder'] = self.__gridder( local_global )
_invocation_parameters['mask'] = self.__mask( local_global )
_invocation_parameters['nbin'] = self.__nbin( local_global )
_invocation_parameters['nchan'] = self.__nchan( local_global )
_invocation_parameters['niter'] = self.__niter( local_global )
_invocation_parameters['nterms'] = self.__nterms( local_global )
_invocation_parameters['parameter_file'] = self.__parameter_file( local_global )
_invocation_parameters['pblimit'] = self.__pblimit( local_global )
_invocation_parameters['phasecenter'] = self.__phasecenter( local_global )
_invocation_parameters['reffreq'] = self.__reffreq( local_global )
_invocation_parameters['restfreq'] = self.__restfreq( local_global )
_invocation_parameters['robust'] = self.__robust( local_global )
_invocation_parameters['scales'] = self.__scales( local_global )
_invocation_parameters['specmode'] = self.__specmode( local_global )
_invocation_parameters['spw'] = self.__spw( local_global )
_invocation_parameters['start'] = self.__start( local_global )
_invocation_parameters['stokes'] = self.__stokes( local_global )
_invocation_parameters['sensitivity'] = self.__sensitivity( local_global )
_invocation_parameters['threshold'] = self.__threshold( local_global )
_invocation_parameters['nsigma'] = self.__nsigma( local_global )
_invocation_parameters['uvtaper'] = self.__uvtaper( local_global )
_invocation_parameters['uvrange'] = self.__uvrange( local_global )
_invocation_parameters['width'] = self.__width( local_global )
_invocation_parameters['pipelinemode'] = self.__pipelinemode( local_global )
_invocation_parameters['dryrun'] = self.__dryrun( local_global )
_invocation_parameters['acceptresults'] = self.__acceptresults( local_global )
# the sub-parameters can then be set. Use the supplied value if not None, else the function, which gets the appropriate default
else:
# invoke with inp/go semantics
_invocation_parameters['imagename'] = self.__imagename( self.__globals_( ) )
_invocation_parameters['search_radius_arcsec'] = self.__search_radius_arcsec( self.__globals_( ) )
_invocation_parameters['cell'] = self.__cell( self.__globals_( ) )
_invocation_parameters['cfcache'] = self.__cfcache( self.__globals_( ) )
_invocation_parameters['conjbeams'] = self.__conjbeams( self.__globals_( ) )
_invocation_parameters['cyclefactor'] = self.__cyclefactor( self.__globals_( ) )
_invocation_parameters['cycleniter'] = self.__cycleniter( self.__globals_( ) )
_invocation_parameters['datacolumn'] = self.__datacolumn( self.__globals_( ) )
_invocation_parameters['deconvolver'] = self.__deconvolver( self.__globals_( ) )
_invocation_parameters['editmode'] = self.__editmode( self.__globals_( ) )
_invocation_parameters['field'] = self.__field( self.__globals_( ) )
_invocation_parameters['imaging_mode'] = self.__imaging_mode( self.__globals_( ) )
_invocation_parameters['imsize'] = self.__imsize( self.__globals_( ) )
_invocation_parameters['intent'] = self.__intent( self.__globals_( ) )
_invocation_parameters['gridder'] = self.__gridder( self.__globals_( ) )
_invocation_parameters['mask'] = self.__mask( self.__globals_( ) )
_invocation_parameters['nbin'] = self.__nbin( self.__globals_( ) )
_invocation_parameters['nchan'] = self.__nchan( self.__globals_( ) )
_invocation_parameters['niter'] = self.__niter( self.__globals_( ) )
_invocation_parameters['nterms'] = self.__nterms( self.__globals_( ) )
_invocation_parameters['parameter_file'] = self.__parameter_file( self.__globals_( ) )
_invocation_parameters['pblimit'] = self.__pblimit( self.__globals_( ) )
_invocation_parameters['phasecenter'] = self.__phasecenter( self.__globals_( ) )
_invocation_parameters['reffreq'] = self.__reffreq( self.__globals_( ) )
_invocation_parameters['restfreq'] = self.__restfreq( self.__globals_( ) )
_invocation_parameters['robust'] = self.__robust( self.__globals_( ) )
_invocation_parameters['scales'] = self.__scales( self.__globals_( ) )
_invocation_parameters['specmode'] = self.__specmode( self.__globals_( ) )
_invocation_parameters['spw'] = self.__spw( self.__globals_( ) )
_invocation_parameters['start'] = self.__start( self.__globals_( ) )
_invocation_parameters['stokes'] = self.__stokes( self.__globals_( ) )
_invocation_parameters['sensitivity'] = self.__sensitivity( self.__globals_( ) )
_invocation_parameters['threshold'] = self.__threshold( self.__globals_( ) )
_invocation_parameters['nsigma'] = self.__nsigma( self.__globals_( ) )
_invocation_parameters['uvtaper'] = self.__uvtaper( self.__globals_( ) )
_invocation_parameters['uvrange'] = self.__uvrange( self.__globals_( ) )
_invocation_parameters['width'] = self.__width( self.__globals_( ) )
_invocation_parameters['pipelinemode'] = self.__pipelinemode( self.__globals_( ) )
_invocation_parameters['dryrun'] = self.__dryrun( self.__globals_( ) )
_invocation_parameters['acceptresults'] = self.__acceptresults( self.__globals_( ) )
try:
with open(_prefile,'w') as _f:
for _i in _invocation_parameters:
_f.write("%-20s = %s\n" % (_i,noobj(repr(_invocation_parameters[_i]))))
_f.write("#hif_editimlist( ")
count = 0
for _i in _invocation_parameters:
_f.write("%s=%s" % (_i,noobj(repr(_invocation_parameters[_i]))))
count += 1
if count < len(_invocation_parameters): _f.write(",")
_f.write(" )\n")
except: pass
try:
_return_result_ = _hif_editimlist_t( _invocation_parameters['imagename'],_invocation_parameters['search_radius_arcsec'],_invocation_parameters['cell'],_invocation_parameters['cfcache'],_invocation_parameters['conjbeams'],_invocation_parameters['cyclefactor'],_invocation_parameters['cycleniter'],_invocation_parameters['datacolumn'],_invocation_parameters['deconvolver'],_invocation_parameters['editmode'],_invocation_parameters['field'],_invocation_parameters['imaging_mode'],_invocation_parameters['imsize'],_invocation_parameters['intent'],_invocation_parameters['gridder'],_invocation_parameters['mask'],_invocation_parameters['nbin'],_invocation_parameters['nchan'],_invocation_parameters['niter'],_invocation_parameters['nterms'],_invocation_parameters['parameter_file'],_invocation_parameters['pblimit'],_invocation_parameters['phasecenter'],_invocation_parameters['reffreq'],_invocation_parameters['restfreq'],_invocation_parameters['robust'],_invocation_parameters['scales'],_invocation_parameters['specmode'],_invocation_parameters['spw'],_invocation_parameters['start'],_invocation_parameters['stokes'],_invocation_parameters['sensitivity'],_invocation_parameters['threshold'],_invocation_parameters['nsigma'],_invocation_parameters['uvtaper'],_invocation_parameters['uvrange'],_invocation_parameters['width'],_invocation_parameters['pipelinemode'],_invocation_parameters['dryrun'],_invocation_parameters['acceptresults'] )
except Exception as e:
from traceback import format_exc
from casatasks import casalog
casalog.origin('hif_editimlist')
casalog.post("Exception Reported: Error in hif_editimlist: %s" % str(e),'SEVERE')
casalog.post(format_exc( ))
_return_result_ = False
try:
os.rename(_prefile,_postfile)
except: pass
return _return_result_
hif_editimlist = _hif_editimlist( )