Running Plans¶
Plans are the primary way to perform data acquisition in Lightfall. A plan defines a sequence of measurements - moving motors, triggering detectors, and recording data. This guide explains how to select, configure, and run plans.
The Bluesky Panel¶
The Bluesky panel is your main interface for plan execution. Open it from View > Panels > Bluesky if not already visible.
The panel has three main areas:
Plan Selector (top): Browse and select available plans
Parameter Configuration (middle): Set up the plan parameters
Run Controls (toolbar): Start, pause, and abort execution
Selecting a Plan¶
Plan Categories¶
Plans are organized into categories for easier browsing:
Category |
Description |
Examples |
|---|---|---|
Scan |
Move motors and measure |
|
Grid |
2D grid measurements |
|
Fly |
Continuous motion scans |
|
Count |
Fixed-position measurements |
|
Alignment |
Beam and sample alignment |
|
Calibration |
Detector/motor calibration |
Various |
Finding Plans¶
To find a specific plan:
Use the search box to filter by name
Or browse by category using the dropdown
Click a plan to select it
The plan’s description appears below the list, explaining what it does and its parameters.
Configuring Parameters¶
After selecting a plan, the parameter configuration area shows controls for each parameter.
Parameter Types¶
Plans have different types of parameters:
Devices (Motors/Detectors):
Click the dropdown to see available devices
Only compatible devices are shown (e.g., motor parameters only show motors)
Multiple detectors can often be selected
Numeric Values:
Enter values directly in the text field
Some have minimum/maximum limits
Units are shown where applicable
Ranges:
Start and end values define the scan range
Step size or number of points controls resolution
Example: Configuring a 1D Scan¶
For a basic scan plan:
Detectors: Select one or more detectors to read
Motor: Choose the motor to move
Start: Enter the starting position
Stop: Enter the ending position
Num Points: Enter how many measurements to take
Running the Plan¶
Starting Execution¶
Once configured:
Click Run in the toolbar (play button)
The plan is queued for execution
Execution begins automatically
During execution:
The toolbar shows the current state (Running)
Progress appears in the status area
Data flows to the Logbook automatically
Pausing and Resuming¶
To pause a running plan:
Click Pause in the toolbar
The plan stops at the next safe point
Click Resume to continue
Pausing is useful for:
Checking intermediate results
Addressing unexpected conditions
Taking a break without losing progress
Aborting¶
To stop a plan immediately:
Click Abort in the toolbar
Confirm the abort action
The plan stops and cleans up
Note: Aborted plans cannot be resumed. Data collected before abort is preserved.
Monitoring Progress¶
Real-Time Feedback¶
While a plan runs:
Logbook: Shows automatic entries for each step
Devices: Displays current device values
Status Bar: Shows overall progress
Completion Notification¶
When a plan finishes:
A toast notification appears indicating success or failure
The Logbook records the final status
The toolbar returns to idle state
User Plans¶
You can create custom plans for repetitive procedures.
Creating a New Plan¶
In the Bluesky panel toolbar, click New Plan
Your configured code editor (VSCode or PyCharm) opens
Write your plan using the Bluesky plan template
Save the file
Plans are stored in ~/lightfall/plans/ and automatically loaded.
Refreshing Plans¶
After editing a user plan:
Click Refresh Plans in the toolbar
The plan registry reloads
Your updated plan appears in the selector
User Plan Template¶
A basic user plan:
"""
My Custom Scan
A description of what this plan does.
"""
from bluesky import plans as bp
def my_custom_scan(detectors, motor, start, stop, num):
"""
Perform a custom scan.
Parameters
----------
detectors : list
Detectors to read
motor : Motor
Motor to move
start : float
Starting position
stop : float
Ending position
num : int
Number of points
"""
yield from bp.scan(detectors, motor, start, stop, num)
Troubleshooting¶
Plan won’t start¶
Check that you’re authenticated (not in guest mode)
Verify all required parameters are filled
Ensure selected devices are connected
Plan runs but no data appears¶
Check detector connections in the Devices panel
Verify Tiled data catalog is configured (if using)
Look for errors in the Logging panel
Plan aborts unexpectedly¶
Check the Logbook for error messages
Review device status for hardware issues
Check the Logging panel for detailed error information