Example #1
0
def image_setup(script,parameters, comments, template):
    """write the imaging control parameters portion of the script"""
    weights = "weighting = 'briggs'\nrobust=0.5\nniter=1000\nthreshold = '0.0mJy'\n"

    if len(parameters['scifields']) == 1:
        field = "field = '" + parameters['scifield0'] + "'\n"
    else:
        print 'WARNING: This is not designated as a mosaic but there are multiple science fields. Check the script carefully!'
        field = "field = '" + parameters['scifields'] + "' #WARNING: This is not designated as a mosaic but there are multiple science fields. You may need to image them separately\n"
    if parameters['mosaic'] == 'true':
        imgmode = "imagermode='mosaic'\n"
	phasec = "phasecenter='" + parameters['phasecenter'] +"'\n" 
        imgmode = imgmode + phasec
        field = "field = '" + parameters['scifield0'] + "~" + parameters['scifield1']+ "'\n"
    else:
	imgmode = "imagermode='csclean'\n"
    #print parameters['mosaic'], parameters['scifields'], field
    cell = "cell='" + parameters['cellsize'] + "'\n" # cell size for imaging.
    #imsize = 'imsize =' + '[' + parameters['imsize'] + ',' + parameters['imsize'] + '] \n'
    imsize = 'imsize =' + parameters['imsize'] + '\n'

    if comments == False:
       script = script + com.source_param_header() + field + imgmode + cell + imsize + weights
    else:
       script = script + com.source_param() + field + imgmode+ com.cellcalc() + cell + imsize + com.imcontrol() + weights
  
    return script
def image_setup(script,parameters, comments):
    weights = "weighting = 'briggs'\nrobust=0.5\nniter=1000\nthreshold = '0.0mJy'\n"

    if len(parameters['scifields']) == 1:
        field = "field = '" + parameters['scifield0'] + "'\n"
    else:
        field = "field = '" + parameters['scifields'] + "'\n"
    if parameters['mosaic'] == 'true':
        imgmode = "imagermode='mosaic'\n"
	phasec = "phasecenter='" + parameters['phasecenter'] +"'\n" 
        imgmode = imgmode + phasec
        field = "field = '" + parameters['scifield0'] + "~" + parameters['scifield1']+ "'\n"
    else:
	imgmode = "imagermode='csclean'\n"

    cell = "cell='" + parameters['cellsize'] + "'\n" # cell size for imaging.
    imsize = 'imsize =' + '[' + parameters['imsize'] + ',' + parameters['imsize'] + '] \n'

    if comments == False:
         script = script + com.source_param_header() + field + imgmode + cell + imsize + weights
    else:
       script = script + com.source_param() + field + imgmode+ com.cellcalc() + cell + imsize + com.imcontrol() + weights
  
    return script