Skip to content

.to_df() with Particle Species Attributes #1813

@ax3l

Description

@ax3l

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions