Skip to content
@xraygui

xraygui

Nifty Beamline System (NBS)

This repository will aim to develop a complete system for running Bluesky-based X-ray beamlines at synchrotron light sources. This includes

  • An opinionated beamline structure that organizes bluesky/ophyd objects
  • A Bluesky-Queueserver based control package
  • A GUI framework that takes advantage of this structure to make it easy to build custom controls for specific beamlines
  • A simulation framework for building a "digital twin" of a beamline for GUI/controls testing
  • A Viewer for data stored in Tiled

Current Status

This entire system is a total work-in-progress. It is not ready for general use, but is being developed and re-worked constantly at the NSLS-II SST-1 beamline. Once it achieves a modicum of stability, it is our intention to run the system on several endstations and beamlines, and help anyone else who wants to get it running on theirs. Right now, it would be best to treat this as a highly experimental system with a completely unstable API that could change at any time.

Advantages

Config files

NBS uses config files to define and load a beamline, based on a generic control framework. This makes setup of new beamlines fast, as no new code needs to be written to get basic functionality up and running. Config files also allow for the QueueServer, GUI, and Simulation to be kept synchronized. Config files are a much better place to store configuration than in raw python code.

Vertical integration

By defining a QueueServer, a GUI, a Simulation, and a Viewer, we can provide a control system that has several advantages over "generic" Bluesky. By assuming that every beamline has

  • An energy-defining object
  • A sample manipulator
  • Detectors
  • Motors
  • Gate Valves
  • Shutters
  • Optics

We can produce standard "plans" that will work across all beamlines running NBS, and standard GUI tools that automatically expose the most important objects. Every beamline needs to move and scan energy, so why should every beamline have a different "spelling" of the move energy command? By explicitly declaring important classes of objects, we can provide a standard way to list motor positions, gate valve/shutter status, etc, and display them in a GUI. We can also record the meaning of each object in metadata, so that groups looking at old data taken by that one PhD student who graduated 3 years ago don't have to guess the beamline structure from a set of inconsistently-named objects and PVs, which may have shifted from beamtime-to-beamtime as detectors and motors were swapped out.

If we adhere to a certain set of conventions for meaning, we can also ensure that the metadata always exists to make sensible plots directly from Tiled.

Disadvantages

Specificity

This package aims to be opinionated. There will be beamlines doing odd things that do not fit into this structure. This is fine. They may benefit from some of the more generic tools, but not the overall framework. The assumption is that you are trying to run an EPICS/Bluesky based beamline, with QueueServer, and that the universe of things you want to do is reasonably close to NEXAFS, which is what most of the "common" functionality is built around.

Complexity

This package (so-far) sacrifices some clarity of code for generality. Object and plan loading has to happen in some unfortunately magical ways. The scan decorators that add a lot of built-in functionality to the basic built-in bluesky scans have probably gotten out of hand. Managing config files can get complex, and wind up just as bad as having to directly edit source code. As smarter people aid in development, we will hopefully try to increase the readability of the code.

Current users

Development of this system is currently ongoing at NSLS-II/SST and BESSY-II/UE52.

Popular repositories Loading

  1. nbs-viewer nbs-viewer Public

    NBS Viewer Program for Tiled

    Python 1

  2. livetable livetable Public

    A Kafka LiveTable plotter for Bluesky

    Python

  3. .github .github Public

  4. nbs-core nbs-core Public

    NBS Core Functionality

    Python

  5. nbs-sim nbs-sim Public

    NBS Simulation of EPICS/Bluesky beamlines

    Python

  6. nbs-bl nbs-bl Public

    NBS Beamline Framework

    Python

Repositories

Showing 8 of 8 repositories
  • nbs-gui Public

    NBS GUI Module

    xraygui/nbs-gui’s past year of commit activity
    Python 0 0 0 0 Updated Nov 21, 2024
  • nbs-bl Public

    NBS Beamline Framework

    xraygui/nbs-bl’s past year of commit activity
    Python 0 0 0 0 Updated Nov 19, 2024
  • nbs-core Public

    NBS Core Functionality

    xraygui/nbs-core’s past year of commit activity
    Python 0 0 0 0 Updated Oct 30, 2024
  • nbs-pods Public

    Docker containers for running a simulated version of the SST-1 beamline

    xraygui/nbs-pods’s past year of commit activity
    Shell 0 0 0 0 Updated Oct 28, 2024
  • nbs-viewer Public

    NBS Viewer Program for Tiled

    xraygui/nbs-viewer’s past year of commit activity
    Python 1 0 0 0 Updated Sep 12, 2024
  • nbs-sim Public

    NBS Simulation of EPICS/Bluesky beamlines

    xraygui/nbs-sim’s past year of commit activity
    Python 0 0 0 0 Updated Sep 9, 2024
  • livetable Public

    A Kafka LiveTable plotter for Bluesky

    xraygui/livetable’s past year of commit activity
    Python 0 0 0 0 Updated May 21, 2024
  • .github Public
    xraygui/.github’s past year of commit activity
    0 0 0 0 Updated May 15, 2024

Top languages

Loading…

Most used topics

Loading…