-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Looking at the code for ImpactX data plotting over s:
BLAST-ImpactX/impactx#1216 (comment)
I realized that adding an attribute of a particle species as a column can be a quite common request, e.g., for each iteration/snapshot of an openPMD series, we store reference particle information of ImpactX directly on the particle species group and could use this as a dataframe column.
Expanding the API to allow something along these lines:
series = io.Series("diags/openPMD/monitor.h5", io.Access.read_only)
df = series.to_df("beam", attributes=["s_ref"])
# add s column
iter_list = list(series.iterations)and likewise on the it.particles["beam"].to_df(attributes=["s_ref"]) level underneath could be very helpful to simplify the user experience.