AvsSimulator

class lsst.ts.fiberspectrograph.AvsSimulator

Bases: object

Mock a libavs Avantes spectrograph connection; mocks enough of the AVS_* C free functions from libavs.0.2.0 to allow connecting and disconnecting, getting status, and starting/stopping exposures.

This configures the mock for a “no error conditions” use case, with all methods behaving as if one device is connected and behaving.

Methods Summary

start([testCase])

Start the simulator by patching the spectrograph library.

stop()

Disable the patched mock library.

Methods Documentation

start(testCase=None)

Start the simulator by patching the spectrograph library.

If the patch has already been started, just return the running mock.

Parameters:
testCaseunittest.TestCase, optional

A test to add a cleanup stage to, to stop the patcher.

Returns:
mockunittest.mock.Mock

The newly created libavs mock.

stop()

Disable the patched mock library.