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?