pyOPALTools issueshttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues2019-01-30T16:25:42+01:00https://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/13Parsing and Plotting of probe and peak file data.2019-01-30T16:25:42+01:00frey_mParsing and Plotting of probe and peak file data.After a discussion with @snuverink_j we decided to add plotting and parsing tools of probe and peak file data.After a discussion with @snuverink_j we decided to add plotting and parsing tools of probe and peak file data.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/12Removal of deprecated timing class.2018-04-14T20:08:27+02:00frey_mRemoval of deprecated timing class.The plots of ```pyOPALTools/timing/TimePlot.py``` got replaced by [opal/visualization/timing/plots.py](https://gitlab.psi.ch/OPAL/pyOPALTools/blob/master/opal/visualization/timing/plots.py). Therefore, I remove the old class and all the ...The plots of ```pyOPALTools/timing/TimePlot.py``` got replaced by [opal/visualization/timing/plots.py](https://gitlab.psi.ch/OPAL/pyOPALTools/blob/master/opal/visualization/timing/plots.py). Therefore, I remove the old class and all the tests.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/11plot_density slow for large number of particles2018-04-11T13:40:21+02:00snuverink_jjochem.snuverink@psi.chplot_density slow for large number of particlesIn the notebook RingCyclotron.ipynb the plot_density function is very slow for the example. I think it would be much faster and less memory-hungry if a histogram is made instead of scatter plot with colours.
e.g.
```python
plt.hist2d(xd...In the notebook RingCyclotron.ipynb the plot_density function is very slow for the example. I think it would be much faster and less memory-hungry if a histogram is made instead of scatter plot with colours.
e.g.
```python
plt.hist2d(xdata, ydata, (50, 50), cmap=plt.cm.jet)
```
gives within a second:
![image](/uploads/8c4ccb93cde6bbd5c4f25faff0a9772d/image.png)
@frey_m : I can add this if you'd agree.https://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/10cleanup root directory2019-01-30T16:25:42+01:00adelmanncleanup root directoryI think we should delete all *.py und notebooks on the root level.
Do you need any of these files?I think we should delete all *.py und notebooks on the root level.
Do you need any of these files?frey_mfrey_mhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/9Implementation of envelope plot2018-03-27T13:58:58+02:00frey_mImplementation of envelope plotThe envelope plot is a nice view of the beamline for OPAL-T.
Please fill the gaps in
[LatticeParser.py](https://gitlab.psi.ch/OPAL/pyOPALTools/blob/master/utilities/LatticeParser.py)
and
[plot_envelope function](https://gitlab.psi.ch...The envelope plot is a nice view of the beamline for OPAL-T.
Please fill the gaps in
[LatticeParser.py](https://gitlab.psi.ch/OPAL/pyOPALTools/blob/master/utilities/LatticeParser.py)
and
[plot_envelope function](https://gitlab.psi.ch/OPAL/pyOPALTools/blob/master/opal/visualization/plots.py#L155)ganz_pganz_phttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/8Statistics Plot - Single Bunch vs. Multi Bunches2019-03-26T16:07:11+01:00frey_mStatistics Plot - Single Bunch vs. Multi BunchesDevelop some statistics plotting methods for single and multi bunch simulations.Develop some statistics plotting methods for single and multi bunch simulations.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/7Timing: Parse problem size2018-01-25T12:20:11+01:00frey_mTiming: Parse problem sizeMentioned in https://gitlab.psi.ch/OPAL/src/issues/181#note_4222.Mentioned in https://gitlab.psi.ch/OPAL/src/issues/181#note_4222.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/6timing plots2017-11-22T08:41:30+01:00adelmanntiming plotsThe max/min (tplot.summary_plot(fname=fn4, grid=True, first=7)) of the timing plots is wrong.
![image](/uploads/6cec84199f7a659949f9163eb75ba0e4/image.png)
SelfField total..... 128 178.8 178.8 146 145.9 163.5 ...The max/min (tplot.summary_plot(fname=fn4, grid=True, first=7)) of the timing plots is wrong.
![image](/uploads/6cec84199f7a659949f9163eb75ba0e4/image.png)
SelfField total..... 128 178.8 178.8 146 145.9 163.5 163.6frey_mfrey_mhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/5Format timing information2017-11-14T09:42:44+01:00adelmannFormat timing informationWe should use the timing.dat data and not the std out.
```
num Nodes CPU tot Wall tot
===============================================
mainTimer........... 512 1260 1269
num Nodes C...We should use the timing.dat data and not the std out.
```
num Nodes CPU tot Wall tot
===============================================
mainTimer........... 512 1260 1269
num Nodes CPU max Wall max CPU min Wall min CPU avg Wall avg
=======================================================================================
mainTimer........... 512 1260 1269 1246 1269 1253 1269
Binaryrepart........ 512 0.61 0.596 0.58 0.5907 0.5931 0.5933
Boundingbox......... 512 133.7 133.5 130.6 130.8 132 132
Compute Statistics.. 512 32.91 32.6 29.88 29.98 31.71 31.71
ComputePotential.... 512 511.9 512.4 482.4 483.1 493.8 495.1
Create Distr........ 512 8.89 8.901 8.79 8.835 8.858 8.862
External field eval. 512 36.51 36.68 6.84 7.06 19.13 19.33
Fast inside test.... 512 0 0 0 0 0 0
Histogram........... 512 0 0 0 0 0 0
Initialize geometry. 512 0 0 0 0 0 0
Inside test......... 512 0 0 0 0 0 0
Load Distr.......... 512 0 0 0 0 0 0
Particle Inside..... 512 0 0 0 0 0 0
Ray tracing......... 512 0 0 0 0 0 0
Secondary emission.. 512 0 0 0 0 0 0
SelfField total..... 512 942.6 943.1 905.2 909.5 925.9 928.1
SF: GreensFTotal.... 512 412 412.3 395.8 398.1 404.5 405.7
TIntegration1....... 512 12.14 11.98 10.78 11.05 11.54 11.54
TIntegration2....... 512 15.75 15.74 14.19 14.55 15 15
WakeField........... 512 0 0 0 0 0 0
Write H5-File....... 512 11.29 16.15 4.47 16.13 7.677 16.14
Write Stat.......... 512 4.89 4.755 4.42 4.678 4.687 4.684
```frey_mfrey_mhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/4testStat-1.py2017-11-11T10:41:57+01:00adelmanntestStat-1.pySeams to be confused with new SDDS reader
```python
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-90-5eae613b6252> ...Seams to be confused with new SDDS reader
```python
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-90-5eae613b6252> in <module>()
1 import statPlots as statpl
2
----> 3 statpl.opalStatOverviewPlot(fns)
~/git/pyOPALTools/statPlots.py in opalStatOverviewPlot(fns, title, pdfFn, addData, myLoc)
93 dataSrc.append(legendName)
94
---> 95 parser = SddsReader(fns[i])
96
97 if not x:
~/git/pyOPALTools/utils.py in __init__(self, filename)
171
172 self.memoryMapFile(filename)
--> 173 self.parseHeader()
174
175
~/git/pyOPALTools/utils.py in parseHeader(self)
277
278 else:
--> 279 raise Exception("Invalid syntax in SDDS header")
280
281 line = self.sdds_data_mem.readline()
Exception: Invalid syntax in SDDS header
```frey_mfrey_mhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/3Pareto front viewer2017-06-29T13:27:00+02:00adelmannPareto front viewerUpdate to new format
[1_Ring.dat_0.json](/uploads/c428655026db65955a65d3cad90754a5/1_Ring.dat_0.json)Update to new format
[1_Ring.dat_0.json](/uploads/c428655026db65955a65d3cad90754a5/1_Ring.dat_0.json)frey_mfrey_mhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/2Json reader2018-03-15T18:52:31+01:00adelmannJson reader```
python json-reader-1.py 101
Found 999 json files.
('Read generation ', '101')
[u'rinit', u'tc01mb', u'prinit', u'tc02mb', u'tc03mb', u'phiinit', u'benergy']
[u'dpeak1', u'dpeak2', u'dpeak5_7', u'dpeak3_4', u'dpeak8_13']
adelm...```
python json-reader-1.py 101
Found 999 json files.
('Read generation ', '101')
[u'rinit', u'tc01mb', u'prinit', u'tc02mb', u'tc03mb', u'phiinit', u'benergy']
[u'dpeak1', u'dpeak2', u'dpeak5_7', u'dpeak3_4', u'dpeak8_13']
adelmann@fast-dude ~/git/pyOPALTools/tests/json-reader $ python json-reader-1.py 102
Found 999 json files.
('Read generation ', '102')
index 107 is out of bounds for axis 0 with size 107
```
Why give generation 107 an error?adelmannadelmannhttps://gitlab.psi.ch/OPAL/pyOPALTools/-/issues/1Selection of particle positions with detect_peaks not consistent2019-01-30T16:25:42+01:00snuverink_jjochem.snuverink@psi.chSelection of particle positions with detect_peaks not consistentThe turn separation calculation in cyclotron.py selects the x-axis crossings with a call to detect_peaks:
`pksx = detect_peaks(x, mph=0.04, mpd=100)`
This selects (see figure) the cyan points in the PSI Ring model. However, I would exp...The turn separation calculation in cyclotron.py selects the x-axis crossings with a call to detect_peaks:
`pksx = detect_peaks(x, mph=0.04, mpd=100)`
This selects (see figure) the cyan points in the PSI Ring model. However, I would expect the red points (indices: firstPoint + turnNr*stepsPerTurn). I think inherently the detect_peaks function can always go wrong. Therefore, I would like to change it to the stepsPerTurn selection.
![Orig_Position](/uploads/0053b7843f8bc4dbddb6bae69c7b5231/Orig_Position.png)