# This is a simple task which converts an existing image into a point # source model image, then runs ft to fill the model data column in # the desired MS, if requested. import os from taskinit import * from ft_cli import ft_cli as ft def mkmodelimage(imagein = None, imageout = None, xcoord = None, ycoord = None, fluxval = None, doft = None, vis = None): casalog.origin('mkmodelimage') # Copy the input image to the output image name os.system('cp -rp '+imagein+' '+imageout) ia.open(imageout) data=ia.getchunk() data[:, :, 0, 0] = data[:, :, 0, 0]*0 # for i in range(0, len(xcoord)): data[xcoord, ycoord, 0, 0] = fluxval ia.putchunk(data) ia.close() if doft: ft(vis, model=imageout)