MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / _is_scan_complete

Function _is_scan_complete

pyxrf/model/load_data_from_db.py:512–531  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

510
511
512def _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
534def _is_scan_successful(hdr):

Callers 7

map_data2D_hxnFunction · 0.85
map_data2D_srx_oldFunction · 0.85
map_data2D_srx_newFunction · 0.85
map_data2D_srx_new_tiledFunction · 0.85
map_data2D_tes_tiledFunction · 0.85
map_data2D_xfmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected