elegant2astra different results

Moderators: cyao, michael_borland

Post Reply
rajabi
Posts: 3
Joined: 30 Apr 2019, 10:52
Location: Netherlands

elegant2astra different results

Post by rajabi » 14 May 2019, 03:16

Hi,
I have a problem with converting elegant to Astra. I will truly be grateful if someone can help me.
I convert the output of the Astra to elegant and use Alpha magnet optimizer to find an optimized parameter for Alpha magnet.
When I use Elegant in the following beamline, the numbers from the optimizer are correct and the bunch will be compressed exactly in a distance obtained by the optimizer.
However, when I convert the bunch from elegant to Astra immediately after the Alpa magnet and use Astra for particle tracking, the distance that gives the final compression, will be different significantly.
I also checked it with GPT, the results were the same as Astra.
Can anyone tell me what should I do to correct it?
Thanks

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: elegant2astra different results

Post by michael_borland » 22 May 2019, 14:37

Are you using astra2elegant and elegant2astra to perform the conversions? What is included in the beamline downstream of the alpha magnet?

If you can post files, that would help.

--Michael

rajabi
Posts: 3
Joined: 30 Apr 2019, 10:52
Location: Netherlands

Re: elegant2astra different results

Post by rajabi » 02 Jun 2019, 02:36

Hi,
Many thanks for your reply and my apologies for the delay.
Here I attached some files and the picture of the results from ASTRA and GPT.
As you can see, the distance after alpha magnet in GPT is too different from ELEGANT and ASTAR but the final compression is like ELEGANT.
In Astra, both distance and the minimum bunch length are different from ELEGANT and GPT.
Thank you again for your kind help. :)
Attachments
Final_Files.zip
(817.6 KiB) Downloaded 194 times

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: elegant2astra different results

Post by michael_borland » 07 Jun 2019, 10:54

I'm having a bit of difficulty understanding which files I'm supposed to compare, but maybe the following observations will help:
  • In elegant, the 't' value in the phase space output files give the full time of flight, including any time of flight given for the particle initially. Other programs (e.g., ASTRA) give the distance in meters ahead of or behind a reference particle. Hence, the shape in phase space may be similar, but the absolute coordinates will be different.
  • You set ORDER=2 on the alpha magnet. ORDER=3 is available, though it will only matter if the energy spread or emittance is large.
--Michael

rajabi
Posts: 3
Joined: 30 Apr 2019, 10:52
Location: Netherlands

Re: elegant2astra different results

Post by rajabi » 09 Jun 2019, 16:39

Thanks, Michael,
I understand the mechanism of time and distance in ASTRA and ELEGANT.

As you can see, the alpha magnet optimizer in the compress.new file gives DRIF, L=0.8807618174611787.
As I understand, this is the length we expect maximum compression from our alpha magnet.

However, as it is obvious when I convert the output of the alpha magnet (immediately after alpha) from ELEGANT to ASTRA and GPT, the results are different.

In Astra (astra_sim.jpg), the minim length (~762 fs) occurs at z=0.66 m. Both of them are different from ~438 fs at z=0.88 m of ELEGANT.

The situation in GPT is worse (GPT_sim.jpg). I convert the ASTRA file to GPT file and simulate the system after the alpha magnet.
the minimum bunch length occurs at 3.4 m from the alpha magnet. However, the minimum bunch length in GPT is the same as ELEGANT (pwatch.xls,
st=4.38E-13).

Neither the energy spread nor emittance is large, and I think Order=2 is enough for my simulation.

--Ali

Post Reply