TunableLaser Developer Guide

The CSC is a standard salobj CSC. The TunableLaser’s communication with the hardware is written in Python using the async TCP/IP library. The laser is connected to a terminal server. There is a UDev rule running on the computer that symlinks the serial port to /dev/laser for consistent access.

The modules are divided into ascii, component, csc and hardware. The ascii module deals with the TCP/IP communication of the software. The component provides abstraction for controlling the hardware. The csc implements the CSC. The hardware abstracts the hardware of the laser.

The laser is logically divided into hardware modules that each report and control a different aspect of the laser. Each module has a register that it can read and write, not every register is writable.

Docushare Collection

Dependencies

TunableLaser API

The content in this section is autogenerated from docstrings.

lsst.ts.tunablelaser Package

Functions

run_tunablelaser()

Run the TunableLaser CSC.

Classes

AsciiRegister(component, module_name, ...[, ...])

A representation of an Ascii register inside of a module of the laser.

CPU8000(component[, simulation_mode])

Implement the CPU8000 laser module which displays information about the primary CPU of the laser.

CompoWayFModule(csc[, terminator, encoding, ...])

Implement CompoWayF Module.

DelayLin(component, laser_id[, simulation_mode])

Implement DelayLin laser module.

E5DCB(component[, simulation_mode])

The Omron Temperature sensor for the laser.

HV40W(component, laser_id[, simulation_mode])

Implement HV40W laser module which contains voltage register.

LDCO48BP(component, laser_id[, simulation_mode])

A hardware module for the laser.

LLPMKU(component[, simulation_mode])

Implement the LLPMKU laser module which contains a register for power.

Laser(csc, terminator, encoding[, ...])

Implement common Laser interface.

LaserCSC([initial_state, config_dir, ...])

This is the class that implements the TunableLaser CSC.

MCPU800(component[, simulation_mode])

Implement the MCPU800 laser module which contains registers for controlling aspects of the propagation of the laser.

MLDCO48(component[, simulation_mode])

Implement MLDCO48 laser module which contains temperature registers.

MainLaser(csc[, simulation_mode, encoding, ...])

The class that implements the TunableLaser component.

MainLaserServer([port])

Simulates the TunableLaser.

MaxiOPG(component[, simulation_mode])

Implement the MaxiOPG laser module which contains registers for optical alignment and wavelength.

MidiOPG(component)

Implement the MidiOPG module which controls the wavelength register.

MiniOPG(component[, simulation_mode])

Implement the MiniOPG laser module.

MockMessage(msg)

Parse a command from the client.

MockNP5450()

Implements a mock NP5450 .

MockNT252()

Implement the mock NT252 device.

MockNT900()

Implements a mock NT900 laser.

Mode(value[, names, module, qualname, type, ...])

The different propagation modes of the laser.

OpticalConfiguration(value[, names, module, ...])

Configuration of the optical output

Output(value[, names, module, qualname, ...])

The output energy level.

Power(value[, names, module, qualname, ...])

The power states for the laser's propagation module.

StubbsLaser(csc[, terminator, encoding, ...])

Implement the Stubbs NT-252 laser.

StubbsLaserServer()

Implement Stubbs mock server.

TK6(component[, simulation_mode])

Implement TK6 laser module which contains several temperature registers.

TempCtrlServer([host, port])

Simulates the tcpip server for the temp ctrl.

TemperatureCtrl(csc[, host, port, ...])

Implement the Omron Temperature Controller.

Build and Test

Assuming that the develop-env docker container is running.

cd develop/ts_TunableLaser
setup -kr .
scons

An alternative

cd develop/ts_TunableLaser
pip install -e .[dev]
pre-commit install # install black hook
pytest --cov lsst.ts.tunablelaser -ra

Usage

The laser is connected via a terminal server. The CSC is started using the following python script located in the bin directory.

python run_tunable_laser.py

Simulator

There is a basic simulation mode included in the CSC. Returns basic information to the CSC.

Updating Firmware of the TunableLaser

  1. Ensure laser is powered on

  2. Plug laser into network switch

  3. Type ip address into browser

  4. Click upload firmware button on web page

  5. Follow prompted directions

Building the Documentation

package-docs clean && package-docs build

Contributing

Code and documentation contributions utilize pull-requests on github. Feature requests can be made by filing a Jira ticket with the TunableLaser label. In all cases, reaching out to the contacts for this CSC is recommended.