AvsSimulator¶
- class lsst.ts.fiberspectrograph.AvsSimulator¶
Bases:
objectMock a libavs Avantes spectrograph connection; mocks enough of the
AVS_*C free functions fromlibavs.0.2.0to 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:
- testCase
unittest.TestCase, optional A test to add a cleanup stage to, to stop the patcher.
- testCase
- Returns:
- mock
unittest.mock.Mock The newly created libavs mock.
- mock
- stop()¶
Disable the patched mock library.