azcam_observe.observe_cli.observe_cli module
Observe class
Notes: IPython config needs: c.InteractiveShellApp.gui = 'qt' c.InteractiveShellApp.pylab = 'qt'
Classes
class ObserveCli
The Observe class which implements observing scripts.
This class is instantiated as the observe tool. Scripts are run using observe.observe().
Ancestors (in MRO)
Methods
def execute_command(
self, linenumber)
Execute one command.
Args: linenumber: Line number to execute, from command buffer.
def help(
self)
Print help on scripting commands.
def initialize(
self)
Initialize observe.
def log(
self, message)
Log a message.
Args: message: string to be logged.
def observe(
self, script_file='prompt', number_cycles=1)
Execute a complete observing script. This code assumes that the filename, timing code, and binning have all been previously set. Creates a .out file with a status integer in front of commands executed.
:param script_file: full path name of script file. :param number_cycles: Number of times to run the script. :return: None
def parse(
self)
Parse current line set into self.commands dictionary. The script file must have already been read using read_file().
def read_file(
self, script_file)
Read an observing script file into the .lines list.
Args: script_file: full path name of script file.
def run(
self)
Execute the commands in the script command dictionary.