-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
193a3df
commit 7b439aa
Showing
3 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "b712b364-878d-49c2-96d7-9269c0cb4317", | ||
"metadata": {}, | ||
"source": [ | ||
"Setup for bluesky (see https://nsls-ii.github.io/bluesky/tutorial.html)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "8bb8afd0-a6cb-40fd-8a88-fe99a5eba55c", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from bluesky import RunEngine\n", | ||
"from bluesky.callbacks.best_effort import BestEffortCallback\n", | ||
"\n", | ||
"RE = RunEngine({})\n", | ||
"\n", | ||
"bec = BestEffortCallback()\n", | ||
"\n", | ||
"# Send all metadata/data captured to the BestEffortCallback.\n", | ||
"RE.subscribe(bec)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "16ff289d-3ae5-4834-8d3c-a3be871473b0", | ||
"metadata": {}, | ||
"source": [ | ||
"Run a scan against a sim detector" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "4b56ec8e-9bc2-4b6e-8652-4f49cd8c5d93", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from ophyd.sim import det, motor\n", | ||
"from bluesky.plans import scan\n", | ||
"dets = [det] # just one in this case, but it could be more than one\n", | ||
"\n", | ||
"RE(scan(dets, motor, -1, 1, 10))" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.4" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source .venv/bin/activate | ||
jupyter-lab --matplotlib=qt5 |