Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 68 additions & 12 deletions docs/notebooks/control_system.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
"ophyd-asynch interface to pyaml: \\\n",
"pip install pyaml-oa-cs \n",
"\n",
"If the above packages are installed the examples below will work (also in the same script)"
"If the above packages are installed the examples below will work \n",
"\n",
"Different accelerators, with different magnet names can operate with their own control system within the same script\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "ae7657cc",
"metadata": {},
"outputs": [],
Expand All @@ -52,26 +54,32 @@
" tango_host: ebs-simu-3:10000\n",
" name: live\n",
"...\n",
"powerconverter:\n",
" type: tango.pyaml.attribute\n",
"...\n",
"tune_h:\n",
" type: tango.pyaml.attribute_read_only\n",
"...\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "86dec08e",
"metadata": {},
"outputs": [],
"source": [
"# work with TANGO\n",
"SR_Tango: Accelerator = Accelerator.load(\"../../tests/config/EBSTune_TANGO.yaml\")"
"# SR_Tango: Accelerator = Accelerator.load(\"../../tests/config/EBSTune.yaml\")"
]
},
{
"cell_type": "markdown",
"id": "a61409b3",
"metadata": {},
"source": [
"Assuming these lines are present in ../../tests/config/EBSTune_OPHYDASYNCH.yaml\n",
"Assuming these lines are present in ../../tests/config/EBSTuneOA.yaml\n",
"```\n",
"type: pyaml.accelerator\n",
"name: sr\n",
Expand All @@ -80,26 +88,74 @@
" - type: pyaml-cs-oa.pyaml.controlsystem\n",
" name: live\n",
"...\n",
" powerconverter:\n",
" type: pyaml_cs_oa.tangoRW\n",
"...\n",
" tune_h:\n",
" type: pyaml_cs_oa.tangoR\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "637bc8cf",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"20 Jan 2026, 13:33:59 | WARNING | OA control system binding for PyAML initialized with name 'live' and prefix='//ebs-simu-3:10000/'\n"
]
}
],
"source": [
"# work with Ophyd-Asynch\n",
"SR_OphydAsynch: Accelerator = Accelerator.load(\n",
" \"../../tests/config/EBSTune_OPHYDASYNCH.yaml\"\n",
"# work with Ophyd-Asynch - tango\n",
"SR_OphydAsynch_Tango: Accelerator = Accelerator.load(\n",
" \"../../tests/config/EBSTuneOATango.yaml\"\n",
")"
]
},
{
"cell_type": "markdown",
"id": "62dfee77",
"metadata": {},
"source": [
"Assuming these lines are present in ../../tests/config/EBSTuneOAEpics.yaml\n",
"```\n",
"type: pyaml.accelerator\n",
"name: sr\n",
"energy: 6e9\n",
"controls:\n",
" - type: pyaml-cs-oa.pyaml.controlsystem\n",
" name: live\n",
"...\n",
" powerconverter:\n",
" type: pyaml_cs_oa.epicsRW\n",
"...\n",
" tune_h:\n",
" type: pyaml_cs_oa.epicsR\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "c1b749c1",
"metadata": {},
"outputs": [],
"source": [
"# work with Ophyd-Asynch - tango\n",
"# SR_OphydAsynch_Epics: Accelerator = Accelerator.load(\n",
"# \"../../tests/config/EBSTuneOAEpics.yaml\"\n",
"# )"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "pyaml_venv",
"language": "python",
"name": "python3"
},
Expand All @@ -113,7 +169,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.14.0"
}
},
"nbformat": 4,
Expand Down
Loading
Loading