Download presentation
Presentation is loading. Please wait.
Published byAlan Moris Cummings Modified over 8 years ago
1
VELA Controls in Mathematica James Jones ASTeC, Daresbury Laboratory 11 th July 2014
2
Why Mathematica? Mathematica provides a rapid-prototyping environment – Wide range of in-built functionality – From simple, to very complex, plotting capabilities – GUI constructions available – Interface to JAVA and.NET with low overhead However, not useful for long term control use – Expensive! – No compilation of code available
3
Simulations Additionally, large body of simulation work has been performed in Mathematica – Interface to GPT, Elegant, MAD, MAD-X – Interpreters for SDDS, tfs, GDF, ASTRA &c. For ALICE, complete GUI based simulation tool was created in MMA – Interfaced to MAD/MLC – Linear optics calculations – Optimisation routines built in
4
ALICE Controls
5
EPICS There is no (AFAIK) “native” interface to EPICS for Mathematica Solution is to leverage external interfaces into Mathematica: – ActiveX – Interface using native.NET capability –.NET – Simple.NET interface by G. Cox – Python – use Pythonika and PyEPICS – JAVA – use MMA native JAVA interface ??
6
ActiveX &.NET Utilises MMA native.NET capability for fast communications ActiveX Requires caRepeater – Still quite slow – Very buggy – No longer supported.NET interface from G. Cox is fast, but: – No arrays – Known memory leak causes crashes…!
7
Pythonika Utilises c-based interface to MMA and Python – Runs Python shell in the background Type conversion between Python & MMA done on the fly – no user input required Use PyEPICS interface in Python and “push” python commands via Pythonika Can use arrays “Very” fast – Can capture camera at ~6Hz
8
Other Stuff Can use Mathematica to import a wide variety of data types – Text files(!) – Images – Excel Spreadsheets Example: – Image analysis on VELA – Utilises compiled C-program to do pseudo-colour
9
Image Analysis
10
Programs Quad-scans Sol scans Image analysis BPM data analysis Slit-scans BURT Degaussing
11
Conclusion Mathematica provides a useful prototyping environment – Quick, small programs are perfect! Has various interfaces to EPICS with native type- casting Too expensive for production use! Python interface allows combine Python and Mathematica Can use for prototyping Python in an interactive environment…
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.