pycertifspec.bluesky.CommandDetector #
CommandDetector Objects #
class CommandDetector()
__init__ #
| __init__(client: SPECClient, name: str, start_command: str, poll_command: Optional[str] = None, evaluate_poll: Callable[[SpecMessage, str], bool] = lambda _, __: True)
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:
clientClient - An instance of the Client classnamestr - Name for the detector to be used in blueskystart_commandstr - SPEC command to start data aquisitionpoll_commandstr - SPEC command to poll if detector is finished (If not set it is assumed detector finishes when start_command finishes)evaluate_pollCallable[[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)
Configure the description of the detector.
Arguments:
descriptionstr - The description