diff --git a/fuse/plugins/micro_physics/yields.py b/fuse/plugins/micro_physics/yields.py index 26f66a6e..56653d71 100644 --- a/fuse/plugins/micro_physics/yields.py +++ b/fuse/plugins/micro_physics/yields.py @@ -23,7 +23,7 @@ class NestYields(FuseBasePlugin): """Plugin that calculates the number of photons, electrons and excitons produced by energy deposit using nestpy.""" - __version__ = "0.2.1" + __version__ = "0.2.2" depends_on = ("interactions_in_roi", "electric_field_values") provides = "quanta" @@ -132,22 +132,18 @@ def _quanta_from_NEST(en, model, e_field, A, Z, create_s2, **kwargs): # https://github.com/NESTCollaboration/nestpy/blob/e82c71f864d7362fee87989ed642cd875845ae3e/src/nestpy/helpers.py#L94-L100 if model == 0 and en > 2e2: log.warning( - f"Energy deposition of {en} keV beyond NEST validity " - "for NR model of 200 keV - Remove Interaction" + f"Energy deposition of {en} keV beyond NEST validity " "for NR model of 200 keV" ) - return -1, -1, -1 + if model == 7 and en > 3e3: log.warning( - f"Energy deposition of {en} keV beyond NEST validity " - "for gamma model of 3 MeV - Remove Interaction" + f"Energy deposition of {en} keV beyond NEST validity " "for gamma model of 3 MeV" ) - return -1, -1, -1 + if model == 8 and en > 3e3: log.warning( - f"Energy deposition of {en} keV beyond NEST validity " - "for beta model of 3 MeV - Remove Interaction" + f"Energy deposition of {en} keV beyond NEST validity " "for beta model of 3 MeV" ) - return -1, -1, -1 y = nc.GetYields( interaction=nestpy.INTERACTION_TYPE(model), diff --git a/tests/test_MicroPhysics_alt_Yields.py b/tests/test_MicroPhysics_alt_Yields.py index 03d182b6..9f1fad4b 100644 --- a/tests/test_MicroPhysics_alt_Yields.py +++ b/tests/test_MicroPhysics_alt_Yields.py @@ -17,7 +17,7 @@ def yields_dummy_func(x): To be used as a dummy function for the BetaYields plugin. Needs to be defined outside the test class to be picklable. """ - return 40 + return 40, 30 class TestAlternativeYields(unittest.TestCase):