* Username for the windows SHOC machine will be <code>'''shoc''<telescope>'''''</code>, password available from the resident astronomer
* Open the '''Andor SOLIS''' software and the '''TM4 GPS''' software
== SHOC Components ==
The SHOC instrument uses an Andor iXon camera, an Intelligent Reference TM-4 GPS unit, and a host PC which acts as a controller for the instrument. A filter wheel is usually used in conjunction with these. The host PC and GPS are installed in a crate which is mounted beneath the telescope. The filter wheel and camera are mounted beside this, in the light path. The software describing the various components is described below.
=== Filter Wheel ===
[[Filter_wheel_software]]
=== GPS Unit ===
==== Introduction ====
The GPS unit is used to provide accurate timing information to the camera. This is sent in the form of precisely times pulses, either one-shot or repeating. The software may be used to check the state of the GPS unit (and hence the quality of the time signals) and to program the start time, frequency and width of the pulses sent to the camera. As with the filter wheel software, the GPS software may be used in stand-alone mode ort as part of an integrated system, such as SHOC.
The GPS software may be accessed through a command line interface (CLI), though most users will prefer to control the GPS through the web-interface provided.
There also exists a version of the GPS software which is suitable for embedding in a scriptable interface.
==== Command Line Interface ====
This is the most basic menas of interacting with the GPS unit.
To start the CLI, double-click the <code>gps_cli</code> icon (in Windows), or in a bash shell, type <code>gps_cli.py</code> (Linux).
The CLI may be invoked with a number of options. The ''-h'' option presents
the user with a list of command line options, and explanations as to
their use.
To specify a non-default serial port for the GPS connection, use the <code>--serial <port></code>
command (e.g. <code>--serial /dev/ttyUSB2</code>).
To specify the log level, use <code>--log <level></code>, where <code><level></code> is one of <code>debug, info, warn, critical</code> or <code>error</code>.
To specify the logfile, use <code>--logfile <file></code>. If this option is not specified, the default is to use <code>gps_cli.log</code>.
From within the CLI, the user is presented with a number of options. The single character options are:
<cide>h</code> - Display the list of options
<code>s</code> - View the current GPS status
<code>q</code> - Exit the program
There are then a number of options, of the form <code>set <option></code>, which allow the user to set mask angle, user time bias, the timing mode used by the GPS, the location, and the programmable output pulse (POP).
Finally, there are get options of the form <code>get <option></code>, allowing the user to get the mask angle, user time bias, timing mode, geometric quality, timing status, oscillator tuning mode, alarm states, satellite information, and POP settings.
The programmable output pulse is the primary use of the GPS unit. The user may choose:
* a one-shot pulse, at a specified time and with a specified width, or
* a repeating pulse, starting at a specified time, with a specified interval and pulse width.
The date for the POP should be entered in the format MMDDYYYY, and the time in the format HHMMSS.SSSSSSS (the fractional time part may be specified to seven decimal places, although it's hard to imagine suuch accuracy being required!) Specifying a date/time combination in the past gives an error and does not change the POP settings on the unit. Also note that the GPS unit uses UTC, so the time specified should be in UTC.
==== Web Interface ====
The web interface is the primary means of interacting with the GPS unit. As with the filterwheel software, the control software and web server are started as a service (on Windows) or a daemon (on Unix) and the user should not need to start these. The web server provides a means of viewing the GPS status, and setting the Programmable Output Pulse (POP) parameters.
Pressing the "Receiver Status" button brings up a display of the status and signal strength for each of the twelve channels available.
The other indicators display:
* the timing status of the GPS (whether it is able to determine a valid time from the satellites in view),
* the oscillator status (whether the onboard oscillator has already reached minimum accuracy levels, and
* antenna alarm status (whether all antenna circuits are operating normally.
When setting the POP, the description for the input parameters in the CLI holds, but note that the web interface requires the input time to be in localtime (which is then converted to UTC before being sent to the GPS unit).
Once set, the POP indicator status changes to yellow (one-shot POP) or orange (repeating POP), indicating a pending pulse. Once the start time is reached the indicator status changes back to green (if the timing status is still valid), or red (if the timing status is not valid). If, while a repeating POP is active, the timing status becomes invalid, the indicator also becomes red. In either case, if the indicator status becomes red, the POP will need to be cancelled or reset.
A scheduled, running or failed pulse may be cancelled with the "Cancel" button, or the "Off" mode may be chosen (and saved).
====Diagnostic Interface====
As with the filter wheel, the diagnostic interface is invoked by starting the command line interface,
using the --diagnostic_mode flag. It automatically sets logging to the most
verbose level, and provides greater details on the data strings sent to and
received from the GPS.
There is also the ability to set various parameters which are not normally accessible in the CLI or web-based interface. These include the mask angle, user time bias, the timing mode used by the GPS, and the exact latitude, longitude and altitude.
====Scriptable interface====
To enable the GPS to be configured as part of a complex workflow, there is also a scriptable interface. This is similar to the scriptable interface presented by the filter wheel software.