nsls-ii-opls / profile_collection Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
profile_collection
bsui
remotely (does it touch any hardware?) - use git grep .put
or git grep caput
~/.bashrc
add the following and remember to source ~/.bashrc
afterward.
BLUESKY_LOG_FILE=/var/log/bluesky.log
BLUESKY_IPYTHON_LOG_FILE=/var/log/bluesky_ipython.log
00-startup.py
https://gist.github.com/jklynch/a4366b8900ec0c03883403455ae711b2BS_ENV=collection-2020-2.0rc7 bsui
.value
-> .get()
if it's in a Device
, or with yield from bps.read()
if in a planhistory.sqlite
issue - see https://blueskyproject.io/bluesky/metadata.html#persistence-between-sessions2020C2.0
conda env list
profile_collection
bsui
remotely (does it touch any hardware?) - use git grep .put
or git grep caput
$ su - <your-controls-account>
$ sudo su -
# conda activate base # should be activated by default, but just in case.
# conda install conda -c https://repo.anaconda.com/pkgs/main/
~/.bashrc
, if necessary, update the logging environment variables to use directory /var/log/bluesky/...
and add umask 0002
.
umask u=rwx,g=rwx,o=rx # 0002
export BLUESKY_LOG_FILE=/var/log/bluesky/bluesky.log
export BLUESKY_IPYTHON_LOG_FILE=/var/log/bluesky/bluesky_ipython.log
sudo mkdir /var/log/bluesky
sudo chown -Rv xf12id1:xf12id1 /var/log/bluesky
sudo chmod -Rv g+rws /var/log/bluesky
source ~/.bashrc
.PersistentDict
to bug-fixed version (see the updated gist snippet: https://gist.github.com/jklynch/a4366b8900ec0c03883403455ae711b2).BS_ENV=collection-2021-1.0 bsui
from databroker import catalog
cat = catalog['beamline_name']
cat[-1].read()
2021C1.0
This is blocked by changes to the playbooks to provide the opls configuration files.
two quick sketches for how to make use of multiple LivePlots
in one scan:
from functools import partial
from ophyd.sim import hw as _hw
from bluesky import RunEngine
from bluesky.plans import scan
from bluesky.callbacks.mpl_plotting import LivePlot
import bluesky.callbacks
import bluesky.preprocessors as bpp
hw = _hw()
bluesky.callbacks.mpl_plotting.initialize_qt_teleporter()
RE = RunEngine({})
def same_axes():
def get_ax():
import matplotlib.pyplot as plt
return plt.figure('my plot').gca()
lt = LivePlot('det', 'motor', marker='x', markersize=10, ax=get_ax)
lt2 = LivePlot('det1', 'motor', marker='o', markersize=10, ax=get_ax)
return (yield from bpp.subs_wrapper(scan([hw.det, hw.det1], hw.motor, -5, 5, 30), [lt, lt2]))
def same_figure():
def get_ax(i):
import matplotlib.pyplot as plt
fig = plt.figure('my plot')
if len(fig.axes) == 0:
fig.subplots(1, 2)
return fig.axes[i]
lt = LivePlot('det', 'motor', marker='x', markersize=10, ax=partial(get_ax, i=0))
lt2 = LivePlot('det1', 'motor', marker='o', markersize=10, ax=partial(get_ax, i=1))
return (yield from bpp.subs_wrapper(scan([hw.det, hw.det1], hw.motor, -5, 5, 30), [lt, lt2]))
RE(same_figure())
In your actual use the hard coded lt
and lt2
can be replaced with a loop over the y-values of interest.
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.