Using Python to visualize and analyze ion beam experiment data at a particle accelerator facility by Caswell Pieters

7b0645f018c0bddc8ce3900ccc3ba70c?s=47 Pycon ZA
October 11, 2019

Using Python to visualize and analyze ion beam experiment data at a particle accelerator facility by Caswell Pieters

The electrostatic Tandetron accelerator of the Materials Research Department at iThemba LABS is used primarily for conducting research in the field of Ion Beam Analysis.

The field comprises of several techniques, one of which is Real Time In-Situ Rutherford Backscattering Spectrometry. This technique studies elemental composition and depth profiling during the formation of metal silicides, in real time, while the sample material is thermally annealed. Data for these experiments must be acquired by reading out electronics modules, and visualized/analyzed both during the experiment, and offline.

Data acquisition is done using largely in-house developed software built on top of open-source frameworks. The offline analysis, visualization and manipulation of this data, which includes the creation of contour and 3 dimensional plots of the backscattered particle histograms over time, is done using Python in combination with the ROOT data analysis framework developed at CERN. ROOT has an extension module named PyRoot, that allows interaction with ROOT functions and data structures from Python.

This talks discusses how the software was developed to achieve that, as well as how Python is used during a live experiment to log information about the state of the experiment and display that data using an ELK stack. While this is a case study in creating specific software tools to handle data from a novel physics experiment, it would be of general interest to anybody wanting to visualize data or do logging using Python.


Pycon ZA

October 11, 2019


  1. Using Python to visualize and analyze ion beam experiment data

    at a particle accelerator facility Caswell Pieters iThemba LABS
  2. iThemba LABS (Cape Town) • National Research Foundation • Multi-disciplinary

    Physics Laboratory • Nuclear Physics • Materials Research • Nuclear Medicine • Radioisotope Production • 2 Particle accelerators (200MeV Cyclotron, 3MV Tandetron)
  3. 200MeV Separated Sector Cyclotron • Maximum energy of 200 MeV

    1 MeV = 1,60218e-13 Joule 1 MeV = 3.82930210341e-12 kcal • Research and Training • Nuclear and accelerator physics • Radionuclide production
  4. 200MeV Separated Sector Cyclotron

  5. 3MV Tandetron accelerator • Digitally controlled 3MV electrostatic accelerator •

    Built 2015-2016 High Voltage Engineering, Netherlands • Primarily produces beams of protons and alpha particles • 2 Experimental beam lines (micro beams μm/nm and broad beams mm)
  6. Beamlines

  7. IBA Experimental Techniques • Scanning Nuclear Microprobe • In-Situ Real

    time Rutherford Backscattering • Channeling Rutherford Backscattering
  8. IBA techniques

  9. DAQ

  10. IBA computing requirements • Read out acquisition electronics (ADC’s, scalers,

    charge) • Slow control (stepper motors, beam scanners,etc ) • Data acquisition run control • Data formatting and storage • Visualize data online and offline • Analyze data
  11. The Nuclear Microprobe • Oxford Microbeams Nuclear Microprobe (1991) •

    Elemental composition of solids (geology, material science, biology) • Proton beam (keV→MeV) •Charateristic X-rays • Beam scanning
  12. NMP scanning • Up to 256 x 256 pixels •

    Typical area of 2669μm • Dwell time per pixel (10ms)
  13. In-Situ Real time RBS • Rutherford Backscattering • Elemental composition

    and depth information • Temperature controlled oven • Thermal annealing (metal silicides) • Visualize data online and offline • Analyze data
  14. Channeling (RBS) • Investigate crystalline materials • Channeling of charged

    particles in crystalline grid of sample • Determine the lattice position of impurities several relevant crystallographic directions
  15. Energy spectra

  16. Root and Python • Data Analysis framework developed at CERN • Scientific Software Toolkit • Data processing, statistical analysis, visualization and storage • C++ • PyROOT is a Python extension module that allows the user to interact with any ROOT class
  17. Plotly • Python, R, Javascript • • Interactive graphing

    lib for python • Browser based • Scientific charts, 3D graphs, statistical charts, SVG maps, financial charts • Jupyter notebook support
  18. Thank you for your attention.