def __init__(self, opts, correlator=None):
        user_logger.info("Setting up telescope for observation")
        self.opts = opts

        # unpack user specified correlator setup values
        if correlator is not None:
            correlator_config = read_yaml(correlator)
            self.feng = correlator_config["Fengine"]
            self.xeng = correlator_config["Xengine"]
            self.beng = correlator_config["Bengine"]
        else:
            self.feng = self.xeng = self.beng = None
        # Check options and build KAT configuration,
        # connecting to proxies and devices
        # create single kat object, cannot repeatedly recreate
        self.array = verify_and_connect(opts)
Exemple #2
0
                  type="int",
                  default=2,
                  help="number of offset sources to scan (default=%default)")

# Set default value for any option (both standard and experiment-specific options)
parser.set_defaults(description='Radial holography scan', nd_params='off')
# Parse the command line
opts, args = parser.parse_args()

if len(args) == 0:
    raise ValueError(
        "Please specify at least one target argument via name ('Cygnus A'), "
        "description ('azel, 20, 30') or catalogue file name ('sources.csv')")

# Check basic command-line options and obtain a kat object connected to the appropriate system
with verify_and_connect(opts) as kat:
    targets = collect_targets(kat, args)

    # Initialise a capturing session (which typically opens an HDF5 file)
    with start_session(kat, **vars(opts)) as session:
        # Use the command-line options to set up the system
        session.standard_setup(**vars(opts))
        if not opts.no_delays and not kat.dry_run:
            if session.dbe.req.auto_delay('on'):
                user_logger.info("Turning on delay tracking.")
            else:
                user_logger.error('Unable to turn on delay tracking.')
        elif opts.no_delays and not kat.dry_run:
            if session.dbe.req.auto_delay('off'):
                user_logger.info("Turning off delay tracking.")
            else: