You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dictionary containing the SciPy interpolation objects in source.py (Link to definition uses the enumeration items of asteria.neutrino.Flavor as keys. More specifically, it uses the object location of those enumeration items as part of those keys.
When the upcoming SimulationHandler parses the simulation flavor configuration, it creates and stores its own instances of <enum 'Flavor'> objects. So, when comparing the instances created by the handler to those used to define the source objects, the equality operator returns false, due to the fact that their location is not the same. According to the Python dict documentation, only hashable (fixed) values should be used as keys. The name and value members of the flavor enumeration items are suitable for this, but in order to use these, the __hash__ and __eq__ methods must be overwritten.
It is not sufficient to only change the keys used to define the dictionaries mentioned above. The attached figures show the expected DOM signal (top), and the DOM signal having changed only the definition of the dictionary keys to use the flavor names (bottom). The cause of this difference is not yet understood.
Expected DOM Signal.
DOM Signal having changed only key definitions in source.py
The text was updated successfully, but these errors were encountered:
The dictionary containing the SciPy interpolation objects in
source.py
(Link to definition uses the enumeration items ofasteria.neutrino.Flavor
as keys. More specifically, it uses the object location of those enumeration items as part of those keys.When the upcoming SimulationHandler parses the simulation flavor configuration, it creates and stores its own instances of
<enum 'Flavor'>
objects. So, when comparing the instances created by the handler to those used to define the source objects, the equality operator returns false, due to the fact that their location is not the same. According to the Python dict documentation, only hashable (fixed) values should be used as keys. Thename
andvalue
members of the flavor enumeration items are suitable for this, but in order to use these, the__hash__
and__eq__
methods must be overwritten.It is not sufficient to only change the keys used to define the dictionaries mentioned above. The attached figures show the expected DOM signal (top), and the DOM signal having changed only the definition of the dictionary keys to use the flavor names (bottom). The cause of this difference is not yet understood.
Expected DOM Signal.

DOM Signal having changed only key definitions in

source.py
The text was updated successfully, but these errors were encountered: