data¶
import expertsystem.amplitude.data
Data containers for working with four-momenta.
See also
-
class
DataSet
(data: Mapping[str, Union[int, float, complex, str, bytes, numpy.generic, Sequence[Union[int, float, complex, str, bytes, numpy.generic]], Sequence[Sequence[Any]], numpy.typing._array_like._SupportsArray]], dtype: Union[numpy.dtype, None, type, numpy.typing._dtype_like._SupportsDType, str, Tuple[Any, int], Tuple[Any, Union[int, Sequence[int]]], List[Any], numpy.typing._dtype_like._DTypeDict, Tuple[Any, Any]] = None)[source]¶ Bases:
collections.abc.Mapping
A mapping of variable names to their
ScalarSequence
.The
keys
ofDataSet
represent variable names in aHelicityModel
, while itsvalues
are inserted in their place.-
append
(other: Mapping[str, Union[int, float, complex, str, bytes, numpy.generic, Sequence[Union[int, float, complex, str, bytes, numpy.generic]], Sequence[Sequence[Any]], numpy.typing._array_like._SupportsArray]]) → None[source]¶
-
property
n_events
¶
-
select_events
(selection: Union[int, slice]) → expertsystem.amplitude.data.DataSet[source]¶
-
to_pandas
(_: Union[numpy.dtype, None, type, numpy.typing._dtype_like._SupportsDType, str, Tuple[Any, int], Tuple[Any, Union[int, Sequence[int]]], List[Any], numpy.typing._dtype_like._DTypeDict, Tuple[Any, Any]] = None) → Dict[str, numpy.ndarray][source]¶ Converter for the
data
argument ofpandas.DataFrame
.
-
-
class
EventCollection
(data: Mapping[int, Union[int, float, complex, str, bytes, numpy.generic, Sequence[Union[int, float, complex, str, bytes, numpy.generic]], Sequence[Sequence[Any]], numpy.typing._array_like._SupportsArray]])[source]¶ Bases:
collections.abc.Mapping
A mapping of state IDs to their
FourMomentumSequence
data samples.An
EventCollection
has to be converted toDataSet
so that it can be used to evaluate aHelicityModel
.-
append
(other: Mapping[int, Union[int, float, complex, str, bytes, numpy.generic, Sequence[Union[int, float, complex, str, bytes, numpy.generic]], Sequence[Sequence[Any]], numpy.typing._array_like._SupportsArray]]) → None[source]¶
-
property
n_events
¶
-
select_events
(selection: Union[int, slice]) → expertsystem.amplitude.data.EventCollection[source]¶
-
sum
(indices: Iterable[int]) → expertsystem.amplitude.data.FourMomentumSequence[source]¶
-
to_pandas
(_: Union[numpy.dtype, None, type, numpy.typing._dtype_like._SupportsDType, str, Tuple[Any, int], Tuple[Any, Union[int, Sequence[int]]], List[Any], numpy.typing._dtype_like._DTypeDict, Tuple[Any, Any]] = None) → Dict[Tuple[int, str], numpy.ndarray][source]¶ Converter for the
data
argument ofpandas.DataFrame
.The resulting
DataFrame
has multi-columns (see MultiIndex / advanced indexing) where the first column layer represents the state IDs and the second column layer represents each of the four-momentum entries (\(E, p_x, p_y, p_z\)).
-
-
class
FourMomentumSequence
(data: Union[int, float, complex, str, bytes, numpy.generic, Sequence[Union[int, float, complex, str, bytes, numpy.generic]], Sequence[Sequence[Any]], numpy.typing._array_like._SupportsArray])[source]¶ Bases:
numpy.lib.mixins.NDArrayOperatorsMixin
,collections.abc.Sequence
Container for a
numpy.array
of four-momentum tuples.The input data has to be of shape (N, 4) and the order of the items has to be \((E, p)\) (energy first).
-
property
energy
¶
-
mass_squared
() → expertsystem.amplitude.data.ScalarSequence[source]¶
-
p_norm
() → expertsystem.amplitude.data.ScalarSequence[source]¶ Norm of
three_momentum
.
-
p_squared
() → expertsystem.amplitude.data.ScalarSequence[source]¶ Squared norm of
three_momentum
.
-
property
p_x
¶
-
property
p_y
¶
-
property
p_z
¶
-
property
three_momentum
¶
-
property
-
class
MatrixSequence
(data: Union[int, float, complex, str, bytes, numpy.generic, Sequence[Union[int, float, complex, str, bytes, numpy.generic]], Sequence[Sequence[Any]], numpy.typing._array_like._SupportsArray])[source]¶ Bases:
numpy.lib.mixins.NDArrayOperatorsMixin
,collections.abc.Sequence
Safe data container for a sequence of 4x4-matrices.
-
class
ScalarSequence
(data: Union[int, float, complex, str, bytes, numpy.generic, Sequence[Union[int, float, complex, str, bytes, numpy.generic]], Sequence[Sequence[Any]], numpy.typing._array_like._SupportsArray], dtype: Union[numpy.dtype, None, type, numpy.typing._dtype_like._SupportsDType, str, Tuple[Any, int], Tuple[Any, Union[int, Sequence[int]]], List[Any], numpy.typing._dtype_like._DTypeDict, Tuple[Any, Any]] = None)[source]¶ Bases:
numpy.lib.mixins.NDArrayOperatorsMixin
,collections.abc.Sequence
numpy.array
data container of rank 1.
-
class
ThreeMomentum
(data: Union[int, float, complex, str, bytes, numpy.generic, Sequence[Union[int, float, complex, str, bytes, numpy.generic]], Sequence[Sequence[Any]], numpy.typing._array_like._SupportsArray], dtype: Union[numpy.dtype, None, type, numpy.typing._dtype_like._SupportsDType, str, Tuple[Any, int], Tuple[Any, Union[int, Sequence[int]]], List[Any], numpy.typing._dtype_like._DTypeDict, Tuple[Any, Any]] = None)[source]¶ Bases:
numpy.lib.mixins.NDArrayOperatorsMixin
,collections.abc.Sequence