bcda-aps / epics-bluesky-vm Goto Github PK
View Code? Open in Web Editor NEWSimulate a beam line using EPICS IOCs, GUIs, Bluesky and related components.
License: Other
Simulate a beam line using EPICS IOCs, GUIs, Bluesky and related components.
License: Other
Derive from the notebooks provided for the 2021-03 training classes.
consistency with existing usage at APS
See Method 2 at https://www.2daygeek.com/execute-run-linux-scripts-command-at-reboot-startup/
# crontab -e
@reboot /home/apsu/bin/start_iocs.sh
When instrument.iocs.check_iocs
is run from blueskyStarter.sh
, it can take a long time to complete. During this time, no output is shown to the console. Consider showing a progress bar or the interim output from the subprocess call. At least print a message that the step may take a minute or more to complete.
Need to initialize the EPICS scaler channels with expected names I0
& diode
Originally posted by @prjemian in #15 (comment)
Listed as TODO item now
With #12, the instrument package is part of this repo. Revise the instructions for the new repo content. Start with a git clone https://github.com/BCDA-APS/epics-bluesky-vm ~/bluesky
before the first shell script is run. Need to sudo apt install git
before git clone.
Not getting all the widgets to display properly.
(base) apsu@apsu-beamline-simulator:~$ /tmp/docker_ioc/iocad/iocSimDetector/start_caQtDM_adsim &
[1] 3892
(base) apsu@apsu-beamline-simulator:~$ qt5ct: using qt5ct plugin
caQtDM -- file <caQtDM_stylesheet.qss> loaded as the default application stylesheet
-macro
caQtDM -- macro <P=ad:,R=cam1:>
ad_cam_image.ui
caQtDM -- file = <ad_cam_image.ui>
caQtDM -- viewer will disable monitors for hidden pages of QTabWidgets, in case of problems
you may disable this by not defining IO_OPTIMIZED_FOR_TABWIDGETS in qtdefs.pri
caQtDM -- files will not be downloaded from an url when not locally found, while CAQTDM_URL_DISPLAY_PATH is not defined
caQtDM -- desktop size: QSize(1678, 600)
qt5ct: D-Bus global menu: no
caQtDM -- shared memory key "caQtDM shared memory::0.0:1000"
caQtDM -- created shared memory with 204808 bytes
caQtDM -- Controlsystem plugins: attempt to load from "/usr/local/epics/extensions/lib/linux-x86_64/controlsystems"
caQtDM -- Controlsystem plugins: attempt to load from "/usr/local/epics/opi/bin/linux-x86_64/controlsystems"
caQtDM -- Controlsystem plugins: attempt to load from "/usr/lib/x86_64-linux-gnu/qt5/plugins/controlsystems"
qt5ct: custom style sheet is disabled
file "/tmp/docker_ioc/synapps-6.1-ad-3.7/screens/ui/ad_cam_image.ui" will be loaded macro= "P=ad:,R=cam1:"
"QFormBuilder was unable to create a custom widget of the class 'caLabel'; defaulting to base class 'QLabel'."
Designer: The enumeration-type property fontScaleMode could not be read.
"QFormBuilder was unable to create a custom widget of the class 'caCamera'; defaulting to base class 'QWidget'."
Designer: The enumeration-type property Zoom could not be read.
Designer: The enumeration-type property ColorMap could not be read.
"QFormBuilder was unable to create a custom widget of the class 'caRelatedDisplay'; defaulting to base class 'QWidget'."
"QFormBuilder was unable to create a custom widget of the class 'caRelatedDisplay'; defaulting to base class 'QWidget'."
"QFormBuilder was unable to create a custom widget of the class 'caMessageButton'; defaulting to base class 'QPushButton'."
Designer: The enumeration-type property fontScaleMode could not be read.
Designer: The enumeration-type property colorMode could not be read.
"QFormBuilder was unable to create a custom widget of the class 'caMessageButton'; defaulting to base class 'QPushButton'."
Designer: The enumeration-type property fontScaleMode could not be read.
Designer: The enumeration-type property colorMode could not be read.
"QFormBuilder was unable to create a custom widget of the class 'caTextEntry'; defaulting to base class 'caLineEdit'."
"QFormBuilder was unable to create a custom widget of the class 'caLineEdit'; defaulting to base class 'QLineEdit'."
Designer: The enumeration-type property colorMode could not be read.
Designer: The enumeration-type property precisionMode could not be read.
Designer: The enumeration-type property limitsMode could not be read.
Designer: The enumeration-type property fontScaleMode could not be read.
Designer: The enumeration-type property formatType could not be read.
"QFormBuilder was unable to create a custom widget of the class 'caLabel'; defaulting to base class 'QLabel'."
Designer: The enumeration-type property fontScaleMode could not be read.
"QFormBuilder was unable to create a custom widget of the class 'caLineEdit'; defaulting to base class 'QLineEdit'."
Designer: The enumeration-type property colorMode could not be read.
Designer: The enumeration-type property precisionMode could not be read.
Designer: The enumeration-type property limitsMode could not be read.
Designer: The enumeration-type property fontScaleMode could not be read.
Designer: The enumeration-type property formatType could not be read.
"QFormBuilder was unable to create a custom widget of the class 'caLineEdit'; defaulting to base class 'QLineEdit'."
Designer: The enumeration-type property colorMode could not be read.
Designer: The enumeration-type property precisionMode could not be read.
Designer: The enumeration-type property limitsMode could not be read.
Designer: The enumeration-type property fontScaleMode could not be read.
Designer: The enumeration-type property formatType could not be read.
"QFormBuilder was unable to create a custom widget of the class 'caLineEdit'; defaulting to base class 'QLineEdit'."
Designer: The enumeration-type property colorMode could not be read.
Designer: The enumeration-type property precisionMode could not be read.
Designer: The enumeration-type property limitsMode could not be read.
Designer: The enumeration-type property fontScaleMode could not be read.
Designer: The enumeration-type property formatType could not be read.
"QFormBuilder was unable to create a custom widget of the class 'caLineEdit'; defaulting to base class 'QLineEdit'."
Designer: The enumeration-type property colorMode could not be read.
Designer: The enumeration-type property precisionMode could not be read.
Designer: The enumeration-type property limitsMode could not be read.
Designer: The enumeration-type property fontScaleMode could not be read.
Designer: The enumeration-type property formatType could not be read.
"QFormBuilder was unable to create a custom widget of the class 'caLed'; defaulting to base class 'QWidget'."
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
main window logs these messages:
01-04-2021 09:04:27 special macro CAQTDM_INTERNAL_UIPATH set to /tmp/docker_ioc/synapps-6.1-ad-3.7/screens/ui/
01-04-2021 09:04:27 last file: /tmp/docker_ioc/synapps-6.1-ad-3.7/screens/ui/ad_cam_image.ui, macro: P=ad:,R=cam1:
01-04-2021 09:05:11 environment variable CAQTDM_TIMEOUT_HOURS could be set for quitting caQtDM automatically after some time
As shown in https://github.com/BCDA-APS/bluesky_instrument_training/tree/main/resources/example-data -- or generate new. However, the existing set of data has good variety.
Add the instrument package to this repository, so that this repo can be fully separated from bluesky_instrument_training. That repo was created for the 2021-03 training sessions.
Prepare the first VM image. Needs instructions how to download, install, get started. Post in ANL's Box account.
(base) apsu@apsu-beamline-simulator:~$ blueskyStarter.sh
Could not find conda environment: class_2021_03
You can list all discoverable environments with `conda info --envs`.
/home/apsu/bin/blueskyStarter.sh: line 22: ipython: command not found
From the various notebooks in a branch, add Challenges based on the Next Steps in those notebooks.
Compare hklpy, SPEC, and optics/orient computations
Use Si standard and LNO_LAO data:
Here's a sequence of commands to initialize the monochromator (from a fresh-started IOC with all motors at zero) to 1.54 Angstrom wavelength:
(base) prjemian@zap:~/.../epics-docker/v1.1$ caput gp:m45 1
Old : gp:m45 0
New : gp:m45 1
(base) prjemian@zap:~/.../epics-docker/v1.1$ caput gp:m46 1
Old : gp:m46 0
New : gp:m46 1
(base) prjemian@zap:~/.../epics-docker/v1.1$ caput gp:m47 1
Old : gp:m47 0
New : gp:m47 1
(base) prjemian@zap:~/.../epics-docker/v1.1$ caput gp:KohzuOperAckBO 1
Old : gp:KohzuOperAckBO Normal
New : gp:KohzuOperAckBO Ack
(base) prjemian@zap:~/.../epics-docker/v1.1$ caput gp:KohzuModeBO Auto
Old : gp:KohzuModeBO Manual
New : gp:KohzuModeBO Auto
(base) prjemian@zap:~/.../epics-docker/v1.1$ caput gp:BraggEAO 10
Old : gp:BraggEAO 1.97734
New : gp:BraggEAO 10
(base) prjemian@zap:~/.../epics-docker/v1.1$ caput gp:BraggLambdaAO 1.54
Old : gp:BraggLambdaAO 1.23984
New : gp:BraggLambdaAO 1.54
Example screen (while setting energy to 10 keV):
Explain each step.
This is checked for and started during instrument package startup. But it does not stay running.
Discovered a 10GB download limit at APS, rebuild the VM to be smaller than that.
Still, allow for 40GB virtual disk size
After the OS is installed but before the first update, remove the largest of the packages that are not used by the training software.
Includes:
Do this before installing updates or the training stack since the total size of the VM image never decreases. (The host storage used by the VM expands to fit the content of the VM as installed.)
There's a ]new release (v1.1) of the EPICS docker images](https://github.com/prjemian/epics-docker/releases/tag/1.1). Upgrade per instruction.
need to add EDITOR=nano
, see
(base) apsu@apsu-sim:~$ more .selected_editor
# Generated by /usr/bin/select-editor
SELECTED_EDITOR="/bin/nano"
(base) apsu@apsu-sim:~$ more ./setup_editor_env.sh
# -----------------------------
# file: setup_editor_env.sh
# add to ~/.bash_aliases
export EDITOR=nano
(base) apsu@apsu-sim:~$ grep EDITOR ~/.bash_aliases
(base) apsu@apsu-sim:~$
caQtDM:
cd ~/bin
ln -s /tmp/docker_ioc/iocgp/xxx-R6-1/start_caQtDM_xxx ./start_caQtDM_gp
ln -s /tmp/docker_ioc/iocad/iocSimDetector/start_caQtDM_adsim .//start_caQtDM_ad
not temperature_readback
also need a tscan
run in the databroker
(base) apsu@apsu-beamline-simulator:~$ /tmp/docker_ioc/iocgp/xxx-R6-1/start_MEDM_xxx &
[2] 10495
(base) apsu@apsu-beamline-simulator:~$
medmInit: Unable to load font widgetDM_4
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_6
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_8
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_10
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_12
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_14
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_16
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_18
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_20
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_22
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_24
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_30
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_36
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_40
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_48
Trying default (fixed) instead
medmInit: Unable to load font widgetDM_60
Trying default (fixed) instead
MEDM Version 3.1.16: Loading aliased fonts.................
The 30GB disk is no 88% full. Increase to 40 GB (and be conservative about disk usage). The Disk Usage tools can help identify where the space is used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.