Vectorize probabilities in `FlavorTransformation`
Sheshuk opened this issue · comments
Currently FlavorTransformation.prob_ee
and similar methods take time and energy as arguments.
These arguments can be arrays of values:
snewpy/python/snewpy/flavor_transformation.py
Lines 39 to 52 in 08c3b84
However the probabilities are often output as scalars, or as vectors only in E
.
I suggest making the output universal: it should always be an array of shape (len(t), len(E))
(or scalar if both are scalars), even if the probability doesn't depend on E
or t
. This will make it easier for vectorized calculations, and more clear to the user.