Python Tools for Control System Access T Levens

  • Slides: 11
Download presentation
Python Tools for Control System Access T. Levens, R. De Maria M. Betz, M.

Python Tools for Control System Access T. Levens, R. De Maria M. Betz, M. Fitterer, C. Hernalsteens + other contributors

Brief overview of available tools • Py. Timber • https: //github. com/rdemaria/pytimber • Py.

Brief overview of available tools • Py. Timber • https: //github. com/rdemaria/pytimber • Py. Japc • https: //gitlab. cern. ch/scripting-tools/pyjapc • cmmnbuild-dep-manager • https: //gitlab. cern. ch/scripting-tools/cmmnbuild-dep-manager

Py. Timber • CERN Accelerator Logging Service (CALS) stores a large quantity of data

Py. Timber • CERN Accelerator Logging Service (CALS) stores a large quantity of data required for analysis of accelerator performance • Timber GUI has analysis capabilities but is difficult to use for complex/automated analysis • Command line tool for extraction only supports a limited subset of features Py. Timber developed to fill the gaps

Py. Timber design criteria Goal: provide a simple interface to CALS for interactive data

Py. Timber design criteria Goal: provide a simple interface to CALS for interactive data analysis: • Get data with a few lines of code • Work well in the typical scientific Python ecosystem (numpy, Jupyter, etc) • Use native python objects for input and output: string, list/dict, np. array • Expose a stable & predictable API • Keep performance under control • Available from lxplus, TN consoles, SWAN, users machines • Reduce prerequisites to the minimum

Py. Timber example More examples…

Py. Timber example More examples…

Py. Timber developments • Developed as an “open source” model… contributions welcome! • Hosted

Py. Timber developments • Developed as an “open source” model… contributions welcome! • Hosted on Git. Hub: https: //github. com/rdemaria/pytimber • Work started on “helper classes” for commonly used data processing • Example for LHC BSRT:

Py. Japc Python script Py. Japc • Access to accelerator devices requires communication via

Py. Japc Python script Py. Japc • Access to accelerator devices requires communication via CMW (RDA+RBAC) • Bindings in C++/Java • Desire for Python support for rapid development and scripting of MDs Py. Japc developed

Py. Japc simple example Setup: Get a parameter: Set a parameter: Get again: Documentation:

Py. Japc simple example Setup: Get a parameter: Set a parameter: Get again: Documentation: https: //wikis. cern. ch/display/ST/Py. Japc Examples: http: //bewww. cern. ch/~bdisoft/pyjapc/examples. html

Booster Diagnostics (Simon Albright) LHC Transverse Damper Diagnostics (Matt Mician) BBQ Viewer (Tom Levens)

Booster Diagnostics (Simon Albright) LHC Transverse Damper Diagnostics (Matt Mician) BBQ Viewer (Tom Levens)

cmmnbuild-dep-manager Py. Timber & Py. Japc use JPype for access to Java classes Requires

cmmnbuild-dep-manager Py. Timber & Py. Japc use JPype for access to Java classes Requires management of Java dependencies (. JAR files) CO provide Common. Build CBNG for this task wrapper in Python New version 2. 0 migrates to CBNG (using web service for resolution) • Please upgrade if you have a local Python installation: pip install cmmnbuild-dep-manager --upgrade --no-deps

Conclusion Various tools have been developed in the past for access to accelerator data

Conclusion Various tools have been developed in the past for access to accelerator data from Python now trying to combine efforts Py. Japc and Py. Timber are now (reasonably) stable • Developed with an open source model – we welcome patches and more developers! Please join MD Scripting Tools community and get involved: https: //wikis. cern. ch/display/ST/Scripting+Tools+Home