convert

Deprecated since version 0.1.3: Use QRules, AmpForm, and TensorWaves instead.

import pycompwa.data.convert

Conversion tools between from ComPWA objects and pandas.DataFrame.

This module contains functions that help convertion from ComPWA objects like EventCollection and DataSet to a DataFrame and back.

data_set_to_pandas(data_set: DataSet) DataFrame[source]

Convert DataSet to a DataFrame.

Convert a DataSet to a DataFrame.

events_to_pandas(events: EventCollection, model: Optional[str] = None) DataFrame[source]

Convert an EventCollection to a DataFrame.

Create a PWA formatted DataFrame from an EventCollection.

Parameters
  • events – The EventCollection that you want to convert.

  • model – Name of the XML file containing the kinematic info or a Kinematics instance. Required if you want to rename the PIDs!

Raises

ConfigurationConflict – Number of final state particles in XML does not agree with number of final state particles in PwaAccessor.

pandas_to_events(frame: DataFrame, model: str) EventCollection[source]

Convert DataFrame to an EventCollection.

Create a PWA formatted DataFrame from an EventCollection object.