observe command

The observe command is executed from an AzCamConsole “blue” window.

Usage:

observe.start() to start the GUI. A new window will open.

GUI example after laoding script file.

GUI example after loading script file.

After starting the GUI, Press “Select Script” to find a script to load on disk. Then press “Load Script” to populate the table. The excute, press Run. You may Pause a script after the current command by pressing the Pause/Resume button. Then press the same button to resume the script. The “Abort Script” button will abort the script as soon as possible.

If you have troubles, close the blue AzCamConsole window and start again.

GUI Real-time Updates:

You may change a cell in the table to update values while a script is running. Click in the cell, make the change and press “Enter” (or click elsewhere).

Non-GUI Use:

It is still possible to run observe wihtout the GUI, although this mode is depricated. See the autogenerated documentation for help.

Examples:

observe.observe('/azcam/systems/90prime6/ObservingScripts/bass.txt',1) observe.move_telescope_during_readout=1

Parameters:

Parameters (listed at the end of the documentation below) may be changed from the command line as: observe.move_telescope_during_readout=1* or *observe.verbose=1.

Script Commands:

Always use double quotes (") when needed
Comment lines start with # or !
Status integers are start of a script line are ignored or incremented

Observe scripts commands:
obs        ExposureTime ImageType Title NumberExposures Filter RA DEC Epoch
stepfocus  RelativeNumberSteps
steptel    RA_ArcSecs Dec_ArcSecs
movetel    RA Dec Epoch
movefilter FilterName
delay      NumberSecs
quit       quit script

Example of a script:
obs 10.5 object "M31 field F" 1 u 00:36:00 40:30:00 2000.0 
obs 2.3 dark "a test dark" 2 u
stepfocus 50
delay 3.5
stepfocus -50
steptel 12.34 12.34
movetel 112940.40 +310030.0 2000.0
class Observe

Bases: PyQt4.QtGui.QMainWindow

The Observe class which implements observing scripts.

This class is instantiated as the observe object. Scripts may be run from a text file using .observe() or executed within loaded a GUI using .start().

abort_script()

Abort a running script as soon as possible.

cell_changed(item)

Called when a table cell is changed.

debug = None

True to NOT execute commands

edit_script()

Edit the select a script file.

et_scale = None

exposure time scale factor

execute_command(linenumber)

Execute one command.

Parameters

linenumber – Line number to execute, from command buffer.

help()

Print help on scripting commands.

highlight_row(row_number, flag)

Highlight or unhighlight a row of the GUI table during execution. Highlighting cannot occur in thread.

increment_status = None

True to increment status count if command in completed

initialize()

Initialize observe.

load_script()

Read script file and load into table.

log(message)

Log a message. :param message: string to be logged. :return: None

move_telescope_during_readout = None

True to move the telescope during camera readout

number_cycles = None

Number of times to run the script.

observe(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.

Parameters
  • script_file – full path name of script file.

  • number_cycles – Number of times to run the script.

Returns

None

out_file = None

output file showing executed commands

parse()

Parse current line set into self.commands dictionary. The script file must have already been read using read_file().

Returns

None

pause_script()

Pause a running script as soon as possible.

read_file(script_file='prompt')

Read an observing script file.

Parameters

script_file – full path name of script file. If ‘prompt’, then ask for filename.

Returns

None

run()

Execute the commands in the script command dictionary.

Returns

None

run_finished()

Called when the run thread is finished.

run_thread()

Start the script execution thread so that _abort_script may be used.

scale_exptime()

Scale the current exposure times.

script_file = None

filename of observing commands cript file

select_script()

Select a script file using dialog box.

start()

Show the GUI.

status(message)

Display text in status field.

stop()

Stop the GUI for the Observe class.

update_cell(command_number, parameter='', value='')

Update one parameter of an existing command.

Parameters
  • command_number – Number of command to be updated. If -1, return list of possible arguments.

  • parameter – Paramater name to be updated.

  • value – New value of parameter.

Returns

None

update_line(line_number, line)

Add or update a script line.

Parameters
  • line_number – Number of line to be updated or -1 to add at the end of the line buffer.

  • line – New string (line). If line is “”, then line_number is deleted.

Returns

None

update_table()

Update entire GUI table with current values of .commands.

verbose = None

True to print commands during run()

wait4highlight()

Wait for row to highlight.