Git Product home page Git Product logo

htss-rig-bluesky's Introduction

htss-rig-bluesky

Code CI Docs CI Apache License

Collection of scripts for playing with Bluesky on Diamond's Hardware Triggered Scanning Stack rigs.

Source code https://github.com/DiamondLightSource/htss-rig-bluesky
Documentation https://DiamondLightSource.github.io/htss-rig-bluesky
Releases https://github.com/DiamondLightSource/htss-rig-bluesky/releases

Quickstart

You can run an IPython terminal in a container via podman with access to a RunEngine and the Ophyd devices needed to control the test rig:

Note

If you have never run podman on a Diamond machine before, you need to run the setup script at /dls_sw/apps/setup-podman/setup.sh.

export BEAMLINE=<the test rig you want to control, either p46, p47, p48 or p49>

Run the container with

podman run -it \
           --rm \
           --net host \
           -e BEAMLINE=${BEAMLINE} \
           -e MINIMAL=1 \
           -e DISPLAY=${DISPLAY} \
           --security-opt=label=type:container_runtime_t \
           ghcr.io/diamondlightsource/htss-rig-bluesky:latest

Note

You must be on the same network as the test rig. This should provide an IPython prompt, into which you can run a basic scan:

In [1]: RE(bp.scan([det], sample_stage.theta, 0.0, 180.0, 10))


Transient Scan ID: 1     Time: 2023-03-28 09:59:39
Persistent Unique Scan ID: '57eb5122-a1e4-4c5f-b784-ded7656b6206'
New stream: 'primary'
+-----------+------------+--------------------+
|   seq_num |       time | sample_stage_theta |
+-----------+------------+--------------------+
|         1 | 09:59:40.6 |              0.000 |
|         2 | 09:59:41.0 |             19.998 |
|         3 | 09:59:41.5 |             39.996 |
|         4 | 09:59:41.9 |             60.012 |
|         5 | 09:59:42.3 |             79.992 |
|         6 | 09:59:42.7 |             99.990 |
|         7 | 09:59:43.2 |            119.988 |
|         8 | 09:59:43.6 |            140.004 |
|         9 | 09:59:44.0 |            160.002 |
|        10 | 09:59:44.4 |            180.000 |
+-----------+------------+--------------------+
generator scan ['57eb5122'] (scan num: 1)



Out[1]: ('57eb5122-a1e4-4c5f-b784-ded7656b6206',)

In [2]:

CTRL+D to exit IPython

See https://DiamondLightSource.github.io/htss-rig-bluesky for more detailed documentation.

htss-rig-bluesky's People

Contributors

callumforrester avatar gilesknap avatar garryod avatar coretl avatar dependabot[bot] avatar evalott100 avatar keithralphs avatar alexanderwells-diamond avatar gdyendell avatar tizayi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.