Supernova Models: snewpy.models

Base Class for Supernova Models

class snewpy.models.base.SupernovaModel(time, metadata)[source]

Base class defining an interface to a supernova model.

Initialize supernova model base class (call this method in the subclass constructor as super().__init__(time,metadata)).

Parameters:
  • time (ndarray of astropy.Quantity) – Time points where the model flux is defined. Must be array of Quantity, with units convertable to “second”.

  • metadata (dict) – Dict of model parameters <name>:<value>, to be used for printing table in __repr__() and _repr_markdown_()

get_flux(t, E, distance, flavor_xform=<snewpy.flavor_transformation.NoTransformation object>)[source]

Get neutrino flux through 1cm^2 surface at the given distance

Parameters:
  • t (astropy.Quantity) – Time to evaluate the neutrino spectra.

  • E (astropy.Quantity or ndarray of astropy.Quantity) – Energies to evaluate the the neutrino spectra.

  • distance (astropy.Quantity or float (in kpc)) – Distance from supernova.

  • flavor_xform (FlavorTransformation) – An instance from the flavor_transformation module.

Returns:

dict – Dictionary of neutrino fluxes in [neutrinos/(cm^2*erg*s)], keyed by neutrino flavor.

abstract get_initial_spectra(t, E, flavors=<enum 'Flavor'>)[source]

Get neutrino spectra at the source.

Parameters:
  • t (astropy.Quantity) – Time to evaluate initial spectra.

  • E (astropy.Quantity or ndarray of astropy.Quantity) – Energies to evaluate the initial spectra.

  • flavors (iterable of snewpy.neutrino.Flavor) – Return spectra for these flavors only (default: all)

Returns:

initialspectra (dict) – Dictionary of neutrino spectra, keyed by neutrino flavor.

get_time()[source]
Returns:

ndarray of astropy.Quantity – Snapshot times from the simulation

get_transformed_spectra(t, E, flavor_xform)[source]

Get neutrino spectra after applying oscillation.

Parameters:
  • t (astropy.Quantity) – Time to evaluate initial and oscillated spectra.

  • E (astropy.Quantity or ndarray of astropy.Quantity) – Energies to evaluate the initial and oscillated spectra.

  • flavor_xform (FlavorTransformation) – An instance from the flavor_transformation module.

Returns:

dict – Dictionary of transformed spectra, keyed by neutrino flavor.

Derived Models

Core-Collapse Supernova Models

The submodule snewpy.models.ccsn contains models of core-collapse supernovae derived from the SupernovaModel base class.

Since SNEWPY v1.3, the prefered method is to initialise a model based on its physics parameters. Initialisation from a file name is deprecated.

Use the param class property to view all physics parameters and their possible values:

>>> from snewpy.models.ccsn import Nakazato_2013
>>> Nakazato_2013.param
{'progenitor_mass': <Quantity [13., 20., 30., 50.] solMass>,
 'revival_time': <Quantity [  0., 100., 200., 300.] ms>,
 'metallicity': [0.02, 0.004],
 'eos': ['LS220', 'shen', 'togashi']}

For some models, not all combinations of parameters are valid. Use the get_param_combinations() class method to get a list of all valid combinations and filter it:

>>> list(params for params in Nakazato_2013.get_param_combinations() if params['eos'] != 'shen')
[{'progenitor_mass': <Quantity 30. solMass>, 'revival_time': <Quantity 0. ms>,
  'metallicity': 0.004, 'eos': 'LS220'},
 {'progenitor_mass': <Quantity 30. solMass>, 'revival_time': <Quantity 0. ms>,
  'metallicity': 0.004, 'eos': 'togashi'}]
class snewpy.models.ccsn.Bollig_2016(filename: str = None, progenitor_mass: Quantity = None, eos: str = 'LS220')[source]

Model based on simulations from Bollig et al. (2016). Models were taken, with permission, from the Garching Supernova Archive.

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [11.2 27. ] solMass.

  • eos – Equation of state. Valid values are: [‘LS220’].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Fornax_2019(filename: str = None, cache_flux=False, *, progenitor_mass=None)[source]

Model based on 3D simulations from D. Vartanyan, A. Burrows, D. Radice, M. A. Skinner and J. Dolence, MNRAS 482(1):351, 2019. Data available at https://www.astro.princeton.edu/~burrows/nu-emissions.3d/

Parameters:
  • cache_flux (bool) – If true, pre-compute the flux on a fixed angular grid and store the values in a FITS file.

  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [ 9. 10. 12. 13. 14. 15. 16. 19. 25. 60.] solMass.

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Fornax_2021(filename: str = None, progenitor_mass: Quantity = None)[source]

Model based on 3D simulations from D. Vartanyan, A. Burrows, D. Radice, M. A. Skinner and J. Dolence, MNRAS 482(1):351, 2019. Data available at https://www.astro.princeton.edu/~burrows/nu-emissions.3d/

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [12..23, 25, 26, 26.99] solMass.

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Fornax_2022(progenitor_mass: Quantity)[source]

Model based on 2D simulations of 100 progenitors from Tianshu Wang, David Vartanyan, Adam Burrows, and Matthew S.B. Coleman, MNRAS 517:543, 2022. Data available at https://www.astro.princeton.edu/~burrows/nu-emissions.2d.large/

Parameters:

progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [ 9. 9.25 9.5 9.75 10. 10.25 10.5 10.75 11. 11.25 11.5 11.75 12. 12.03 12.07 12.1 12.13 12.15 12.18 12.2 12.25 12.33 12.4 12.45 12.5 12.54 12.6 12.63 12.7 12.72 12.75 12.8 12.85 12.9 12.93 12.97 13. 13.05 13.11 13.25 13.27 13.32 13.4 13.45 13.5 13.6 13.75 13.82 13.9 13.96 14.01 14.13 14.25 14.4 14.41 14.43 14.44 14.7 14.87 15. 15.01 15.04 15.05 15.38 16.43 16.65 16.99 17. 17.07 17.1 17.4 17.48 17.5 17.51 17.83 18.04 18.05 18.09 18.1 18.5 19.02 19.56 19.83 19.99 20.08 20.09 20.18 20.37 21. 21.68 22. 22.3 22.82 23. 23.04 23.43 24. 25. 26. 26.99] solMass.

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Kuroda_2020(filename: str = None, mass=None, *, rotational_velocity=None, magnetic_field_exponent=None, eos='LS220', progenitor_mass=<Quantity 20. solMass>)[source]

Model based on simulations from Kuroda et al. (2020).

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • rotational_velocity – Rotational velocity of progenitor. Valid values are: [0. 1.] rad / s.

  • magnetic_field_exponent – Exponent of magnetic field (See Eq. 46). Valid values are: [0, 12, 13].

  • eos – Equation of state. Valid values are: [‘LS220’].

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [<Quantity 20. solMass>].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Mori_2023(axion_mass: ~astropy.units.quantity.Quantity, axion_coupling: ~astropy.units.quantity.Quantity, *, progenitor_mass=<Quantity 20. solMass>)[source]

Model based on 2D simulations with axionlike particles, K. Mori, T. Takiwaki, K. Kotake and S. Horiuchi, Phys. Rev. D 108:063027, 2023. All models are based on the non-rotating 20 M_sun solar metallicity progenitor model from S.E. Woolsey and A. Heger, Phys. Rep. 442:269, 2007. Data from private communication.

Parameters:
  • axion_mass – Axion mass in units of MeV. Valid values are: [ 0. 100. 200.] MeV.

  • axion_coupling – Axion-photon coupling, in units of 1e-10/GeV. Valid values are: [ 0. 2. 4. 6. 8. 10. 12. 14. 16. 20.] 1e-10 / GeV.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [20.] solMass.

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Nakazato_2013(filename: str = None, progenitor_mass: Quantity = None, revival_time: Quantity = None, metallicity: float = None, eos: str = None)[source]

Model based on simulations from Nakazato et al., ApJ S 205:2 (2013), ApJ 804:75 (2015), PASJ 73:639 (2021). See also http://asphwww.ph.noda.tus.ac.jp/snn/.

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [13. 20. 30. 50.] solMass.

  • revival_time – Time of shock revival in model in units ms. Valid values are: [ 0. 100. 200. 300.] ms.

  • metallicity – Progenitor metallicity. Valid values are: [0.02, 0.004].

  • eos – Equation of state. Valid values are: [‘LS220’, ‘shen’, ‘togashi’].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.OConnor_2013(base=None, mass=None, eos='LS220', *, progenitor_mass=None)[source]
Parameters:
  • base (str) – Absolute or relative path folder with model data. This argument is deprecated.

  • mass (int) – Mass of model progenitor in units Msun. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [12..33, 35..5..60, 70, 80, 100, 120] solMass.

  • eos – Equation of state. Valid values are: [‘HShen’, ‘LS220’].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.OConnor_2015(filename: str = None, progenitor_mass: ~astropy.units.quantity.Quantity = <Quantity 40. solMass>, *, eos='LS220')[source]

Model based on the black hole formation simulation in O’Connor (2015).

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [<Quantity 40. solMass>].

  • eos – Equation of state. Valid values are: [‘LS220’].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Sukhbold_2015(filename: str = None, progenitor_mass: Quantity = None, eos: str = None)[source]

Model based on simulations from Sukhbold et al., ApJ 821:38,2016. Models were shared privately by email.

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [27. 9.6] solMass.

  • eos – Equation of state. Valid values are: [‘LS220’, ‘SFHo’].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Tamborra_2014(filename: str = None, *, progenitor_mass: Quantity = None, direction: int = None, eos='LS220')[source]

Model based on 3D simulations from Tamborra et al., PRD 90:045032, 2014. Data files are from the Garching Supernova Archive.

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [11.2 20. 27. ] solMass.

  • direction – Direction. Valid values are: [1, 2, 3].

  • eos – Equation of state. Valid values are: [‘LS220’].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Walk_2018(filename: str = None, *, progenitor_mass: ~astropy.units.quantity.Quantity = <Quantity 15. solMass>, rotation: str = None, direction: int = None, eos='LS220')[source]

Model based on SASI-dominated simulations from Walk et al., PRD 98:123001, 2018. Data files are from the Garching Supernova Archive.

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [15.] solMass.

  • rotation – Rotation. Valid values are: [‘fast’, ‘slow’, ‘non’].

  • direction – Direction. Valid values are: [1, 2, 3].

  • eos – Equation of state. Valid values are: [‘LS220’].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Walk_2019(filename: str = None, *, progenitor_mass: Quantity = None, direction: int = None, eos='LS220')[source]

Model based on SASI-dominated simulations from Walk et al., PRD 101:123013, 2019. Data files are from the Garching Supernova Archive.

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [40. 75.] solMass.

  • direction – Direction. Valid values are: [1, 2, 3].

  • eos – Equation of state. Valid values are: [‘LS220’].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Warren_2020(filename: str = None, *, progenitor_mass=None, turbmixing_param=None, eos='SFHo')[source]

Model based on simulations from Warren et al., ApJ 898:139, 2020. Neutrino fluxes available at https://doi.org/10.5281/zenodo.3667908.

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [9..0.25..13, 13..0.1..30, 31..33, 35..5..60, 70, 80, 100, 120] solMass.

  • turbmixing_param – Turbulent mixing parameter alpha_lambda. Valid values are: [1.23, 1.25, 1.27].

  • eos – Equation of state. Valid values are: [‘SFHo’].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.ccsn.Zha_2021(filename: str = None, *, progenitor_mass: Quantity = None, eos='STOS_B145')[source]

Model based on the hadron-quark phse transition models from Zha et al. 2021.

Parameters:
  • filename (str) – Absolute or relative path to the file with model data. This argument is deprecated.

  • progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [16..26, 19.89, 22.39, 30, 33] solMass.

  • eos – Equation of state. Valid values are: [‘STOS_B145’].

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

Presupernova Models

The submodule snewpy.models.presn contains models of presupernova neutrino fluxes, derived from the SupernovaModel base class.

class snewpy.models.presn.Kato_2017(progenitor_mass: Quantity)[source]

Presupernova model based on Chinami Kato et al. 2017 ApJ 848 48

Dataset available on Zenodo

Parameters:

progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [12. 15.] solMass.

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.presn.Odrzywolek_2010(progenitor_mass: Quantity)[source]

Presupernova model based on A.Odrzywolek, Alexander Heger, Acta Phys.Polon.B 41 (2010)

Dataset available on Odrzywolek’s website

Parameters:

progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [15. 25.] solMass.

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

class snewpy.models.presn.Patton_2017(progenitor_mass: Quantity)[source]

Presupernova model based on Kelly M. Patton et al. 2017 ApJ 851 6

Dataset available on Zenodo (DOI:10.5281/zenodo.2626645)

Parameters:

progenitor_mass – Mass of model progenitor in units Msun. Valid values are: [15. 30.] solMass.

Raises:
  • FileNotFoundError – If a file for the chosen model parameters cannot be found

  • ValueError – If a combination of parameters is invalid when loading from parameters

Other Models

class snewpy.models.ccsn.Analytic3Species(filename)[source]

An analytical model calculating spectra given total luminosity, average energy, and rms or pinch, for each species.

Parameters:

filename (str) – Absolute or relative path to file with model data.

class snewpy.models.ccsn.SNOwGLoBES(tarfilename)[source]

A model that does not inherit from SupernovaModel (yet) and imports a group of SNOwGLoBES files.

Parameters:

tarfilename (str) – Absolute or relative path to tar archive with SNOwGLoBES files.

get_fluence(t)[source]

Return the fluence at a given time t.

Parameters:

t (float) – Time in seconds.

Returns:

fluence (dict) – A dictionary giving fluence at time t, keyed by flavor.