Control software for NKT Photonics SuperK EVO lasers
Note: There is a highly generic version of this code hosted on the main
branch. A SCExAO-specific version with plugins for our instrument status monitor is on the scexao
branch.
This software should work on all major platforms. To install, clone this repository and pip-install it however you like
$ pip install git+https://github.com/scexao-org/superk_control#egg=superk_control
SCExAO local: This code can be found in the ~/src/superk_control
folder on the SCExAO machines. It is hosted primarily on scexao2.
The superk
script is the entrypoint for all instrument control. The rest of the API can be found from the methods defined in the superk.py
class.
$ superk --help
Usage:
superk -h | --help
superk status
superk power [on | off]
superk flux [<value>]
superk filter [<pos>]
superk mode [<mode>]
superk interlock [reset | disable]
Options:
-h --help Print this message
Commands:
status Print detailed status message
power [on | off] Turn source on or off (case insensitive). If no option provided, returns the power status.
flux [<value>] Change the intensity value of the source (0 to 100). If no value provided, return current flux
filter [<pos>] (INACTIVE) Change the ND filter in the source
mode [<mode>] Change control mode between normal (0), external trigger (1) or external feedback (2). If no value provided return current mode
interlock Return interlock status
reset Try and reset interlock
disable Disable interlock (DANGEROUS)
This code can be tested on Mac and Linux platforms and will mock the serial interface so no hardware is required. First, set up the test dependencies
$ cd superk_control
$ pip install ".[test]"
then run the tests using pytest
$ python -m pytest
to see the line coverage, add the --cov
flag
$ python -m pytest --cov
If you are making changes to this code, please try to keep the generic version on main
updated. That means when you make a functional change that is not specific to SCExAO, you should implement the changes on main
and then rebase scexao
off main
.
You should install the development dependencies alongside the testing dependencies
$ cd superk_control
$ pip install -e ".[dev]"
Then, set up the pre-commit
$ pre-commit install