## Edit the USER SET INPUTS section below and then execute ## this script (note it must be in the 'calibrated/working' directory. import glob as glob __rethrow_casa_exceptions = True pipelinemode='automatic' context = h_init() ########################################################### ## USER SET INPUTS ## Select a title for the weblog context.project_summary.proposal_code='NEW AGGREGATE CONT' ## Delete uid*_target.ms and flagversions if it exists os.system('rm -rf uid*_target.ms') os.system('rm -rf uid*_target.ms.flagversions') ## Select subset of sources to image by field name. ## To select all fields, set MyFields='' MyFields='520412' ## Select Briggs Robust factor for data weighting (affects angular ## resolution of images) MyRobust=0.0 ############################################################ ## Move cont.dat to another name if it exists os.system('mv cont.dat original.cont.dat') ## Make a list of all uv-datasets appended with *.ms MyVis=glob.glob('*.ms') try: ## Load the *.ms files into the pipeline hifa_importdata(vis=MyVis,dbservice=False,pipelinemode=pipelinemode) ## Split off the science target data into its own ms (called ## *target.ms) and apply science target specific flags hif_mstransform(pipelinemode=pipelinemode) hifa_flagtargets(pipelinemode=pipelinemode) ## calculate the synthesized beam and estimate the sensitivity ## for the aggregate bandwidth and representative bandwidth ## for three values of the robust parameter. hifa_imageprecheck(pipelinemode="automatic") ## check the imaging product size and adjust the relevent ## imaging parameters (channel binning, cell size and image size) ## User can comment this out if they don't want size mitigation. hif_checkproductsize(maxproductsize=350.0, maxcubesize=40.0, maxcubelimit=60.0) ## Skip the continuum subtraction steps and make an aggregate ## continuum image with all unflagged channels (file named ## cont.dat should NOT be present in directory). hif_makeimlist(specmode='cont',field=MyFields,robust=MyRobust,pipelinemode=pipelinemode) hif_makeimages(pipelinemode=pipelinemode) ## Export new images to fits format if desired. hifa_exportdata(pipelinemode=pipelinemode) finally: h_save()