Source
xxxxxxxxxx
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")
from __future__ import absolute_import
import os
import shutil
import re
#import pdb
from casatasks.private.casa_transition import is_CASA6
if is_CASA6:
from casatools import ctsys
from casatasks import concat, imregrid, immath, sdimaging, impbcor, simobserve, simanalyze, feather, casalog
from .simutil import *
from . import sdbeamutil
else:
from taskinit import *
from simutil import *
from simobserve import simobserve
from simanalyze import simanalyze
from feather import feather
from concat import concat
from imregrid import imregrid
from immath import immath
from impbcor import impbcor
from sdimaging import sdimaging
import sdbeamutil
from casa_stack_manip import stack_frame_find
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