labscript_utils.camera_server.CameraServer

class labscript_utils.camera_server.CameraServer(port)[source]

Bases: zprocess.clientserver.ZMQServer

__init__(port)[source]

Methods

__init__(port)

abort()

To be overridden by subclasses.

handler(request_data)

To be overridden by subclasses.

mainloop()

setup_auth(context)

Deprecated.

shutdown()

shutdown_on_interrupt()

timeout()

A function to call every self.timeout_interval seconds in the same thread as the handler.

transition_to_buffered(h5_filepath)

To be overridden by subclasses.

transition_to_static(h5_filepath)

To be overridden by subclasses.

abort()[source]

To be overridden by subclasses. Return cameras and any other state to one in which transition_to_buffered() can be called again. abort() will be called if there was an exception in either transition_to_buffered() or transtition_to_static(), and so should ideally be written to return things to a sensible state even if those methods did not complete. Like any cleanup function, abort() should proceed to further cleanups even if earlier cleanups fail. As such it should make liberal use of try: except: blocks, so that an exception in performing one cleanup operation does not stop it from proceeding to subsequent cleanup operations

handler(request_data)[source]

To be overridden by subclasses. This is an example implementation

transition_to_buffered(h5_filepath)[source]

To be overridden by subclasses. Do any preparatory processing before a shot, eg setting exposure times, readying cameras to receive triggers etc.

transition_to_static(h5_filepath)[source]

To be overridden by subclasses. Do any post processing after a shot, eg computing optical depth, fits, displaying images, saving images and results to the h5 file, returning cameras to an idle state.