generate

Tools to facilitate data sample generation.

generate_data(size: int, kinematics: tensorwaves.physics.helicity_formalism.kinematics.HelicityKinematics, intensity: tensorwaves.interfaces.Function, phsp_generator: Callable[[tensorwaves.physics.helicity_formalism.kinematics.ParticleReactionKinematicsInfo], tensorwaves.interfaces.PhaseSpaceGenerator] = <class 'tensorwaves.data.tf_phasespace.TFPhaseSpaceGenerator'>, random_generator: Optional[tensorwaves.interfaces.UniformRealNumberGenerator] = None, bunch_size: int = 50000)numpy.ndarray[source]

Facade function for creating data samples based on an intensities.

Parameters
  • size – Sample size to generate.

  • kinematics – A kinematics instance. Note that this instance must have a property reaction_kinematics_info of the type ParticleReactionKinematicsInfo, otherwise the phase space generator instance cannot be constructed.

  • intensity – The intensity which will be sampled.

  • phsp_generator – Class of a phase space generator.

  • random_generator – A uniform real random number generator. Defaults to TFUniformRealNumberGenerator with indeterministic behavior.

  • bunch_size – Adjusts size of a bunch. The requested sample size is generated from many smaller samples, aka bunches.

generate_phsp(size: int, kinematics: tensorwaves.physics.helicity_formalism.kinematics.HelicityKinematics, phsp_generator: Callable[[tensorwaves.physics.helicity_formalism.kinematics.ParticleReactionKinematicsInfo], tensorwaves.interfaces.PhaseSpaceGenerator] = <class 'tensorwaves.data.tf_phasespace.TFPhaseSpaceGenerator'>, random_generator: Optional[tensorwaves.interfaces.UniformRealNumberGenerator] = None, bunch_size: int = 50000)numpy.ndarray[source]

Facade function for creating (unweighted) phase space samples.

Parameters
  • size – Sample size to generate.

  • kinematics – A kinematics instance. Note that this instance must have a property reaction_kinematics_info of the type ParticleReactionKinematicsInfo, otherwise the phase space generator instance cannot be constructed.

  • phsp_generator – Class of a phase space generator.

  • random_generator – A uniform real random number generator. Defaults to TFUniformRealNumberGenerator with indeterministic behavior.

  • bunch_size – Adjusts size of a bunch. The requested sample size is generated from many smaller samples, aka bunches.