elegant2astra

Moderators: cyao, michael_borland

Post Reply
headdoggy64
Posts: 36
Joined: 18 Jul 2014, 12:44

elegant2astra

Post by headdoggy64 » 08 Sep 2014, 13:44

Hello all,

I am having an issue with elegant2astra conversion tool.

After creating a bunch:

Code: Select all

&bunched_beam 
  bunch                    = %s.bun,
  n_particles_per_bunch=50000,
  sigma_s = 5.7735e-7
  sigma_dp = 1e-3
  emit_nx = 1e-6,
  emit_ny = 1e-6, 
  use_twiss_command_values = 1,
  distribution_type[0]     = "gaussian",
  distribution_type[1]     = "gaussian",
  distribution_type[2]     = "hard-edge",
  distribution_cutoff[0]   = 3.0,
  distribution_cutoff[1]   = 3.0,
  distribution_cutoff[2]   = 3.00,
  symmetrize               = 1,
  enforce_rms_values[0]    = 1,
  enforce_rms_values[1]    = 1,
  enforce_rms_values[2]    = 1,
  Po= 1000
&end
I convert it into Astra:

Code: Select all

elegant2astra fodo.bun hardedge.in
and getting this in Astra:

Code: Select all

     total charge                      Q =            NaN nC
     horizontal beam position          x =            NaN mm
     vertical beam position            y =            NaN mm
which ruins the process.

What am I doing wrong here? Thank you.

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

Re: elegant2astra

Post by michael_borland » 15 Sep 2014, 16:57

There are two problems:
* The charge is not defined in the &bunched_beam output file, since it is only defined after passing through a CHARGE element.
* The twiss parameters are (presumably) not defined, yet you use "use_twiss_command_values = 1" in the &bunched_beam command.

See attached files, and try

Code: Select all

% elegant run1.ele
% elegant2astra run1.out run1.astra
% head run1.astra
--Michael
Attachments
2014-09-15.zip
(686 Bytes) Downloaded 342 times

headdoggy64
Posts: 36
Joined: 18 Jul 2014, 12:44

Re: elegant2astra

Post by headdoggy64 » 15 Sep 2014, 22:31

Thank you!
I figured this out. One can always redefine the charge values in the .bun file with sddsprocess.

Post Reply