pyOPALTools issueshttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues2021-06-10T17:18:13+02:00https://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/100Undulator output parser + example2021-06-10T17:18:13+02:00snuverink_jjochem.snuverink@psi.chUndulator output parser + exampleAs discussed in the OPAL developer meeting, it would be nice to also parse and analyse the Undulator output file.
@albajacas_a has an example that can be started from. I can help with the implementation in pyOPALTools.As discussed in the OPAL developer meeting, it would be nice to also parse and analyse the Undulator output file.
@albajacas_a has an example that can be started from. I can help with the implementation in pyOPALTools.snuverink_jjochem.snuverink@psi.chalbajacas_aarnau.albajacas@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/94visualize_pf.py not working2020-06-22T10:44:25+02:00snuverink_jjochem.snuverink@psi.chvisualize_pf.py not workingAs reported by Finn O'Shea:
> I couldn't get visualize_pf.py to work. The first bug I found is on line 384:
print("Show generation " + generation)
that should read str(generation) otherwise a TypeError is raised. Even after fixing tha...As reported by Finn O'Shea:
> I couldn't get visualize_pf.py to work. The first bug I found is on line 384:
print("Show generation " + generation)
that should read str(generation) otherwise a TypeError is raised. Even after fixing that bug, there was at least one more.https://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/88Units with Pint2020-07-20T10:39:13+02:00frey_mUnits with PintAs briefly discussed in https://gitlab.psi.ch/OPAL/pyOPALTools/merge_requests/63#note_22571, we could use ~~[SymPy](https://www.sympy.org/en/index.html)~~ [Pint](https://pint.readthedocs.io/en/stable/) to do operations on units for plott...As briefly discussed in https://gitlab.psi.ch/OPAL/pyOPALTools/merge_requests/63#note_22571, we could use ~~[SymPy](https://www.sympy.org/en/index.html)~~ [Pint](https://pint.readthedocs.io/en/stable/) to do operations on units for plotting.https://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/44Parse input distributions2019-08-06T09:46:38+02:00ext-neveu_nParse input distributionsI'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 ...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?https://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/39Checking the usability of hvplot2019-07-07T16:47:52+02:00frey_mChecking the usability of hvplotWe might switch to [hvplot](https://hvplot.pyviz.org/) which is able to process different Python data frames.
CC: @adelmannWe might switch to [hvplot](https://hvplot.pyviz.org/) which is able to process different Python data frames.
CC: @adelmannhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/37Use Dask for datasets2019-07-04T12:34:52+02:00frey_mUse Dask for datasetsWe should move from native `numpy` and `pandas` to `dask`. With `dask` we can run in parallel on large datasets.
https://dask.org/We should move from native `numpy` and `pandas` to `dask`. With `dask` we can run in parallel on large datasets.
https://dask.org/https://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/31Field Output Files2020-06-03T08:56:13+02:00snuverink_jjochem.snuverink@psi.chField Output Files[Field output files](https://gitlab.psi.ch/OPAL/Manual-2.1/wikis/field-output) are not yet supported.[Field output files](https://gitlab.psi.ch/OPAL/Manual-2.1/wikis/field-output) are not yet supported.https://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/15Plotting Recommendation2020-04-07T11:00:46+02:00ext-roussel_rPlotting RecommendationThe plotting modules could be improved by using the object oriented approach to the matplotlib API. Functions returning matplotlib.pyplot.Figure or matplotlib.pyplot.Axes objects are far easier to work with when customizing plots. See fr...The plotting modules could be improved by using the object oriented approach to the matplotlib API. Functions returning matplotlib.pyplot.Figure or matplotlib.pyplot.Axes objects are far easier to work with when customizing plots. See from https://matplotlib.org/api/pyplot_summary.html
> Most of these functions also exist as methods in the matplotlib.axes.Axes class. You can use them with the “Object Oriented” approach to Matplotlib.
While it is easy to quickly generate plots with the matplotlib.pyplot module, we recommend using the object-oriented approach for more control and customization of your plots. See the methods in the matplotlib.axes.Axes() class for many of the same plotting functions. For examples of the OO approach to Matplotlib, see the API Examples.
I suggest having a kwargs argument that takes an matplotlib.pyplot.Axes object that determines if the function creates a new figure or not, ie.
```python
def plot(x,y,ax=''):
if not ax:
fig,ax = plt.subplots()
ax.plot(x,y)
return ax
```
This works well for a user who creates an array of plots and wants to fill each axis with a particular plot.ext-roussel_rext-roussel_r