Source
msg(" WARNING: For TP imaging, skymodel should be larger than 2.5*primary beam. Your skymodel: %.3f arcsec < %.3f arcsec: 2.5*primary beam" % (minsize, 2.5*PB12sec),priority="warn")
import os
import shutil
import re
#import pdb
from casatools import ctsys
from casatasks import concat, imregrid, immath, sdimaging, impbcor, simobserve, simanalyze, feather, casalog
from .simutil import *
from . import sdbeamutil
def simalma(
project=None,
dryrun=None,
skymodel=None, inbright=None, indirection=None, incell=None,
incenter=None, inwidth=None,
complist=None, compwidth=None,
########
setpointings=None,
ptgfile=None,
integration=None, direction=None, mapsize=None,
antennalist=None,
hourangle=None,
totaltime=None,
###
tpnant = None,
tptime = None,
###
pwv=None,
image=None,
imsize=None, imdirection=None,cell=None,
niter=None, threshold=None,
graphics=None,
verbose=None,
overwrite=None
):
# Collect a list of parameter values to save inputs
in_params = locals()
#-------------------------
# Create the utility object
myutil = simutil(direction)
if verbose: myutil.verbose = True
msg = myutil.msg
try:
###########################
# preliminaries
###########################
# Predefined parameters
pbcoeff = 1.13 ## PB defined as pbcoeff*lambda/d
nyquist = 0.5/1.13 ## Nyquist spacing = PB*nyquist
maptype_int = 'ALMA'
maptype_tp = 'square'
# time ratios for 12extended, 12compact,7m, and TP:
default_timeratio = [1,0.5,2,4]
# pbgridratio_tp = 0.25 # -> would be gridratio_tp = 1/3.4
# the grid spacing is defined in terms of lambda/d times these factors
# ALMA OT uses lambda/d/sqrt(3)
gridratio_int = 1./pl.sqrt(3) # 0.5 is nyquist
gridratio_tp = 1./3
# number of 12m primary beams to pad the total power image during
# the gridding stage (i.e. even larger pad than the padding
# added for the observation).
tppad_npb = 2.
# weight of 7m data relative to 12m data
weightratio_7_12 = 0.34
# the scale factor to correct expected Gauss PB size to empirical simPB
simpb_factor = 0.96
caldirection = ""
calflux = "0Jy"
tpantid = 0
t_ground = 270.
if pwv > 0:
thermalnoise = "tsys-atm"
else:
thermalnoise = ""
leakage = 0.
weighting = "briggs"
antlist_tp_default="aca.tp.cfg"
#----------------------------------------