Skip to content

Commit

Permalink
Removed Constraints on Yield Generators within helpers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Rischbieter committed May 23, 2024
1 parent fb3804e commit 43755f9
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/nestpy/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
Main ingredients for the above steps:
1. np.vectorize, dictionary with yields, field array and energy array.
- Note: some of the yields will crash the plots at too high of energies (way above physical meaning)
so np.nan is returned to keep things running.
"""

import numpy as np
Expand Down Expand Up @@ -105,13 +103,6 @@ def GetYieldsVectorized(interaction, yield_type, nc=None, **kwargs):
else:
interaction_object = interaction

if 'energy' in kwargs.keys():
if interaction_object == GetInteractionObject('nr') and kwargs['energy'] > 2e2:
return np.nan
if interaction_object == GetInteractionObject('gammaray') and kwargs['energy'] > 3e3:
return np.nan
if interaction_object == GetInteractionObject('beta') and kwargs['energy'] > 3e3:
return np.nan
yield_object = nc.GetYields(interaction = interaction_object, **kwargs)
# returns the yields for the type of yield we are considering
return getattr(yield_object, yield_type)
Expand Down

0 comments on commit 43755f9

Please sign in to comment.