Startup Sequence¶
Calling xxxpython
is an alias for calling hutch-python --cfg cfg.yml
.
The cfg.yml
file defines what the loader will do. The specifics of this
file are documented on the yaml files page.
Each step of the startup can freely access any objects defined by previous steps. In order, the startup sequence is as follows:
Common Startup
Set up log files, debug state, and sim state
Read
cfg.yml
Display the
xxxpython
bannerCreate and set up a
RunEngine
asRE
Create the
plans
object with default plans and alias top
Create the
daq
objectCreate the
scan_pvs
object
Database Load
Load the
db
fromcfg.yaml
usinghappi
Create the
xxx_beampath
object usinglightpath
Create cameras using the camviewer configuration file
Beamline Load
Import all objects from the modules under
load
incfg.yaml
. By convention, this is justxxx.beamline
, but it can also be extended to a list of modules.
Experiment Load
Automatically select the hutch’s current experiment if one was not provided in the
cfg.yml
.Create user objects from the experiment questionnaire using
happi
andpsdm_qs_cli
.Import
User
class from experiment file and instantiateUser()
.Attach all questionnaire objects to the
User()
objectIf there was no experiment file, make a
SimpleNamespace()
object insteadSet this object to be
x
anduser
.
Groups Load
If any
EpicsMotor
objects were defined previously, group them into amotors
object. Alias this tom
.If any
Slits
objects were defined previously, group them into aslits
object. Alias this tos
.Group all loaded objects by metadata, to be found in a tab-accessible way e.g.
xxx.dg1.name
Group everything into an
all_objects
object. Alias this toa
.
Finish
Create all
_debug
objects as documented on the debug page.Enable input, output, and error logger
Enter the
ipython
terminal