Support prt.bp data#33
Merged
Merged
Conversation
the cases were reran. Field data and all plots (including prt) was identical, but something in the h5 files clearly is different.
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Needed so BP-loaded particle data (no per-particle q/m columns) can flow through SpeciesFilter. Semantically a no-op on H5 single-species data. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Scan the data dir for prt.<species_key>.*.bp files at parser build time and register a ParticleLoaderBp under each. The loader itself is a stub here; its get_data() raises NotImplementedError until Task 6. Note: BP "files" are directories in ADIOS2's layout, so the scan accepts both. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
dd.DataFrame.assign(t=scalar) creates a broadcast-scalar column whose to_dask_array() trips an IndexError in dask-expr's optimizer when the source dataframe came from xarray's to_dask_dataframe. map_partitions produces a proper per-row column that survives the optimizer. Co-Authored-By: Claude <noreply@anthropic.com>
Each new test in test_plots.py shares a baseline PNG with its H5 counterpart via pytest-mpl's filename= marker. Since test-2d and test-3d BP data was generated from the same PSC runs as the H5 data, the plots match within tolerance=2. Also fix particle_bp to look up var_info under the "prt" prefix rather than "prt.<species_key>"; the registry is keyed by the bare prefix, so without this the BP path fell back to raw column names (e.g. "py" instead of "u_y"). Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Apr 28, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initial, somewhat hacky support of loading adios2's bp-format particle data, as will be implemented in a future PSC PR.
The hacky part is how the loaders are registered for each species variant, since in principle the prefixes (
prt.i,prt.e, etc.) can have arbitrary species names.I'm also not particularly happy with how species are "discovered" from the last PR, but that's another matter.