This python library can be used to perform calculations
in the framework of the Confined β-soft (CBS) Rotor Model [1]
and provide levelschemes for the comparison to experimental data.
It is based on the program cbsmodel
[2] by M. Reese and
basically shares its syntax.
- cbsmodel [2]
- python (> 3.6)
- numpy
- matplotlib
- uncertainties
CBSplot
can be obtained by cloning this repository to the local system and running
pip3 install CBSplot/
in the command line.
An introduction to the syntax of cbsmodel
is given in its manual [2].
The library CBSplot
requires the following three text files:
input_file
containing allcbsmodel
commands,- the CBS data file containing all levels and transitions the CBS is adapted to, and
exp_data_file
containing all levels and transitions to be plotted in the experimental level scheme.
The first two files are known from traditional calculations using cbsmodel
and do not need to be rewritten for usage with CBSplot
.
The last file uses the same syntax as the CBS data file.
In order to apply CBSplot
to the nucleus 154Sm, the following code can be used:
import CBSplot as cbs
cbs_154Sm = cbs.CBSplot(nucleus=['Sm',62,92],
input_file=input_file.cbs,
exp_data_file=exp_data_file.ET,
out_path='~/my/CBS/calculations',
write_output=True)
cbs_154Sm.run()
cbs_154Sm.plot()
The methods run()
and plot()
perform the CBS calculations and plot the results, respectively.
If write_output
is True
, the CBS parameters and all calculated quantities are stored in
the output file results_154Sm.txt
and stored in the directory specified by out_path
.
If the output quantities have to be further processed, they can be obtained by
cbs_154Sm.cbs_energies
cbs_154Sm.cbs_BE2
cbs_154Sm.cbs_ME2
cbs_154Sm.cbs_rho2E0
Similarly, the experimental values, which are used for the creation of the levelscheme, can be accessed via
cbs_154Sm.exp_energies
cbs_154Sm.exp_BE2
cbs_154Sm.exp_rho2E0
Finally, the set of CBS parameters (rb, Bbm2, bmax, etc.) and the reduced chisquare of the fit can be obtained from
cbs_154Sm.fit_params
cbs_154Sm.red_chi
A minimal example can be found in the example directory.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
ou should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Copyright (C) 2020 Tobias Beck (tbeck@ikp.tu-darmstadt.de)
[1] N. Pietralla and O.M. Gorbachenko, Phys. Rev. C 70, 011304(R) (2004). doi:10.1103/PhysRevC.70.011304
.
[2] M. Reese (2008), cbsmodel
.
A maintained version can be obtained here.