Checks if the scan is complete ('stop' document exists) Parameters ---------- hdr : databroker.core.Header header of the run hdr = db[scan_id] The header must be reloaded each time before the function is called. Returns ------- True: scan is comple
(hdr)
| 510 | |
| 511 | |
| 512 | def _is_scan_complete(hdr): |
| 513 | """Checks if the scan is complete ('stop' document exists) |
| 514 | |
| 515 | Parameters |
| 516 | ---------- |
| 517 | |
| 518 | hdr : databroker.core.Header |
| 519 | header of the run |
| 520 | hdr = db[scan_id] |
| 521 | The header must be reloaded each time before the function is called. |
| 522 | |
| 523 | Returns |
| 524 | ------- |
| 525 | |
| 526 | True: scan is complete |
| 527 | False: scan is incomplete (still running) |
| 528 | """ |
| 529 | |
| 530 | # hdr.stop is an empty dictionary if the scan is incomplete |
| 531 | return bool(hdr.stop) |
| 532 | |
| 533 | |
| 534 | def _is_scan_successful(hdr): |
no outgoing calls
no test coverage detected