Skip to content

Refactor ParticleData internals to use a xr.Dataset #1822

@VeckoTheGecko

Description

@VeckoTheGecko

Conceptually the internals of ParticleData (i.e., dictionary of 1D arrays, which all needs ot be the same length) is very similar to that of a dataframe. Migrating this across would be a boost to maintainability, and likely also performance.

Pandas is already a dependency of xarray, hence there isn't cost to adding it as an explicit dependency.

Although looking at the code ParticleData looks to be a container for 1D arrays, conceptually that doesn't make much sense (particles x time = 2D arrays). Maybe its for single particles? Maybe for a single snapshot? Still working out the responsibility of ParticleData and how that interfaces with the rest of ParticleSet...

Metadata

Metadata

Type

No type

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions