User Tools

Site Tools


software

Software

Overview

Overall software design is to control all components from a main server computer, song1m, located in the main computer room, running Linux. This communicates with telescope/camera computer, pwi1m, and the dome computer, dome1m via network communication; this is extendable to additional devices on additional computers. The preferred communication protocol is ASCOM/Alpaca, but other network communication can be used for additional functionality as needed.

Of course, devices can also be controlled locally from the computer to which they are attached, and this is useful for lower level functionality, debugging, etc.

Remote software

Software is implemented so that all devices can be controlled from a single command-line program running on a separate computer, using software in the APOsong repository (github.com/holtzmanjon/APOsong). Given that all of the devices are on the internal APO network, the main control computer, song1m, is located on this network, and remote operation can be done using VNC with an openVPN or tunneling connection. On song1m, the software environment is set up for the song user.

The control software is run from a Python environment; APOsong provides commands to control telescope, dome, camera etc., but you can also use all regular Python functionality, providing for a powerful environment. Within the APOsong software, interactive image display is enabled using the pyvista display tool and built-in, e.g. for the expose() command, but of course any other Python packages can be used interactively.

To access the software:

from aposong import *

You can get a quick listing of commands using

commands()

and you can use help(command) or command? to see the docstrings.

Documentation is also available at http://aposong.readthedocs.io

Robotic software

pwi1m

pwi1m runs Windows. For normal operation, two things must be running:

  • the PWI4 software to control the telescope
  • ASCOM remote to make the telescope, focuser, mirror covers and camera / filter wheel accessible
  • for the eShel spectrograph, python must be running the eshel.remote() loop, which accepts commands over a socket to send to the eShel calibration unit, controlling mirror and lamps via a USB/serial connection.

Planewave software

On pwi1m, telescope is controlled through the PWI4 software. This also has the capability to control an ASCOM camera, necessary when using PWI4 to construct a pointing model.

On starting PWI4, devices are controlled from the left panel, which has five tabs: Mount/Focus/Rotate/M3/Temp. You connect to the telescope using the Connect button on the Mount tab, and you can enable/disable the azimuth and altitude motors. On the Focus tab, you connect to the focuser and enable/disable it, and on the Rotate tab, you connect and enable/disable the rotator. On the Temp tab, you connect the OTA, which allows you to get temperature monitoring, control fans, etc. The M3 tab is used to position the tertiary to the Nasmyth ports: Port 1 is the port with the rotator and focuser.

You can slew the telescope using the SkyViewer tab: click on the desired location, then confirm with Goto button. You can also just enter coordinates directly on the Goto tab. Tracking should be started after the slew. You can monitor the tracking performance with the Tracking tab. Temperatures can be viewed on the Temperature tab. Finally, a camera can be controlled through the Camera tab; you need to select the camera (ASCOM or MaximDL), and then connect to it.

Focus
Pointing model

ASCOM remote

ASCOME remote must be installed and configured to see all of the ASCOM devices. This is achieved through the Setup button. Simply choose the type of device and select the correct driver.

Dome software

Dome control is implemented through software running on a Raspberry Pi, dome1m.

Low-level functions are implemented in the APOAshDome.py module. An ASCOM Alpaca interface was implemented using the templates from the AlpycaDevice package. Software is archived at https://github.com/holtzmanjon/APOAshDome.

APOAshDome controls dome shutter and rotation through relays, reads dome position through an encoder, and also reads dome home switch. For the encoder, the pulses are read using the pigpiod daemon, so that must be installed and started every time the computer is rebooted:

sudo pigpiod -s 10

This has been implemented in /etc/rc.local on dome1m

The dome software can be run locally from a python interface: from APOAshdome/device, start python and import APOAshdome. A Dome object can be instantiated through which properties and methods can be accessed:

import APOAshDome
D = APOAshDome.Dome()
...

For documentation of the methods, see http://APOAshDome.readthedocs.io

To start the Alpaca device after a reboot:

cd APOAshdome/device 
python app.py

Windows installations

Install Windows 11 from NMSU USB. Account SONG

Install TigerVNC 64-1.13.1 and TigerVNC-winvnc-1.13.1

Install ASCOM 6.6SP2 (installs .NET 3.5) Install ASCOM Remote 6.7.1 Install Anaconda3

OpenVPN? Cisco AnyConnect? git for Windows

modify timezone, location, display setting (for remote VNC), firewall as needed (for ASCOM Remote and TigerVNC), power settings (don't let computer go to sleep)

For spectrograph camera computer:

 QHY AllInOne StableVer.20220817
 pywinusb to control USB relay
 visual studio C++ for alpyca install to run watchdog
 pip install yoctopuce for thermocouple

For telescope computer:

Camera drivers: 
   Atik drivers
   QSI drivers?
Telescope software:
   Planewave PWI4
   PWTools ?
 
eShel software:
   pip install pyserial
   Keyspan 19H USB-to-serial
   
TC300
   pip install pyserial
   
Thorlabs LTS Stage
   pip install pythonnet
software.txt · Last modified: 2024/05/10 02:33 by holtz