Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define particle data structure #2

Open
dtabell opened this issue Aug 26, 2024 · 4 comments
Open

define particle data structure #2

dtabell opened this issue Aug 26, 2024 · 4 comments

Comments

@dtabell
Copy link
Collaborator

dtabell commented Aug 26, 2024

The obvious start is

mutable struct Particle
    string name
    PScoord orbit
    Quaternion spin
end

with

mutable struct PScoord
    x
    px
    y
    py
    z
    pz
end

and

mutable struct Quaternion
    w
    x
    y
    z
end

What's missing (besides comments)?

@DavidSagan
Copy link
Member

Comments:

  • For particle name I think better would be AbstractSpecies from AtomicAndPhysicalConstants.jl
  • Since operations on phase space coordinates use a vector, my druthers would be to make orbit a vector.
  • To promote interoperability, the spin quaternion should use the struct defined by ReferenceFrameRotations.jl.

@DavidSagan
Copy link
Member

DavidSagan commented Oct 27, 2024

Missing is:

  • ix_turn Turn index when doing long term tracking.
  • state ALIVE, DEAD, PREBORN, etc.
  • direction Longitudinal direction of travel (+1 or -1).
  • time_dir Time direction (+1 forward in time or -1 backwards in time).
  • location Location within an element: UPSTREAM_END, INSIDE, or DOWNSTREAM_END.
  • user Dict for custom information.
  • ele Pointer to element being tracked through.
  • ID Particle identification (EG index of particle in the particle array of a bunch).
  • weight Weight used in computing bunch statistics (like bunch sigma matrix).

@mattsignorelli
Copy link
Contributor

This should this be in #23

@DavidSagan
Copy link
Member

Actually this is needed independent of OpenPMD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@DavidSagan @dtabell @mattsignorelli and others