instrument.configs

Configuration files related to this Bluesky instrument package. Configuration of the bluesky queueserver host process (QS host) is described in the queueserver section.

loaders

Load configuration files

Load configuration files

Load supported configuration files, such as iconfig.yml.

load_config_yaml([iconfig_yml])

Load iconfig.yml (and other YAML) configuration files.

IConfigFileVersionError

Configuration file version too old.

exception instrument.configs.loaders.IConfigFileVersionError[source]

Bases: ValueError

Configuration file version too old.

instrument.configs.loaders.load_config_yaml(iconfig_yml=None) dict[source]

Load iconfig.yml (and other YAML) configuration files.

Parameters

iconfig_yml: str

Name of the YAML file to be loaded. The name can be absolute or relative to the current working directory. Default: INSTRUMENT/configs/iconfig.yml

file: iconfig.yml

 1# Configuration for the Bluesky instrument package.
 2
 3# identify the version of this iconfig.yml file
 4ICONFIG_VERSION: 2.0.0
 5
 6# Add additional configuration for use with your instrument.
 7
 8### The short name for the databroker catalog.
 9DATABROKER_CATALOG: &databroker_catalog temp
10
11### RunEngine configuration
12RUN_ENGINE:
13    DEFAULT_METADATA:
14        beamline_id: instrument
15        instrument_name: Most Glorious Scientific Instrument
16        proposal_id: commissioning
17        databroker_catalog: *databroker_catalog
18
19    ### EPICS PV to use for the `scan_id`.
20    ### Default: `RE.md["scan_id"]` (not using an EPICS PV)
21    # SCAN_ID_PV: f"{IOC}bluesky_scan_id"
22
23    ### Directory to "autosave" the RE.md dictionary (uses PersistentDict).
24    ### Default: HOME/.config/Bluesky_RunEngine_md'
25    # MD_PATH: /home/beams/USERNAME/.config/Bluesky_RunEngine_md
26
27    ### The progress bar is nice to see,
28    ### except when it clutters the output in Jupyter notebooks.
29    ### Default: True
30    USE_PROGRESS_BAR: false
31
32### Best Effort Callback Configurations
33### Defaults: all true (except no plots in queueserver)
34# BEC:
35#     BASELINE: false
36#     HEADING: false
37#     PLOTS: false
38#     TABLE: false
39
40AREA_DETECTOR:
41    ### General configuration for area detectors.
42    ALLOW_PLUGIN_WARMUP: true
43    BLUESKY_FILES_ROOT: &BLUESKY_DATA_ROOT "/path/to/data/"
44    IMAGE_DIR: "sub/directory/path"
45    HDF5_FILE_TEMPLATE: "%s%s_%6.6d.h5"
46    ### Add configuration for specific detector(s).
47    ### Suggestion:
48    # ADSIM_16M:
49    #     # IOC host: workstation_name
50    #     IOC_FILES_ROOT: *BLUESKY_DATA_ROOT
51    #     NAME: simdet16M
52    #     PV_PREFIX: "simdet16m:"
53
54### Support for known output file formats.
55### Uncomment to use.  If undefined, will not write that type of file.
56### Each callback should apply its configuration from here.
57# NEXUS_DATA_FILES:
58#     FILE_EXTENSION: hdf
59#     WARN_MISSING_CONTENT: true
60SPEC_DATA_FILES:
61    FILE_EXTENSION: dat
62
63### APS Data Management
64### Use bash shell, deactivate all conda environments, source this file:
65DM_SETUP_FILE: "/home/dm/etc/dm.setup.sh"
66
67# ----------------------------------
68
69OPHYD:
70    ### Control layer for ophyd to communicate with EPICS.
71    ### Default: PyEpics
72    ### Choices: "PyEpics" or "caproto"
73    # CONTROL_LAYER: caproto
74
75    ### default timeouts (seconds)
76    TIMEOUTS:
77        PV_READ: &TIMEOUT 5
78        PV_WRITE: *TIMEOUT
79        PV_CONNECTION: *TIMEOUT
80
81LOGGING:
82    ### Uncomment any of these to override the defaults
83    # MAX_BYTES: 1000000
84    NUMBER_OF_PREVIOUS_BACKUPS: 9
85    # LOG_PATH: /tmp
86    ### If LOG_PATH undefined, this session will log into PWD/.logs/
87    ### where PWD is present working directory when session is started
88
89# Control detail of exception traces in IPython (console and notebook).
90XMODE_DEBUG_LEVEL: Minimal