APS Bluesky 101 - Presenter’s Notes#

Note: The following content are notes for the presenter from 2021, not the training itself.

Overview#

The APS Bluesky 101 class provides a basic, yet hands-on, introduction to using the Bluesky framework.

The class should take (roughly) about 3 hours. The first hour will cover from the Welcome through the Jupyter Lab section. The remaining time will be spent on the Connect with EPICS and scan with Bluesky section.

The Linux Virtual Machine provides a complete, self-contained system with all software installed, similar to what is used for scientific measurements with an APS instrument, includes Bluesky software, EPICS client tools (both command line and GUI), IOCs for area detector and general purpose work, web browsers, graphical text editors, MongoDB database server, and Python infrastructure.

Syllabus#

Note: time spans are estimates

  • half-hour

    • Welcome

    • Check VMs are working

      • spot check (should check before class to fix problems) or follow as observer

    • apply software updates & patches:

      cd ~/training
      git stash
      git pull
      bash ./patch1.sh
      cd ~/
      
    • check that IOC is running: caget gp:UPTIME in terminal

  • half-hour

    • start Jupyter lab: blueskyStarter.sh lab

    • Bluesky: Brief Introduction

  • hour - interactive notebooks

    • hello_world.ipynb notebook

    • basic-motor-scaler-scan.ipynb notebook

      • start caQtDM and view motor gp:m1: start_caQtDM_gp (in a new terminal tab)

      • Connect the motor

      • Connect the scaler

      • Prepare to scan

    • Break

  • half-hour

    • First scan

    • discussion

    • Fix a few problems

  • half-hour

    • Scan with a different counting time : staging

    • Custom plan with configurable count time

    • Discussion

Before the class#

Covered here#

  • The core parts of the Bluesky Framework

  • Start Jupyter Lab (in web browser) for Bluesky sessions

  • Connect with EPICS (in the VM)

  • Setup and scan scaler v. motor using the bluesky.RunEngine and databroker.catalog

Not covered here#

Reference#

Links to the videos from the training sessions of 2021 August and September are publicly-available on Box.com: https://anl.box.com/s/5ovic1hhoxrek9as0idawy61z9a32n4l

Community#

Information#