src issueshttps://gitlab.psi.ch/OPAL/src/-/issues2018-09-22T17:14:37+02:00https://gitlab.psi.ch/OPAL/src/-/issues/237Pixmap image as input for collimator2018-09-22T17:14:37+02:00krausPixmap image as input for collimatorLet the users specify a black and white image that describes the hole of the collimator. An example of a black and white image is attached.
As input file format Portable Bitmap is suggested since a parser is relatively simple to implem...Let the users specify a black and white image that describes the hole of the collimator. An example of a black and white image is attached.
As input file format Portable Bitmap is suggested since a parser is relatively simple to implement and we'll avoid to rely on yet another library.
The simplest way to implement this is to extend the FlexibleCollimator and use one rectangle for each black pixel. However this isn't ideal because the number of rectangles can be big. Since we use a quadtree the performance may not be so bad. We'll have to test it.
Substantially more effort is needed if we try to minimize the number of rectangles by clustering pixels.
Submitted by @ext-roussel_r
![test_mask](/uploads/d4371d755495d590a39af25c65b93a0f/test_mask.png)krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/238Extend language for FlexibleCollimator2018-08-13T15:59:16+02:00krausExtend language for FlexibleCollimatorAdd additional commands such as
- [x] polygon
- [x] difference
- [x] intersection
- [x] trigonmetric functions
- [x] simple calculations (multiplication, summation, subtraction)
- [ ] 3D operations and shapesAdd additional commands such as
- [x] polygon
- [x] difference
- [x] intersection
- [x] trigonmetric functions
- [x] simple calculations (multiplication, summation, subtraction)
- [ ] 3D operations and shapeskrauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/239Remove requirement of data file for SAMPLER and OPTIMIZER2020-06-22T09:42:35+02:00adelmannRemove requirement of data file for SAMPLER and OPTIMIZERWe still use the runOPAL.py scheme with template / data file. However the design variables could be easily looked up in the dictionary or we invent new types: DvarReal etc.
[Edit: this has been moved to a separate issue, see #249! If we...We still use the runOPAL.py scheme with template / data file. However the design variables could be easily looked up in the dictionary or we invent new types: DvarReal etc.
[Edit: this has been moved to a separate issue, see #249! If we could define quantities of interest (a la optimizer) and write them to the json file lengthly post processing would be avoided.]
Edit:
- [x] remove the need for a data file (!288)
- [x] write a json file containing the values of the DVARs and objectives (#249)OPAL 2.4.0frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/245Re-enable Slice tracker2020-04-23T11:01:30+02:00krausRe-enable Slice trackerThe ParallelSliceTracker was disabled since it relied heavily on ParallelTTracker which has been reimplemented with 3D placement of the elements.The ParallelSliceTracker was disabled since it relied heavily on ParallelTTracker which has been reimplemented with 3D placement of the elements.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/249Objectives for Sampler2018-12-06T11:13:03+01:00krausObjectives for SamplerThe user should be able to define quantities of interest (a la optimizer) which are written to the json file. This avoids lengthy post processing of the stat files of all runs.The user should be able to define quantities of interest (a la optimizer) which are written to the json file. This avoids lengthy post processing of the stat files of all runs.krauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/251Allow optimizer and sampler runs to restart from given h5 file2019-02-25T08:43:02+01:00krausAllow optimizer and sampler runs to restart from given h5 fileRestart currently doesn't work for runs when launched from the optimizer / sampler. This feature should be relatively easy to implement. Reported by M. Abo-Bakr.Restart currently doesn't work for runs when launched from the optimizer / sampler. This feature should be relatively easy to implement. Reported by M. Abo-Bakr.krausfrey_mkraushttps://gitlab.psi.ch/OPAL/src/-/issues/257GA interface is appending new generation output to new json file, rather than...2019-07-04T17:15:48+02:00ext-edelen_aGA interface is appending new generation output to new json file, rather than having one generation output per json fileaccording to the input file:
```
INITIALPOPULATION=100,
MAXGENERATIONS=2,
NUM_MASTERS=1,
NUM_COWORKERS=8,
SIMTMPDIR="tmp",
TEMPLATEDIR="tmpl",
FIELDMAPDIR="fieldm...according to the input file:
```
INITIALPOPULATION=100,
MAXGENERATIONS=2,
NUM_MASTERS=1,
NUM_COWORKERS=8,
SIMTMPDIR="tmp",
TEMPLATEDIR="tmpl",
FIELDMAPDIR="fieldmaps",
NUM_IND_GEN=100,
GENE_MUTATION_PROBABILITY=0.8,
MUTATION_PROBABILITY=0.8,
RECOMBINATION_PROBABILITY=0.2;
```
It seems like this should be 200 samples (100 in population x 2 generations)
However, using mldb to convert to pk reports 300 samples:
```
OPAL ML Database Generator
Found 2 json files.
Write ML-Database 1nCGA-small-test.pk
xDim = 6 -> ['G0', 'G1', 'K0', 'K1', 'PH0', 'PH1']
yDim = 7 -> ['DE', 'EMITS', 'EMITX', 'EMITY', 'RMSS', 'RMSX', 'RMSY']
generations = 2
Data points = 300
```
Looking at the json files:
- 1_1nCGA_0.json has 100 individuals
- 2_1nCGA_0.json has 200 individuals
And if we compare the first individual in each case, they are both the same:
```
"G0": 63.7949,
"G1": 17.5757,
"K0": 474.876,
"K1": 185.284,
"PH0": -8.94274,
"PH1": -2.44182
```
So it looks like new data is just being appended to the new json file in subsequent generations rather than creating a new file for each generation with only that generation's data in it.snuverink_jjochem.snuverink@psi.chkraussnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/265Sampler: Delete files that are not used2018-12-02T17:06:44+01:00frey_mSampler: Delete files that are not usedWhen running the SAMPLER, it might run thounds of OPAL simulations. In each directory we will then have files like *.lbal, *.out, etc., that might not be needed. Since on clusters you sometimes / normally have quotas on number of files, ...When running the SAMPLER, it might run thounds of OPAL simulations. In each directory we will then have files like *.lbal, *.out, etc., that might not be needed. Since on clusters you sometimes / normally have quotas on number of files, I think it would make sense that we add an option to the SAMPLER command where we can specify which files to delete directly after one simulation.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/268Store halo in STAT-file2018-12-11T09:00:09+01:00frey_mStore halo in STAT-fileIt would be nice storing the halo per step in the stat file.It would be nice storing the halo per step in the stat file.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/269Halo evaluation as objective2018-12-11T09:14:40+01:00frey_mHalo evaluation as objectiveIt would be nice having a halo evaluation as an objective for the sampler and optimizer. I also think about multi-bunch simulations. We need either the halo written to the stat-file or evaluate it using the H5 file. In case of multi-bunc...It would be nice having a halo evaluation as an objective for the sampler and optimizer. I also think about multi-bunch simulations. We need either the halo written to the stat-file or evaluate it using the H5 file. In case of multi-bunch simulations where particles are assigned to energy bins, we'd need a stat file for every energy bin. Therefore, I think, it's easier to add new objective funtion.
I suggest something like this
```c++
halo(dir, step, bin)
```
where ```dir=x,y,z``` and ```bin``` the energy bin (default: 0).frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/275OPAL-t : Transverse Distribution from Laser Profile (Under Development)2019-12-17T09:33:15+01:00adelmannOPAL-t : Transverse Distribution from Laser Profile (Under Development)What is the status of the Transverse Distribution from Laser Profile ?
How is the h5 file containing the virtual cathode image defined?
Background: there is an interest at LCLS and LCLS-IIWhat is the status of the Transverse Distribution from Laser Profile ?
How is the h5 file containing the virtual cathode image defined?
Background: there is an interest at LCLS and LCLS-IIkrauskraushttps://gitlab.psi.ch/OPAL/src/-/issues/276Specify trim coil range azimuthally2023-02-13T15:50:53+01:00snuverink_jjochem.snuverink@psi.chSpecify trim coil range azimuthallyFeature request from @matlocha_t: add an option to `TRIMCOIL` to specify besides the radial range also the azimuthal range.Feature request from @matlocha_t: add an option to `TRIMCOIL` to specify besides the radial range also the azimuthal range.snuverink_jjochem.snuverink@psi.chsnuverink_jjochem.snuverink@psi.chhttps://gitlab.psi.ch/OPAL/src/-/issues/278add option to load initial population for GA2019-03-15T11:13:52+01:00ext-edelen_aadd option to load initial population for GAWe'd like to be able to specify an initial population to use in the OPAL GA.We'd like to be able to specify an initial population to use in the OPAL GA.frey_msnuverink_jjochem.snuverink@psi.chadelmannkrausfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/318Optimizer: Generalizing objectives with sddsVariableAt2019-06-26T16:56:20+02:00frey_mOptimizer: Generalizing objectives with sddsVariableAt### Summary
Currently, the optimizer allows to evaluate an objective in the stat-file with ```sddsVariableAt``` according to ```spos```
only. I'd like to use other quantities as well.### Summary
Currently, the optimizer allows to evaluate an objective in the stat-file with ```sddsVariableAt``` according to ```spos```
only. I'd like to use other quantities as well.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/343Distinguish bunches in probe2019-07-25T16:45:26+02:00frey_mDistinguish bunches in probe### Summary
It is currently not possible to distinguish single bunches in a probe in case of multi-bunch simulations. Although the ID and turn number are given it is somehow not possible to get a single bunch. Saving the bunch number (an...### Summary
It is currently not possible to distinguish single bunches in a probe in case of multi-bunch simulations. Although the ID and turn number are given it is somehow not possible to get a single bunch. Saving the bunch number (an attribute of `PartBunchBase`) will help to overcome this issue.frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/353Track back in time2019-09-07T18:55:00+02:00adelmannTrack back in time### Summary
We want to track a beam given beam back in time throughout the lattice. This can either be a followup track
or a given/generated distribution.
### Motivation
From measurements or intuition you construct a final phase spac...### Summary
We want to track a beam given beam back in time throughout the lattice. This can either be a followup track
or a given/generated distribution.
### Motivation
From measurements or intuition you construct a final phase space $`P_{final}`$. One can then ask the question how would you generate $`P_{initial}`$ and transport it. By tracking back (maybe using the optimiser) one can
hope to achieve such a goal.
### Approach (so far only for a straight machine ...)
1. The TRACK command is augment with Boolean **TRACKBACK=**
2. In **ParallelTTracker** the double member **arrowOfTime_m** is set to -1 in case of **TRACKBACK=TRUE**
3. In **ParallelTTracker::invertP** itsBunch->P[ ](2) *= arrowOfTime_m and
itsBunch_m->RefPartP_m *= arrowOfTime_m; is set [invertPz](http://amas.web.psi.ch/docs/opal/master-doxygen-new/d0/d39/a01138.html#ad0851e3c7c4947981014d3989560c7e5) (need to update Doxygen)
This is as far as I have implemented it, if I remember how to do the branch/merge stuff :) I will commit.
### To Do
0. All electrostatic elements do not need to be changed
1. Space charge needs to negate its action in all 3 dimensions.
3. RF
4. Make it more general i.e. 3. in Approach above
adelmannkrausadelmannhttps://gitlab.psi.ch/OPAL/src/-/issues/376Feature Request: OPAL Cheat Sheet2020-06-10T08:29:27+02:00bellotti_rFeature Request: OPAL Cheat SheetI think a cheat sheet would be very helpful for people who are new to OPAL. Especially to get an overview about what is possible, and which commands exist without having to go through the wiki section by section. Of course, detailed info...I think a cheat sheet would be very helpful for people who are new to OPAL. Especially to get an overview about what is possible, and which commands exist without having to go through the wiki section by section. Of course, detailed information should still be looked up.
My suggestion is to give a short config snippet for the most common building blocks. [This PDF](https://pandas.pydata.org/Pandas_Cheat_Sheet.pdf) might be a good guideline what I mean.
What do you think?adelmannadelmannhttps://gitlab.psi.ch/OPAL/src/-/issues/379Add phase-space halo parameter to stat and smb file2020-04-22T11:53:50+02:00frey_mAdd phase-space halo parameter to stat and smb fileWe currently write the spatial-profile parameter to the stat file. However, I think, it makes sense to write also the phase-space halo parameter to the file. The formulas are in https://journals.aps.org/prab/abstract/10.1103/PhysRevSTAB....We currently write the spatial-profile parameter to the stat file. However, I think, it makes sense to write also the phase-space halo parameter to the file. The formulas are in https://journals.aps.org/prab/abstract/10.1103/PhysRevSTAB.5.124202frey_mfrey_mhttps://gitlab.psi.ch/OPAL/src/-/issues/402VFFA2019-12-13T15:41:37+01:00ext-rogers_cVFFAImplement analytical Vertical FFA field map in OPAL with fields as per draft note:
[vertical-ffa-note.pdf](/uploads/1010e8589a932e447794df7ea11d0fb0/vertical-ffa-note.pdf)Implement analytical Vertical FFA field map in OPAL with fields as per draft note:
[vertical-ffa-note.pdf](/uploads/1010e8589a932e447794df7ea11d0fb0/vertical-ffa-note.pdf)OPAL-2.2.0ext-rogers_cext-rogers_chttps://gitlab.psi.ch/OPAL/src/-/issues/470New multiGauss distribution2020-02-20T10:32:48+01:00albajacas_aarnau.albajacas@psi.chNew multiGauss distribution### Summary
In the cathode at the Argonne Wakefield Accelerator they have the ability to produce microbunched electron bunches, thanks to a laser beam which has a train of Gaussian pulses.
[Temporal Laser Pulse Shaping for RF Photocatho...### Summary
In the cathode at the Argonne Wakefield Accelerator they have the ability to produce microbunched electron bunches, thanks to a laser beam which has a train of Gaussian pulses.
[Temporal Laser Pulse Shaping for RF Photocathode Guns](https://aip.scitation.org/doi/10.1063/1.3080991)
At the moment there is no OPAL distribution to reproduce this.
Here is an example with 4 Gaussian microbunches separated (peak-to-peak) by 1.26 mm:
```
Dist: DISTRIBUTION, TYPE = MULTIGAUSS,
SIGMAPX = 1e-2, SIGMAPY = 1e-2, SIGMAPZ = 1e-2, // In units of betaGamma
CUTOFFPX = 4.0, CUTOFFPY = 4.0, CUTOFFPZ = 4.0, // In units of SIGMAP
SIGMAR = 340e-6,
SIGMAZ = .9e-3 / 2.355, // FWHM = 2.355 * sigma
CUTOFFLONG = 4.0, // In units of SIGZ
SEPPEAKS = 1.26e-3,
NPEAKS = 4,
EMITTED = FALSE;
```
This is what it looks like:
![distroInject](/uploads/65acbe6003cd1c8336272d98e3ddc5a8/distroInject.png)
In the case where the bunch is emitted, SIGMAPX/Y/Z and CUTOFFPX/Y/Z are omitted, and SIGMAZ and SEPPEAKS are to be given in seconds.OPAL 2.4.0albajacas_aarnau.albajacas@psi.chalbajacas_aarnau.albajacas@psi.ch