During a heavy-ion storage-ring experiment, one is often in the need of a specific calculator to estimate certain beam kinetic parameters for beam tuning or strategy planning in a timely manner. This toolkit does such jobs. It uses the CSRe@IMP as the example ring, but can easily be adapted to other storage rings by changing the machine parameters in the code to their particular values.
The code is written in Python 3
and mainly consists of two scripts utility.py
and ion_id.py
.
It is preferably imported into a IPython
session or a Jupyter
notebook for interactive processing.
utility.py
:
- conversions between ion's velocity (β and γ), revolution frequency, magnetic rigidity, kinetic energy, as well as the peak location in the Schottky spectrum when the center frequency and span are given
ion_id.py
:
- estimate the location and strength of an ion signal given the
LISE++
simulation result - filter out the unqualified ion candidates owing to the low yields and/or the short half-lives
- identify ions given a Schottky spectrum with multiple peaks
Make sure the following requirements are fulfilled.
Python 3
Numpy
,Pandas
pyqtgraph
,pyQt5
(version >= 5.13.0) (only if GUI is used)- atomic mass database
mass16.txt
- atomic half-life database
nubase2016.txt
- electronic ionization energy
ionization.csv
IPython
/Jupyter
(optional)LISE++
simulation files (only if ion identification is needed)iid_GUI.ui
ui file (only if GUI is used)
You can choose to launch a IPython
session or a Jupyter
notebook and import the scripts as packages, alternatively, to launch the GUI in ternimal.
Simple as that!
Examples for the common-line interface are
import utility as _util
util = _util.Utility(242.9, 500) # frequency window specified by center frequency in MHz, and span in kHz
util.set_ion("58Ni19")
util.set_energy(143.92) # kinetic energy in MeV/u
import ion_id as _iid
iid = _iid.IID("58Ni28.lpp", 242.9, 500) # LISE++ simulation file, center frequency in MHz, span in kHz
iid.calibrate_peak_loc("58Ni28", -140, 161) # identified ion, peak location in kHz within the frequency window, harmonic
To launch the GUI
python iid_GUI.py
For figure-assisted tutorials, see Wiki.
This repository is licensed under the GNU GPLv3.