SNEWS2 / snewpy

A Python package for working with supernova neutrinos
https://snewpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
24 stars 17 forks source link

Issues with number luminosity computation at small energies #298

Closed soso128 closed 5 months ago

soso128 commented 5 months ago

To compute the neutrino number luminosity, the energy luminosity is divided by the neutrino energy itself (Fornax models) or the mean energy (pinched spectra). To avoid computational issues, the zero value of the neutrino energy is set to a smal value, epsilon. This treatment is associated with issues for the Fornax models and for pinched spectra.

  1. Fornax models:

The definition of the epsilon for the neutrino energy E and for the binned log energies logEbin are inconsistent when E is not in MeVs. The impact of this inconsistency on the number luminosities is shown in the figures below for the Fornax_2021 model with a 12Msun progenitor (top = current version, bottom = bug fixed).

number_luminosity_lum_spec_12M_r10000 number_luminosity_lum_spec_12M_r10000_bugfix

  1. Pinched spectra

When both the neutrino energy and the mean energy are small, the number luminosity can take strange, epsilon-dependent values, as can be seen in the figure below for the Nakazato_2013 model with the Shen equation of state, a 20Msun progenitor, z = 0.02, and a revival time of 300ms.

number_luminosity_nakazato-shen-z0 02-t_rev300ms-s20 0

This issue can be fixed by setting the number luminosity at zero neutrino energy to always be 0 (as it should be for a pinched spectrum). You can see the effect on the neutrino luminosity below.

number_luminosity_nakazato-shen-z0 02-t_rev300ms-s20 0_bugfix

Sheshuk commented 5 months ago

@soso128 Thanks for investigating and fixing this issue!