Page 1 of 1

astra2elegant error

Posted: 27 May 2016, 07:50
by libov
Dear Experts,

sometimes when I run astra2elegant tool, it gives me the following error:

"Error (astra2elegant): problem reading reference particle data"

Does that mean there's a problem with the astra file?

Attached is the file which gives such an error. It was obtained by running the 'generator' program from the astra package. The input deck for the program is also attached (generator.in)

This is the way I run the tool:

Code: Select all

$ astra2elegant 500pC.ini 500pC.sdds
Error (astra2elegant): problem reading reference particle data
Thanks!
Slava

Re: astra2elegant error

Posted: 27 May 2016, 08:19
by michael_borland
The problem is that the flag value (the last value in the row) for the first row is -1, whereas astra2elegant expects it to be 5. I don't recall exactly what these flag values signify, but I vaguely recall that a negative value means the particle was lost.

One way to workaround the problem is thus to manually edit the file. However, you'd need to edit the flag values for the other rows as well, since they are all negative.

--Michael

Re: astra2elegant error

Posted: 02 Feb 2018, 08:22
by MDP
Dear Michael,

we have the exact same problem when we try to convert a Astra distribution with astra2elegant.
The last number in all linea were already changed from -1 to 5 as you recommended in the answer shown above.

Is there any other possible reason for that error message?

Many thanks in advance,
Matthias

Re: astra2elegant error

Posted: 02 Feb 2018, 08:45
by michael_borland
Matthias,

I'm not a regular ASTRA user, so I don't know the answer. Perhaps the ASTRA developers can tell you. If, based on that, you think a change is warranted to astra2elegant, please let me know.

--Michael