Callbacks (includes File Writers)
Callbacks
Document Collector
Bluesky callback to collect all documents from most-recent plan |
|
|
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"])
Snapshot Report
|
Show the data from a |
- class apstools.callbacks.snapshot_report.SnapshotReport(*args: Any, **kwargs: Any)[source]
Show the data from a
apstools.plans.snapshot()
.Find most recent snapshot between certain dates:
headers = db(plan_name="snapshot", since="2018-12-15", until="2018-12-21") h = list(headers)[0] # pick the first one, it's the most recent apstools.callbacks.SnapshotReport().print_report(h)
Use as callback to a snapshot plan:
RE( apstools.plans.snapshot(ophyd_objects_list), apstools.callbacks.SnapshotReport() )
File Writers
See the File Writers section.