5. PI_TCSP200Gui

This Plug-In takes care on the communications with the P200 Telescope Control System. When it is opened, it sends a request to the Server software to connect to the TCS.
After it is connected, it will send the requested commands and will print the received responses and information


5.1- Lower Part: commands

In this area the main commands (offset, focus and Zero) can be entered

Command: shows the command which is in progress. This area will blink when any command is in progress.
Response: here the response from the TCS will be shown. This includes any error message
log: checking this box will cause the Plug-In to log all the transactions
timeout: this control says the amount of time to wait for a response to complete. if "-1", means that the timeout applied is the default value, which is 90 secs

focus: the user can enter the requested focus value in the control box. By pressing the focus button the specified value will be sent to the TCS in a relative sense. These will be focus bumps not absolute moves. The green bar on the low can be used for entering the absolute value in a graphic way.
offset: by pressing this button the values of RA and DEC on the correspondent boxes will be sent to the TCS. The values are in arcseconds with East and North Positive, and West and South negative.
more commands: by pressing this button the window will expand, and will let the user send ANY available command to the TCS using a set of drop-down menus and a control for sending the string commands. This is normally not required, and for that reason is not being shown here

5.2- Upper area: status

TCS light: this light will be on when the connection to the TCS is up
timeout: will turn on when a timeut occurred for the last command sent
Error: will turn on when any error occurred sending the command
UT, focus, Coords: will normally show the current focus value, offset and UT time. This controls may be disabled for local observing
commands: Pressing this button will have opposite reactions, depending on the state of the Plug-In. If it is on the same state than the picture shown, then it will cause the lower part to collapse, leaving only the upper part (only the status). If only the status is shown, then pressing this button will cause the window to expand and the lower part to appear. This is basically for saving screen space if not tcs commands are being sent manually

5.3 Special Tools

This is a drop-down menu which will show all the specialized functions available. This functions are more specific TCS tasks which will be better performed in an automatic way

5.3.1 Dithering tool

By selecting "DITHERING" on the drop-down menu,  new window will be opened:


The dithering tool will allow to the user to perform automatically a series of objects by basically performing a set of offset-image pairs. The white area indicates the series of offset desired. The tool will go to the first
line, it will perform the offset to the telescope, and then it will take an image, according to all the parameters specified on the Camera GUI
Basically, what the tool does is to manipulate both the TCS Plug-In and the Camera GUI by filling the controls and pressing the buttons, in  exactly the same way that a human user would do , but automatically and much more efficiently
The upper display (which says READY on the picture) indicates the status of the task ("performing offset", or "taking image", etc.).

Offsets: shows the array of offsets to perform. This list can be directly edited on the tool by pressing the EDIT button, or can be LOADED from a file
Offset Type: indicates the type of offsets in the array.  This can be of two different classes:
                               Relative: indicates that every offset is relative to the PREVIOUS offset, so every offset is relative to the previous position
                               Absolute: indicates that every offset is relative to the STARTING position, so every offset describes an absolute position if you are standing on the starting point
Return to orig. position: if checked, the Telescope will be sent to the starting point when all the list of objects has finished
Repeats: number of times you want to repeat the whole list

The algorithm is as follows:

DO Repeats TIMES
    WHILE Offsets NotFinished
          DO OFFSET
          DO IMAGING
           Next on Offsets List

The tool will indicate the current object by  changing the correspondent  line to blue. The blue line will then keep moving line by line until the end of the list.

show: will show a graphical representation of the offsets to perform. It will show the current position (blinking), the positions already done (green points) the positions to be done (white) and the positions in which any
              error occurred (red)

load: you will be prompted for the location of the file to load. The file must be an ascii file with two columns per line. The first number will be interpreted as the RA position, and the second as the DEC position.
          Any following character on that line will be ignored. Any line starting with something different than a number will be skipped (so comments are allowed). A sample file would be:

#Ditherng file
10     20    This comment will be ignored
-10   -20
+20   0
this line will be skipped
0        0

save: you will be prompted for the name and location of the file to create. The current list on Offsets will be saved to the indicated file as an ascii file
Edit: Pressing this button  will open a new window in which you can edit the current list. You can insert/delete rows, modify values, etc. If you do this while the tool is running, your changes will take effect
           immediately after you accept the changes; this means that you don't need necessary to STOP  the dithering for making changes

STOP: Will cause to stop the dithering list. This means that it will finish the current object (offset/image) and then will stop before executing the next one. It then will NOT abort any current action.
GO: Will cause the action to start. The dithering will start from the place where the blue line is. As you can choose manually the position of the blue line by simply clicking on the desired position, you can start the dithering from any place. This means that, whether you are resuming a previously  stopped dithering or you are starting a new one, this buttons behaves always the same. It just start the action from the place where the blue line is (so it would be "resume" and/or "start")
QUIT: will close the tool. It this button is pressed when the tool is actually performing  a dithering, it will have the same behavior the the STOP button: it will wait until the current object is finished (offset/image) and then it will quit before starting the next one in the list. There is no way, then, of aborting actions from here.