Callbacks (includes File Writers)#

Callbacks#

Document Collector#

DocumentCollectorCallback()

Bluesky callback to collect all documents from most-recent plan

document_contents_callback(key, doc)

prints document contents -- use for diagnosing a document stream

class apstools.callbacks.doc_collector.DocumentCollectorCallback[source]#

Bluesky callback to collect all documents from most-recent plan

Will reset when it receives a start document.

EXAMPLE:

from apstools.callbacks import DocumentCollectorCallback
doc_collector = DocumentCollectorCallback()
RE.subscribe(doc_collector.receiver)
...
RE(some_plan())
print(doc_collector.uids)
print(doc_collector.documents["stop"])
receiver(key, document)[source]#

keep all documents from recent plan in memory

apstools.callbacks.doc_collector.document_contents_callback(key, doc)[source]#

prints document contents – use for diagnosing a document stream

File Writers#

See the File Writers section.