def __init__(self): try: #This stuff is only for get the antennas of a manual array from Acspy.Clients.SimpleClient import PySimpleClient c = PySimpleClient() master = c.getComponent('CONTROL/MASTER') arrayname = master.getManualArrays() array = c.getComponent('CONTROL/'+arrayname[0]) self.antennalist = array.getAntennas() self.logger = getLogger() del master del array c.disconnect() except Exception, e: print e
def __init__(self, \ antennaName = None, \ componentName = None, \ stickyFlag = False): ''' The constructor creates a MountVertexLLama object or a group of MountVertexLLama objects. If the antennaName is defined then this constructor references the component running on that antenna. Alternativly the full componentName can be specified if desired. If antennaName or componentName are specified as list then a set of MountVertexLLama components are created. The MountVertexLLamaBase class is a python proxy to the MountVertexLLama component. The component can be running before creating this proxy but if it is not it will be started. The object reference is obtained using a call to getComponent (stickyFlag = True) or to getComponentNonSticky (stickyFlag = False, default). An exception is thrown if there is a problem creating this component, establishing the connection to the previously mentioned hardware components, or if either both or neither antennaName and componentName are specified. EXAMPLE: import CCL.MountVertexLLamaBase obj = CCL.MountVertexLLamaBase.MountVertexLLamaBase("DV01") or import CCL.MountVertexLLamaBase obj = CCL.MountVertexLLamaBase.MountVertexLLamaBase(["DV01", "DA41"]) ''' CCL.MountVertex.MountVertex.__init__(self, \ antennaName, componentName, stickyFlag) self.__logger = getLogger()
# # from CCL.Global import * from CCL.Source import * from CCL.SquareLawConfig import * from CCL.SpectralSpec import * import Control import ScanIntentMod import SubscanIntentMod # from optparse import OptionParser import sys from CCL.logging import getLogger #Set a List of planets or quasars: logger = getLogger() planetList = ["Saturn","Venus","Jupiter"] quasarList = [("12:56:11.1665","-05.47.21.524",'3c279'), ("03:19:48.16","41.30.42.1",'3c84'), ("22:53:57.75","16.08.53.5",' 3c454.3'), ("09:27:03.0139","39.02.20.851",' 0923+392')] parser = OptionParser() parser.add_option("-a","--array", type="str", dest="arrayName",help="The name of the Array to execute this on") (options, args) = parser.parse_args() if options.arrayName is None: logger.logCritical("You must specify an Array name use the -a option") sys.exit()