Skip to content

Python and RTS2 (Quick Scott Notes)

David Sand edited this page Feb 7, 2020 · 12 revisions

rts2solib Scripts

Much of the python code used with RTS2 can be found here. Locally you can find rts2solib on bigartn in the path:

/home/rts2obs/git-clones/rts2solib

They are executed in /etc/rts2/target Important RTS2 Scripts are:

  1. test-image
  2. focus script
  3. targetscript.py

The "Start Everything" script is also stored on the rts2solib repository. It starts RTS2 and the web interface. Currently it is run from gerard but may move one day soon.

Shell On bigartn

rts2-targetlist # list all RTS2 targets in DB
rts2-targetinfo <RTS2ID> # list info for target
rts2-queue # see what is in the queue currently

Start button of doom

There is a TK python GUI that contains the start night button and facilities to open the mirror cover and dome. You can find that source here

The RTS2 Web interface

The ARTN observer at the 61" uses a web based GUI to monitor and control RTS2. The source code for the webapp can be found here

Notes on relationship between rts2solib and AORP.

The main target database is housed on scopenet. You can access it via the ORP webpage. You can also push targets to the RTS2 queue running on kuiper. Pushing the target to RTS2 does two things:

  1. Tells RTS2 the RA and Dec of the Target
  2. Maps the ORP target database entry to the RTS2 database.

When RTS2 queue's up the object, The target script will grab the rts2_json column of the target row. This column has the filter info, number of exposures and length of integration.

The target script uses to rts2solib modules to talk to the RTS2 database and the ORP database. They are

  1. sotargets.py to talk to the RTS2 database. This is done VIA the rts2 API.
  2. orp_mappings.py to talk to the ORP database.

The ARTN focus script

ARTN users use the T.E Pickering focus module to automatically obtain focus. Users start a focus run from a button on the RTS2 web GUI. This act runs an RTS2 script. This script calls the the TE Pickering script using subprocess.

NOTE The TE Pickering script runs inside a conda environment which is separate from the rts2solib python environment. It would be good if these environments were merged.