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
Sometimes running the calculation of the neutrino spectra from the models produce runtime warnings, even when the calculation is within the valid range. These warnings are of no concern to user and just flood the logs
.../snewpy/python/snewpy/models/base.py:305: RuntimeWarning: divide by zero encountered in log
np.exp(np.log(L) - (2+a)*np.log(Ea) + (1+a)*np.log(1+a)
.../snewpy/python/snewpy/models/base.py:305: RuntimeWarning: invalid value encountered in subtract
np.exp(np.log(L) - (2+a)*np.log(Ea) + (1+a)*np.log(1+a)
.../snewpy/python/snewpy/models/base.py:306: RuntimeWarning: divide by zero encountered in divide
- loggamma(1+a) + a*np.log(E) - (1+a)*(E/Ea)) / (u.erg * u.s)
This makes no problem in the final spectra/flux array, because all the NaN/inf values get filled as zero in the final result, but the warnings are a nuisance and should be suppressed.
The text was updated successfully, but these errors were encountered:
Sometimes running the calculation of the neutrino spectra from the models produce runtime warnings, even when the calculation is within the valid range. These warnings are of no concern to user and just flood the logs
Example:
produces following warnings:
This makes no problem in the final spectra/flux array, because all the NaN/inf values get filled as zero in the final result, but the warnings are a nuisance and should be suppressed.
The text was updated successfully, but these errors were encountered: