Skip to content

Commit

Permalink
changes made to bdp plan
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhang234 committed Jul 5, 2024
1 parent d9609c6 commit 36206ef
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 9 deletions.
16 changes: 8 additions & 8 deletions scripts/20240627_Day1_3pm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a727a3bd-6064-45e7-bf5f-a07108cdd7f6",
"id": "1",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "1",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -63,7 +63,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -73,7 +73,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -84,7 +84,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -95,7 +95,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5",
"id": "6",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -105,7 +105,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -115,7 +115,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7",
"id": "8",
"metadata": {},
"outputs": [],
"source": []
Expand Down
131 changes: 131 additions & 0 deletions scripts/20240701_Day5.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "0",
"metadata": {},
"outputs": [],
"source": [
"import logging\n",
"import time\n",
"\n",
"import aps_8id_bs_instrument\n",
"from aps_8id_bs_instrument.data_collection import * # noqa\n",
"from aps_8id_bs_instrument.initialize_bs_tools import ( # noqa: F401\n",
" RE,\n",
" bec,\n",
" cat,\n",
" oregistry,\n",
" peaks,\n",
" sd,\n",
")\n",
"from aps_8id_bs_instrument.utils.session_logs import logger\n",
"from bluesky.magics import BlueskyMagics\n",
"from IPython import get_ipython\n",
"\n",
"from ophyd import EpicsSignal\n",
"import bluesky.plans as bp\n",
"import bluesky.plan_stubs as bps\n",
"import databroker\n",
"cat = databroker.catalog[\"8idi_xpcs\"] "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1",
"metadata": {},
"outputs": [],
"source": [
"from ophyd.sim import det\n",
"det_list = [det]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2",
"metadata": {},
"outputs": [],
"source": [
"RE(bp.count(det_list))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3",
"metadata": {},
"outputs": [],
"source": [
"det = [flag2ad]\n",
"# flag2ad.hdf1.kind=\"omitted\"\n",
"flag2ad.stats1.kind=\"hinted\"\n",
"flag2ad.stats1.total.kind=\"hinted\"\n",
"flag2ad.stats1.max_xy.kind=\"hinted\"\n",
"flag2ad.stats1.max_xy.y.kind=\"hinted\"\n",
"bec.disable_plots()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4",
"metadata": {},
"outputs": [],
"source": [
"RE(bp.rel_scan(det_list, mr2.coarse_pitch, -0.5,0.5,11))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5",
"metadata": {},
"outputs": [],
"source": [
"listobjects()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6",
"metadata": {},
"outputs": [],
"source": [
"sl4.component_names"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7",
"metadata": {},
"outputs": [],
"source": []
}
],
"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.14"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
4 changes: 3 additions & 1 deletion src/instrument/plans/bdp_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
xpcs_header = Signal(name="xpcs_header", value=RE.md.get("xpcs_header", "A001"))
xpcs_index = Signal(name="xpcs_index", value=RE.md.get("xpcs_index", 0))

APS_CYCLE = "2024-2"
DEFAULT_DETECTOR_NAME = "eiger4M"
DM_WORKFLOW_NAME = iconfig.get("DM_WORKFLOW_NAME", "example-01")
TITLE = "BDP_XPCS_demo" # keep this short, single-word
Expand Down Expand Up @@ -264,9 +265,10 @@ def xpcs_bdp_demo_plan(
description=description,
header=xpcs_header.get(),
metadatafile=nxwriter.file_name.name,
index=xpcs_index.get(),
index=xpcs_index.get(),a
dataDir=str(data_path),
concise=dm_concise,
aps_cycle=APS_CYCLE, # TODO: get from apstools
# instrument metadata (expected by nxwriter)
# values from pete7.hdf
# TODO: set from actual instrument values
Expand Down

0 comments on commit 36206ef

Please sign in to comment.