create

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

import pycompwa.data.create

Create a pandas.DataFrame according to the PwaAccessor.

multicolumn(particle_names: Optional[list] = None)[source]

Create a multicolumn.

The multicolumn complies with the complies with the standards set by the PwaAccessor.

pwa_frame(data=None, particle_names: Optional[list] = None, number_of_rows: Optional[int] = None) DataFrame[source]

Create an PWA DataFrame.

The columns of the DataFrame are specially formatted so that they agree with the _validate method of the PwaAccessor.

Parameters
  • data – See pandas.DataFrame constructor.

  • particle_names (list, optional) – Names that the particle column groups. A simple counter will be used if left empty. Note that duplicate particles will receive an index.

  • number_of_rows (int, optional) – Give the output DataFrame a certain number of rows.