Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
P pyOPALTools
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1
    • Merge requests 1
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Code Review
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • pyOPALTools
  • Issues
  • #44

Closed
Open
Created Jul 20, 2019 by ext-neveu_n@ext-neveu_nDeveloper

Parse input distributions

I'd like to add a small distribution reader, something like this:

> def emitted_dist(filename, names=['x', 'px','y','py','t','pz']):  
>     '''Read in particle distribution used   
>     in OPAL-T simulation. Used to describe the   
>     beam distribution as it leaves the cathode.'''  
>
>     dist = {} 
>     data = np.loadtxt(filename, skiprows=1) 
>     for i,name in enumerate(names): 
>         dist[name] = data[:,i]
>
>     return dist

However, the tools have gotten a lot more advanced since the last time I pushed anything.
Not sure this fits the current style, or where to add it.
New parser file for distributions?
Maybe this already exists and I missed it?

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking