data¶
Deprecated since version 0.1.3: Use QRules, AmpForm, and TensorWaves instead.
import pycompwa.data
Data I/O of the pycompwa
package.
This module forms the bridge between ComPWA data samples (or, more generally,
collections of 4-momentum tuples) to the world of pandas
.
Additional PWA tools are available through a dataframe accessor
named pwa
(see PwaAccessor
).
- class PwaAccessor(pandas_object)[source]¶
Bases:
object
DataFrame
accessor for PWA properties.Additional namespace to interpret DataFrame as PWA style dataframe, see here.
- property energy¶
Get a dataframe containing only the energies.
- property has_weights¶
Check if dataframe contains weights.
- property mass¶
Compute the invariant masses.
- property mass2¶
Compute the square of the invariant masses.
- property p_xyz¶
Get a dataframe containing only the 3-momenta.
- property rho¶
Compute absolute value of the 3-momenta.
- property rho2¶
Compute quadratic sum of the 3-momenta.
- property weight_label: str¶
Get the label of the weight column.
You need to know this string when adding weights.
- property weights¶
Get list of weights, if available.
- append(pwa_frame: DataFrame, other: DataFrame) DataFrame [source]¶
Append another
DataFrame
to aPWA DataFrame
.- Parameters
pwa_frame –
PWA DataFrame
to which you want to append additional columns.other – Other
DataFrame
from which you take the columns.
- Raises
InvalidPwaFormat – If the input
pwa_frame
is not aPWA DataFrame
.
Submodules and Subpackages