pynucastro.networks.helper module

pynucastro.networks.helper module#

Methods to ease the creation of networks.

pynucastro.networks.helper.get_net_class(*, network_type='python')[source]#

Given a network_type, return the class that constructs that type.

Parameters:

network_type (str) –

The type of network to create. Allowed values are:

Return type:

PythonNetwork, SimpleCxxNetwork, AmrexAstroCxxNetwork, FortranNetwork

pynucastro.networks.helper.network_helper(nuclei, *, network_type='python', inert_nuclei=None, main_library='reaclib', use_detailed_balance=True, use_tabular_rates=True, tabular_ordering=None, with_reverse=True, verbose=False)[source]#

Generate a basic network connecting all of the input nuclei using all of the rates known to pynucastro.

Parameters:
  • nuclei (Iterable(Nucleus) or Iterable(str)) – the nuclei to use for the network. In addition of names of nuclei, ranges of masses for the same element can be specified in a string like “ni56-58”, or comma-separated like “ni56,58,60”.

  • network_type (str) –

    The type of network to create. Allowed values are:

  • inert_nuclei (list, tuple) – an iterable of Nuclei that should be part of the collection but are not linked via reactions to the other Nuclei in the network.

  • main_library (str) –

    Which library, ReacLib or StarLib, is used as the main rate source? Allowed values are:

    • ”reaclib” : use the ReacLib library

    • ”starlib” : use the StarLib library

  • use_detailed_balanace (bool) – Do we rederive inverse rates using detailed balance?

  • use_tabular_rates (bool) – Do we include tabulated weak rates?

  • tabular_ordering (Iterable(str)) – If we are including tabular rates, a list of sources can be provided to specify which rate sources are used, and the priority that each source should have.

  • with_reverse (bool) – Do we include the reverse rates from ReacLib?

  • verbose (bool) – Output more information

Return type:

PythonNetwork, SimpleCxxNetwork, AmrexAstroCxxNetwork, FortranNetwork