Last modified on 18 November 2020, at 11:23

SiTech

Revision as of 11:23, 18 November 2020 by Hannah (Talk | contribs) (Stopping SiTech Software)

The SiTech software runs Lesedi on 1ms1 (="1-metre server 1", i.e. Lesedi's TCS PC). 1ms2 is Lesedi's backup machine. There is a main GUI for the telescope (SiTechExe.exe), a communications GUI (ServoSCommunicator.exe), a GUI for each rotator (SiTechRotatorTCP.exe and "SiTechRotatorTCP.exe left"), one for the secondary and tertiary mirrors (SiTechFocuserTCP.exe), one for the dome (DomeControlTCP.exe) and a GUI that communicates with each subsystem's software (ObservatoryControlSAAO.exe). All of these GUIs must be running for the telescope to function fully, and only one instance of each can be run at a time, else problems will arise.

Leave the SiTech software running at all times during normal operations. It is vital to ensure that no parameter is changed in any of these GUIs.

To prevent accidental interference, and to provide a streamlined user experience, a browser-based TCS has been developed for the user. It is intended that users will interact with the browser and not with SiTech. This page details engineering tasks and should not be available to general users.

Note that the SiTech software cannot control the mirror covers since we put them under PLC control. These must be operated from the browser TCS.

Starting SiTech software

The software should be opened on lesedi-nuc, by connecting by ssh to 1ms1 and running the software using the mono library. If working remotely from Cape Town, VNC to lesedi-nuc:

1. Open Remmina Remote Desktop Client, select "VNC" from the dropdown menu and double click on Lesedi_Nuc from the list of servers. Enter the password and the lesedi-nuc desktop will be displayed on the screen.

2. Look for an existing terminal on lesedi-nuc, else open a new one, and log in to 1ms1:

         ssh -Y observer@1ms1.suth.saao.ac.za  (you shouldn't need the full path from inside the network, just observer@1ms1) 

3. Check for existing instances of the software already running:

         ps aux | grep SiTech
         ps aux | grep Servo
         ps aux | grep Dome
         ps aux | grep Obs

4. If any existing jobs are listed and are not open on lesedi-nuc -- and you are sure they are not in use by someone working elsewhere -- kill them all (note that there will be two jobs each to kill for SiTechExe and ServoSCommunicator):

         sudo kill -9 xxxx    (where xxxx is the relevant process ID)

5.(a) All the SiTech software can be opened using a startup script in the home directory:

         sudo ./startup.sh

5.(b) or opened individually in the following order, putting each task in the background (the first two must use "sudo", and don't respond well to "&"):

         cd bin 
         sudo mono SiTechExe.exe  (always open this one first, and wait until the GUI has loaded and the message window has closed)
         CTRL-Z
         bg
         sudo mono ServoSCommunicator.exe   (always open this one second, and wait for the GUI to fully populate and values start updating)
         CTRL-Z
         bg
         mono DomeControlTCP.exe &
         mono SiTechRotatorTCP.exe left &
         mono SiTechRotatorTCP.exe &
         mono SiTechFocuserTCP.exe &
         mono ObservatoryControlSAAO.exe &  (always open this one last)

6. If you ever need to restart either ServoSCommunicator or SiTechExe, you will first need to close all the other subsystem GUIs, and reopen them in the order above.

7. If working in the dome, bundle all the GUIs onto the left-hand monitor (makes it easier to find them if someone needs to VNC from a smaller screen) then minimise them - they won't need to be accessed during the night unless something goes wrong. If working in Cape Town, you can close the VNC session with lesedi-nuc by clicking the right-hand "Disconnect" button on the Remmina tool bar.

Stopping SiTech Software

If one of the SiTech GUIs hangs or reports a comms error, the easiest fix is as follows:

  1. Close all GUIs in this order, using the x in the top left-hand corner of each:

i. ObservatoryControlSAAO.exe; ii. DomeControlTCP.exe, both left and right SiTechRotatorTCP.exe and SiTechFocuserTCP.exe in any order; iii. ServoSCommunicator.exe iv. SiTechExe.exe

Then follow the instructions on #Starting SiTech Software to restart.

Making a pointing model using SHOC

1. If operating remotely, close all SiTech software that might be running on lesedi-nuc, as it's too slow to do this exercise via VNC. Ssh -Y into 1ms1 from a machine in Cape Town.

2. Open all the usual SiTech software and ready the telescope for observing, then in /home/observer/bin open the programme that connects to SHOC and run astrometry:

    sudo mono SiTechCamera.exe
    sudo ./RunAstrometry

3. The SHOC browser should be closed, but there's no need to turn the camera off. In the SiTechCamera GUI, select the Latest Image tab, enter an exposure time and click "TakeImage". Check that the image loads (the image scaling can't be adjusted, so if you can't see any stars, make sure you're pointing at stars and tracking, the telescope is focused and that the exposure time is sensible for a 1m).

4. Make sure that SHOC's rotator is tracking, and on "Config Page 1" of the rotator GUI the boxes are ticked beside "Track PA" and "If PA is out of range, Track PA+-180". On the "Tertiary mirror" tab of the SiTech TCP Focuser GUI, ensure that the tertiary mirror is at the correct angle ("Current Position" = "Final Position (Right Fork)".

5. In SiTechExe GUI:
On Scope tab, click SkyView. In the window that opens, turn off most things in the Objects dropdown menu, but turn on calibration points and future calibration points. On Scope tab, right-click on the large, central "PointXP...Calpoints" button, and select "Yes" in the blue pop-up window that asks "Do you want to clear all PXP calibration points?". On Feature tab, click Run Script. Two windows open: Astrometry and Script.

6. In the Script window:
Select the Plate Solve Stuff tab, and enter the number of calibration points you want to include in the model (use 150 for a thorough model, or just 40 to get started. N.B it is possible to adjust the size of the zone of avoidance around the zenith (currently set to 5°) in SiTechExe/Config/Change Config!/Mount Params - "Cal Points Pole Distance (degs)), the exposure time (depends on sky conditions, but typically ≤8s), SHOC binning (1) and the delay between the telescope settling and the image being taken (7s is reasonable - note that the dome needs to settle in this time) and make sure "Wait for rotator" is ticked to stop the image being taken while the rotator is getting into position. Click "Make PointXP Run". The model will start gathering points with the telescope pointing South, so you can either rotate the dome to the South before running the script, or press "Play", then "Pause" while the dome catches up with the telescope - you can check the dome position in the "Dome" tab of the Dome Control GUI. This is the only time during the script that you would need to pause on account of the dome. Note that the way to resume the script is to click "Unpause", not "Play".

The script then moves the telescope from calibration point to calibration point in numerical order, taking an image with SHOC, using Astrometry.net to match the image to a catalogue, determining the position of the telescope, then moving on the telescope to the next point. Things to watch (lots!):

  • The Script window, Plate Solve Stuff tab gives a running commentary of events, showing how far it has progressed through the script displayed on the right-hand side, and what is happening (slewing, waiting, counting down the preset delay, saving image, etc).
  • The Astrometry window has a dialogue box showing whether it is currently idle or busy trying to match coordinates to an image. It then gives the results for each successful calibration (plate scale, rotation angle, number of extracted and matched stars, and how long it took to crunch). If the rotation angle is more that a few arcminutes, check that parallacting tracking is ticked on the rotator tab.
  • On Skyview: for each successful calibration, a yellow mark will appear inside each red (numbered) calibration point. Click "Refresh" periodically to keep the two aligned as time passes.
  • On SiTechExe: the central "PointXP" button keeps a count of the number of successful calibration points, and the RMS and Peak of the model as it builds.
  • The SiTechCamera GUI displays each image. If points are failing to calibrate, check whether there are stars in the images.

7. If an image fails to calibrate, you can return to that point when the script has finished running. Left click on the failed calibration point in the Skyview window. It'll create a pop up saying e.g. "This is future cal point #86" click on that, then in the blue pop up window that follow, click "GoTo". Click "Do a single photo-init" in Script window. It will take an image with the same camera parameters as were run in the script, unless you first e.g. adjust the exposure time, then click "Save PointXP Script Settings". If the image is solved successfully, a pop up window with a few options will appear - click on "Load cal star" then "OK".

8. To examine and edit the parameters of the resultant pointing model, left-click on the SiTechExe GUI "PointXP" button to open the PointXP window. Note that this does not update while the script is running, so you'll need to close and reopen the window to register new points. A typical pointing model for Lesedi has RMS≤2", Peak≤7". Points can be deleted by clicking on them in the display (deleted points turn red) or toggling "true" and "false" on the "CalPoints" tab, where you can also sort the list of points by e.g. error to match the points on the plot. Phi corresponds to azimuth, theta to altitude. The sensitivity parameter should be low, certainly <300.

9. Save the model by clicking "Save Text Calibration File" on the Main PXP tab of the PointXP6 window. The naming convention is YYYYMMDD_SHOC_Right_NorthUp_150points.PXP for a 150 point model made with SHOC on the right-hand rotator tracking the parallactic angle. If you intend to use the model, also save it as AutoLoadRight.PXP (overwrite existing file) so that it is loaded automatically when selecting the SHOC port. The model file selected for each port is set on the Tertiary Mirror tab of the SiTech TCP Focuser GUI (currently /usr/share/SiTech/SiTechExe/AutoLoadRight.PXP - if you change this, remember to click "SAVE Settings" on the Configuration tab).

10. Close the Script, PointXP6 and Astrometry windows, the SiTechCamera GUI and CTRL-C in the terminal to stop running the astrometry programme. If going back to normal operations, stop all SiTech software and reopen from lesedi-nuc.

Troubleshooting

1. If the web GUI is unresponsive for any reason or reporting errors, the first thing to try is to restart the server using the following command from the command line on observer@1ms1.suth.saao.ac.za:

sudo systemctl restart lesedi

Then reload the browser window.

2. If a subsystem (rotator, secondary/tertiary mirror, dome) loses comms with ServoSCommunicator, a (pinkish) red warning box will appear in that subsystem's GUI complaining of Bad Comms. The first fix to try is to click on the relevant warning box. If it doesn't clear, navigate to the appropriate subsystem's tab in the ServoSCommunicator GUI and reselect the port from the dropdown list. The ports are as follows:

  • Rotators: /dev/ttyUSBRot2
  • Secondary & tertiary mirrors: /dev/ttyUSBFoc3
  • Dome: /dev/ttyUSBDom4

The pink warning box will disappear from the relevant GUI if the problem is resolved.

3. The most common issue is loss of dome comms. There is a watchdog on the dome that causes it to close after five minutes of bad comms - sometimes the warning message does not appear before the dome automatically closes. This problem isn't usually solved using the fix above and ServoSCommunicator will need to be restarted. If the SiTech software was started using the script, you'll need to close all the GUIs and start again. Otherwise you can leave SiTechExe running (you'd probably want to do this if the dome hasn't yet closed, and you want the telescope to keep tracking while the instrument is exposing) and close everything else: first close ObservatoryControl, then the rotator, focuser and dome GUIs, then ServoSCommunicator, and restart in the order given in Step 5b.