mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Map radiation type to particle type properly in Decay.get_sources
This commit is contained in:
parent
b7596245f2
commit
1b2b5e169c
1 changed files with 15 additions and 5 deletions
|
|
@ -511,11 +511,21 @@ class Decay(EqualityMixin):
|
|||
sources = {}
|
||||
name = self.nuclide['name']
|
||||
for particle, spectra in self.spectra.items():
|
||||
# Only handle gammas for now
|
||||
if particle not in ('gamma', 'xray'):
|
||||
continue
|
||||
# TODO: Set particle type based on 'particle' above
|
||||
particle_type = 'photon'
|
||||
# Set particle type based on 'particle' above
|
||||
particle_type = {
|
||||
'gamma': 'photon',
|
||||
'beta-': 'electron',
|
||||
'ec/beta+': 'positron',
|
||||
'alpha': 'alpha',
|
||||
'n': 'neutron',
|
||||
'sf': 'fragment',
|
||||
'p': 'proton',
|
||||
'e-': 'electron',
|
||||
'xray': 'photon',
|
||||
'anti-neutrino': 'anti-neutrino',
|
||||
'neutrino': 'neutrino',
|
||||
}[particle]
|
||||
|
||||
if particle_type not in sources:
|
||||
sources[particle_type] = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue