BCDA-APS / bluesky_training

Bluesky training, including instrument package
https://bcda-aps.github.io/bluesky_training/
Other
11 stars 0 forks source link

Bluesky_RunEngine_md default path #86

Closed rodolakis closed 1 year ago

rodolakis commented 1 year ago

Bluesky creates a Bluesky_RunEngine_md directory in Home directory at startup. Let user choose location of directory.

rodolakis commented 1 year ago

In iconfig.yml add:

RUNENGINE_MD_PATH: /home/beams/RODOLAKIS/data/RE_md

In instrument/framework/initialize.py replace

https://github.com/BCDA-APS/bluesky_training/blob/c52bd6b175e34e9c8ad938598e3c4613e80485de/bluesky/instrument/framework/initialize.py#L44-L66

with:

def get_md_path():
    return str(pathlib.Path(iconfig["RUNENGINE_MD_PATH"]))

# Set up a RunEngine and use metadata backed PersistentDict
RE = RunEngine({})
RE.md = PersistentDict(get_md_path())
prjemian commented 1 year ago

We should also add handling in case the user does not provide this key (it is commented out, by default).