generate¶
Tools to facilitate data sample generation.
-
generate_data
(size, kinematics, intensity, phsp_generator=<class 'tensorwaves.data.tf_phasespace.TFPhaseSpaceGenerator'>, random_generator=<class 'tensorwaves.data.tf_phasespace.TFUniformRealNumberGenerator'>, seed=123456.0, bunch_size=50000)[source]¶ Facade function for creating data samples based on an intensities.
- Parameters
size (
int
) – Sample size to generate.kinematics (
HelicityKinematics
) – A kinematics instance. Note that this instance must have a propertyreaction_kinematics_info
of the typeParticleReactionKinematicsInfo
, otherwise the phase space generator instance cannot be constructed.intensity (
Function
) – The intensity which will be sampled.phsp_generator (
Callable
[[ParticleReactionKinematicsInfo
],PhaseSpaceGenerator
]) – Class of a phase space generator.random_generator (
Callable
[[float
],UniformRealNumberGenerator
]) – Class of a uniform real random number generator.seed (
float
) – Used in the random number generation.bunch_size (
int
) – Adjusts size of a bunch. The requested sample size is generated from many smaller samples, aka bunches.
- Return type
-
generate_phsp
(size, kinematics, phsp_generator=<class 'tensorwaves.data.tf_phasespace.TFPhaseSpaceGenerator'>, random_generator=<class 'tensorwaves.data.tf_phasespace.TFUniformRealNumberGenerator'>, seed=123456.0, bunch_size=50000)[source]¶ Facade function for creating (unweighted) phase space samples.
- Parameters
size (
int
) – Sample size to generate.kinematics (
HelicityKinematics
) – A kinematics instance. Note that this instance must have a propertyreaction_kinematics_info
of the typeParticleReactionKinematicsInfo
, otherwise the phase space generator instance cannot be constructed.phsp_generator (
Callable
[[ParticleReactionKinematicsInfo
],PhaseSpaceGenerator
]) – Class of a phase space generator.random_generator (
Callable
[[float
],UniformRealNumberGenerator
]) – Class of a uniform real random number generator.seed (
float
) – Used in the random number generation.bunch_size (
int
) – Adjusts size of a bunch. The requested sample size is generated from many smaller samples, aka bunches.
- Return type