CommandDetector

pycertifspec.bluesky.CommandDetector #

[view_source]

CommandDetector Objects #

class CommandDetector()

[view_source]

__init__ #

 | __init__(client: SPECClient, name: str, start_command: str, poll_command: Optional[str] = None, evaluate_poll: Callable[[SpecMessage, str], bool] = lambda _, __: True)

[view_source]

Create a bluesky combatible detector backed by SPEC commands.

For each run, the response to all commands will be saved as metadata. In addition, it is possible to configure a description string which can be used to store, for example, the location of the data files for later reference.

Arguments:

  • client Client - An instance of the Client class
  • name str - Name for the detector to be used in bluesky
  • start_command str - SPEC command to start data aquisition
  • poll_command str - SPEC command to poll if detector is finished (If not set it is assumed detector finishes when start_command finishes)
  • evaluate_poll Callable[[SpecMessage, str], bool] - Function used to parse the response to the poll command (should return True when done). It will be given a SpecMessage object and the console print from the command.

configure #

 | configure(description: str)

[view_source]

Configure the description of the detector.

Arguments:

  • description str - The description