naming¶
Deprecated since version 0.1.3: Use QRules, AmpForm, and TensorWaves instead.
import pycompwa.data.naming
Tools for naming and renaming column names of a pandas.DataFrame
.
The DataFrame
has to be formatted according to the conventions
set by the PwaAccessor
. Also contains tools for inverting
dict
objects.
- flip_dict(mapping: dict) dict [source]¶
Flip a Python
dict
by collecting duplicate values in a list.
- id_to_particle(frame: DataFrame, model: str, make_unique: bool = False) DataFrame [source]¶
Rename columns from final state IDs to particle names.
- name_to_pid(frame: DataFrame, particle_list) DataFrame [source]¶
Rename PIDs to their corresponding particle names.
- particle_to_id(frame: DataFrame, model: str) DataFrame [source]¶
Rename particles into their final state IDs.