ui

Main user interface of the expertsystem.

This module contains the functions that you need for the most common use cases of the expertsystem. See the Quickstart.

class SolvingMode(value)[source]

Bases: enum.Enum

Types of modes for solving.

Fast = 1

find “likeliest” solutions only

Full = 2

find all possible solutions

class StateTransitionManager(initial_state: Sequence[Union[str, Tuple[str, Sequence[float]]]], final_state: Sequence[Union[str, Tuple[str, Sequence[float]]]], particles: Optional[expertsystem.particle.ParticleCollection] = None, allowed_intermediate_particles: Optional[List[str]] = None, interaction_type_settings: Dict[expertsystem.reaction.solving.InteractionTypes, Tuple[expertsystem.reaction.solving.EdgeSettings, expertsystem.reaction.solving.NodeSettings]] = None, formalism_type: str = 'helicity', topology_building: str = 'isobar', number_of_threads: int = 4, solving_mode: expertsystem.ui.SolvingMode = <SolvingMode.Fast: 1>, reload_pdg: bool = False)[source]

Bases: object

Main handler for decay topologies.

add_final_state_grouping(fs_group: List[Union[str, List[str]]])None[source]
find_solutions(graph_setting_groups: Dict[float, List[Tuple[expertsystem.reaction.topology.StateTransitionGraph, expertsystem.reaction.solving.GraphSettings]]])expertsystem.reaction.solving.Result[source]

Check for solutions for a specific set of interaction settings.

property formalism_type
generate_amplitude_model(result: expertsystem.reaction.solving.Result)expertsystem.amplitude.model.AmplitudeModel[source]

Generate an amplitude model from a generated Result.

The type of amplitude model (HelicityAmplitudeGenerator or CanonicalAmplitudeGenerator) is determined from the formalism_type that was chosen when constructing the StateTransitionManager.

prepare_graphs() → Dict[float, List[Tuple[expertsystem.reaction.topology.StateTransitionGraph, expertsystem.reaction.solving.GraphSettings]]][source]
set_allowed_interaction_types(allowed_interaction_types: List[expertsystem.reaction.solving.InteractionTypes])None[source]
set_allowed_intermediate_particles(particle_names: List[str])None[source]
set_topology_builder(topology_builder: expertsystem.reaction.topology.SimpleStateTransitionTopologyBuilder)None[source]
get_intermediate_state_names(solutions: List[expertsystem.reaction.topology.StateTransitionGraph]) → Set[str][source]

Extract the names of the intermediate states in the solutions.

load_default_particles()expertsystem.particle.ParticleCollection[source]

Load the default particle list that comes with the expertsystem.

Warning

This resets all particle definitions and the removes particles that don’t exist in the particle list that ships with the expertsystem!