Repository navigation
Conversation
This branch has not been deployed
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.
Reopening #119 to shrink the scope + some modifications. I still have the i/o attached to the
Bunchclass rather than separate utility functions, because I think this API is more cohesive when considered alongside the existing methods. For example, the bulk-append counterpart toaddParticle(...)isaddParticles(...). Additionally,addParticleswill accept any numeric Python sequence as long as the shape conforms to (N, 6).Bunch.addParticles(coordinates)to append local coordinates from arrays or nested sequences.Bunch.coordinates()to export an independent, C-contiguousfloat64snapshot.USE_NUMPY, disabled by default.orbit.core.bunch.Coordinates use shape
(N, 6)with columns(x, xp, y, yp, z, dE).Export does not compress the bunch or filter deleted slots; callers should
compress first when appropriate.
Bunch I/O benchmark
Hardware: Apple M4 · 10 CPU cores · 16 GiB RAM
Times are mean ± sample standard deviation, in milliseconds, across five timed runs after one untimed warm-up.
Input
Bunch.addParticleloopBunch.addParticlesOutput
Bunch.coordinates, 1 thread