casalog.post("Coefficient from %s for a -%.1fdB edge taper and obscuration ratio=%g/%g = %.3f*lambda/D" % (formula, taper, obscuration, diameter, b))
from __future__ import absolute_import
from numpy import sqrt, cos, sin
import scipy.special as spspec
from scipy import optimize
from casatasks.private.casa_transition import is_CASA6
from casatools import quanta
from casatasks import casalog
from taskinit import casalog, qatool
The class to derive the theoretical beam size of an image.
bu = sdbeamutil.TheoreticalBeam()
# set imaging, antenna, and pointing informations
bu.set_antenna('12m',blockage='0.75m',taper=10)
bu.set_sampling(['12arcsec','12arcsec'])
bu.set_image_param('5arcsec', '115GHz','SF', 6, -1, -1, -1)
# print summary of setup to logger
# get theoretical beam size of an image.
beam = bu.get_beamsize_image()
self.is_antenna_set = False
self.is_kernel_set = False
self.is_sampling_set = False
self.antenna_diam_m = -1.
self.antenna_block_m = 0.0
self.sampling_arcsec = []
def __to_arcsec_list(self, angle):
"""return a list of angles in arcsec (value only without unit)"""
if type(angle) not in [list, tuple, np.ndarray]:
return [self.__to_arcsec(val) for val in angle]
def __to_arcsec(self, angle):
"""convert angle to arcsec and return the value without unit."""
return my_qa.getvalue(my_qa.convert(angle, "arcsec"))[0]
elif my_qa.getunit(angle)=='': return float(angle)