pawian¶
Deprecated since version 0.1.3: Use QRules, AmpForm, and TensorWaves instead.
import pycompwa.data.io.pawian
Import Pawian data files.
For more information, see the Pawian website. The functions in this module contain several logical statements for backward compatibility to ASCII files without header.
- read_ascii(filename, particles=None, **kwargs)[source]¶
Import from a Pawian-like ASCII file.
- Parameters
particles – Interpretation for the tuples. This argument is required if there are no weights. Provide either the number of particles or a list of particles.
kwargs – Optional, additional arguments that are passed on to
pandas.read_table
.
- read_hists_file(filename: str, type_name: str = 'data')[source]¶
Import one of the momentum tuple branches of a
pawianHists.root
file.Note
There are slight differences in ROOT files that were written with ROOT5 versus those from ROOT6, but this function takes care of that.
- write_ascii(frame: DataFrame, filename: str, **kwargs)[source]¶
Write
pandas.DataFrame
to a Pawian-like ASCII file.- Parameters
frame (
pandas.DataFrame
) – The frame that you want to export. Should be formatted according to the standards set by thePwaAccessor
.filename (
str
) – Path of the output file. Usually has the extensiondat
.kwargs – Optional, additional arguments that are passed on to
pandas.DataFrame.to_csv()
.