import sched
import time
from bluesky import RunEngine
from ophyd.sim import noisy_det
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def plot_ophyd_device(device, dont_plot={'ramp_rate'}): | |
''' | |
Plot all of the signals of an ophyd device. | |
There is probably some inaccuracy of the timestamps. | |
Simple implementation. | |
''' | |
history = {signal: [getattr(device, signal).get()] | |
for signal in set(device.component_names) - dont_plot} | |
history['timestamp'] = [time.time()] | |
print(set(device.component_names) - dont_plot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import threading | |
from simple_pid import PID | |
class ThermalMaterial: | |
""" | |
A material that you can heat and cool. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import threading | |
class ThermalMaterial: | |
""" | |
A material that you can heat and cool. | |
Parameters | |
---------- | |
thermal_mass: float, optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. /Users/gbischof/miniconda3/etc/profile.d/conda.sh | |
if [ ! -z "$BS_PYTHONPATH" ]; then | |
if [ ! -z "$PYTHONPATH" ]; then | |
export PYTHONPATH=$PYTHONPATH:$BS_PYTHONPATH | |
else | |
export PYTHONPATH=$BS_PYTHONPATH | |
fi | |
fi |
https://github.com/nsls2-conda-envs/nsls2-collection/blob/main/envs/env-py310.yml
Remove any linux specific packages. There could be some additional touchups required to get it to build.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nslsii | |
from bluesky_kafka import Publisher | |
import uuid | |
from tiled.client import from_profile | |
c = from_profile("ucal") | |
config = nslsii._read_bluesky_kafka_config_file(config_file_path="/etc/bluesky/kafka.yml") | |
pub = Publisher(topic="ucal.bluesky.runengine.documents", | |
bootstrap_servers=",".join(config['bootstrap_servers']), | |
key=str(uuid.uuid4()), |
This requires the Unreal Robot Arm Simulation. And the code here: https://gist.github.com/gwbischof/32c2de9e8e5521752d442cef3365d9b4
from unreal_remote_control import UnrealClient, UnrealSignal
client = UnrealClient()
client.get_all_properties()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('luau') | |
_addon.name = 'enterkey' | |
_addon.version = '1.0' | |
_addon.author = 'Mapogo' | |
_addon.commands = {'am',} | |
sleep_time = 1 | |
windower.register_event('load', function() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_addon.name = 'targetid' | |
_addon.author = 'Mapogo' | |
_addon.version = '1.0' | |
_addon.language = 'English' | |
require('luau') | |
texts = require('texts') | |
old_mob_id = 0 |
NewerOlder