Unexpected phase space alteration with smoothDist6s
Moderators: cyao, michael_borland
Unexpected phase space alteration with smoothDist6s
Dear all,
I would like to perform a CSR evaluation in a dispersive path, I start from a 200k particles beamfile and I would like to increase the number of particles with smoothDist6s. The problem is that I noticed that the output file shows a different distribution in the longitudinal phase space and that the average energy is decreased. After this transport I would like to continue the start to end simulation so I need to preserve correctly the beam characteristics.
In the picture I show you the starting distribution and the one I obtained with the string:
smoothDist6s -input Astra.out -output Astra2x.sdds -factor 2 I tested also its behavior with another beamfile, here is the analogous result: Probably I'm not understanding correctly how the script works, are those transformations correct?
Thanks you and best wishes,
Marcello Rossetti Conti
I would like to perform a CSR evaluation in a dispersive path, I start from a 200k particles beamfile and I would like to increase the number of particles with smoothDist6s. The problem is that I noticed that the output file shows a different distribution in the longitudinal phase space and that the average energy is decreased. After this transport I would like to continue the start to end simulation so I need to preserve correctly the beam characteristics.
In the picture I show you the starting distribution and the one I obtained with the string:
smoothDist6s -input Astra.out -output Astra2x.sdds -factor 2 I tested also its behavior with another beamfile, here is the analogous result: Probably I'm not understanding correctly how the script works, are those transformations correct?
Thanks you and best wishes,
Marcello Rossetti Conti
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Unexpected phase space alteration with smoothDist6s
Marcello,
That's very strange. I tried the same command with a similar input file with expected results. The file is attached. Please try these commands and let me know the results:
--Michael
That's very strange. I tried the same command with a similar input file with expected results. The file is attached. Please try these commands and let me know the results:
Code: Select all
smoothDist6s -input P200k_e1220.sdds -output P200k_e1220.sddsx2 -factor 2
sddsplot -graph=dot -sep=1 -same -layout=2,2 -col=t,p P200k_e1220.sdds P200k_e1220.sddsx2
- Attachments
-
- smooth2x.png (11.3 KiB) Viewed 6985 times
Re: Unexpected phase space alteration with smoothDist6s
Dear Michael,
thank you for your fast reply.
I repeated the procedure with your attached file everything seems to work fine, I see the same result you showed me.
Can you, please, try to repeat the procedure with my beam file?
Thanks!
Marcello R. C.
thank you for your fast reply.
I repeated the procedure with your attached file everything seems to work fine, I see the same result you showed me.
Can you, please, try to repeat the procedure with my beam file?
Thanks!
Marcello R. C.
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Unexpected phase space alteration with smoothDist6s
Marcello,
The problem is that smoothDist6s has problems when the range of t values is small compared to the average t value. You can work around this as follows
If care about the average time coordinate, you can restore it as follows
We'll fix this problem in a future release. Thanks for reporting it.
--Michael
The problem is that smoothDist6s has problems when the range of t values is small compared to the average t value. You can work around this as follows
Code: Select all
sddsprocess Astra192k.sdds Astra192k.tmp -process=t,ave,tAve -redefine=col,t,"t tAve -",units=s
smoothDist6s -input Astra192k.tmp -output Astra192k.sddsx2 -factor 2
Code: Select all
sddsxref Astra192k.sddsx2 Astra192k.tmp -leave=* -transfer=parameter,tAve
sddsprocess Astra192k.sddsx2 -redefine=column,t,"t tAve +",units=s
--Michael
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Unexpected phase space alteration with smoothDist6s
Marcello,
Here's the fix.
--Michael
Here's the fix.
--Michael
- Attachments
-
- smoothDist6s-bugFix.zip
- (3.61 KiB) Downloaded 274 times
Re: Unexpected phase space alteration with smoothDist6s
Michael,
thanks a lot for the fix, it will be very useful!
Best regards,
Marcello
thanks a lot for the fix, it will be very useful!
Best regards,
Marcello
Re: Unexpected phase space alteration with smoothDist6s
Michael,
I just double-checked the behavior of the fix with the second beamfile I posted initially (because the bunch seemed to be already centered in t=0).
In that case the fix doesn't work, could it be because of the higher average energy of the particles?
The original beamfile is the following (it is not a file of mine, I took it from the Start-2-End repository of LCLS: http://www-ssrl.slac.stanford.edu/lcls/s2e/).
Thanks again Micheal for your patience,
Marcello Rossetti Conti
I just double-checked the behavior of the fix with the second beamfile I posted initially (because the bunch seemed to be already centered in t=0).
In that case the fix doesn't work, could it be because of the higher average energy of the particles?
The original beamfile is the following (it is not a file of mine, I took it from the Start-2-End repository of LCLS: http://www-ssrl.slac.stanford.edu/lcls/s2e/).
Thanks again Micheal for your patience,
Marcello Rossetti Conti
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Unexpected phase space alteration with smoothDist6s
Marcello,
For that file, the problem is that the script gets confused by the folded phase space. This makes the slice energy spread very large at the ends, which the script turns into a large rms energy spread. It isn't able to cope with the complex nonlinear correlations between energy and time. The best approach is to increase the number of particles at the beginning of the simulation where the phase space is less complicated, then track that to the end.
--Michael
For that file, the problem is that the script gets confused by the folded phase space. This makes the slice energy spread very large at the ends, which the script turns into a large rms energy spread. It isn't able to cope with the complex nonlinear correlations between energy and time. The best approach is to increase the number of particles at the beginning of the simulation where the phase space is less complicated, then track that to the end.
--Michael
Re: Unexpected phase space alteration with smoothDist6s
Perfect, good to know.
Thanks
Marcello
Thanks
Marcello
Re: Unexpected phase space alteration with smoothDist6s
Hi,
I am having a similar problem using smoothDist6s, attached is t-x and t-p phase space before (left) and after (right) smoothing. The command I used for smoothing is :
smoothDist6s -input 20190925_1B.sdds -output 20190925_1B.sdds.smth -factor 1 -betaSlices 500
The sdds file comes from ASTRA simulation, using astra2elegant program. The phase space does not have complex shape so I am not sure why it is not reproduced correctly.
It would be great if you can kindly take a look and give some suggestion.
Thanks for your help.
Weilun
I am having a similar problem using smoothDist6s, attached is t-x and t-p phase space before (left) and after (right) smoothing. The command I used for smoothing is :
smoothDist6s -input 20190925_1B.sdds -output 20190925_1B.sdds.smth -factor 1 -betaSlices 500
The sdds file comes from ASTRA simulation, using astra2elegant program. The phase space does not have complex shape so I am not sure why it is not reproduced correctly.
It would be great if you can kindly take a look and give some suggestion.
Thanks for your help.
Weilun
- Attachments
-
- 20190925_1B.sdds
- (106.81 MiB) Downloaded 197 times