thunderboltz.CrossSections
- class thunderboltz.CrossSections(directory=None, input_path=None, read_cs_data=True, cs_dir_name='cross_sections', input_fname=None)[source]
ThunderBoltz cross section set data type. Consists of a set of cross sections each with a file reference and a reaction table.
- Parameters:
directory (str) – The path to a ThunderBoltz simulation directory in which input files are to be written. Default is
None.input_path (str) –
The path to a set of ThunderBoltz input files from which input data can be read. The file structure should be something like:
path/to/input_path |———indeck_file.in <— The main ThunderBoltz indeck file. |———cross_sections <— Cross section directory | |———cs1.dat <— ThunderBoltz-formatted cross section file. | |———cs2.dat <— ThunderBoltz-formatted cross section file. | ... ...
cs_dir_name (str) – The name of the cross section directory.
input_fname (str) – The name of the main ThunderBoltz indeck file. Default is None, in which case the indeck will be searched for in input_path and must end with .in.
Attributes
cs_dir_namePlace for cs files in simulation dir
input_fnameInput deck filename default
tableThe reaction table, with columns
dataData tables for each cross section.
input_pathInput path to default input data
Methods
add_differential_model(rtype, name[, params])Add a differential model to a certain type of process.
add_process(p)Take a Process object and update the cross section data and cross section reaction table.
add_processes(ps)Add multiple cross sections to the reaction table.
Look for indeck file in input_path.
from_LXCat(fname)Load cross section data from an LXCat .txt file
get_deck()Return the string formatted cross section table portion of the ThunderBoltz indeck.
plot_cs([ax, legend, vsig, thresholds])Plot the cross sections models.
read(input_path[, read_cs_data])Read ThunderBoltz cross section data from a directory with a single input file and a set of cross section files.
set_fixed_background([fixed])Set all particle conserving processes to have the FixedParticle2 tag or not.
write([directory])Write cross section files into the simulation cross section directory.