elegant2astra conversion

Moderators: cyao, soliday

simona.bettoni
Posts: 45
Joined: 06 Jul 2011, 03:14

elegant2astra conversion

Post by simona.bettoni » 18 Jun 2013, 04:29

Hi to all,
I need to convert the output of Elegant to an input for Astra. I see there is the function elegant2astra, but when I try to use it:
elegant2astra Run_Model.sdds Test.ini
where Run_Model is my Elegant output.
I get the message: "tmpname: Command not found."
What should I do?
Thanks for your help,
Simona.

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

Re: elegant2astra conversion

Post by michael_borland » 21 Jun 2013, 08:05

Simone,

It seems there is an unresolved dependency in that script.

Can you try the attached version instead?

--Michael
Attachments
elegant2astra.zip
(1016 Bytes) Downloaded 331 times

simona.bettoni
Posts: 45
Joined: 06 Jul 2011, 03:14

Re: elegant2astra conversion

Post by simona.bettoni » 24 Jun 2013, 02:06

It worked perfectly!
Thanks and have a nice day,
Simona.

radhakanta
Posts: 4
Joined: 28 Aug 2014, 15:17

Re: elegant2astra conversion

Post by radhakanta » 03 Nov 2014, 14:59

I may request you to help me to provide me the elegant command to convert the sdds file in to astra file and vice versa.
I tried with the following command to convert the astra file to sdds file:
astra2elegant TWS.0068.001 TWS1

But when I try to convert the sdds file TWS1 with the following command it does not run
elegant2astra TWS1.sdds astra.ini

I am confused whether the above commands work at all to convert the sdds file to astra file format and vice versa.

I tried with the zipped folder elegant2astra that was in the elegant forum discussion with Dr S. Bettoni.
But it doesn't work.
I have attached the astra and sdds file in a zip folder for your kind reference.
Attachments
astra-sdds.zip
(2.43 MiB) Downloaded 278 times

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

Re: elegant2astra conversion

Post by michael_borland » 03 Nov 2014, 18:32

If you try

Code: Select all

elegant2astra TWS1 astra.ini
it will work.

There is no need for the .sdds extension in the command because you didn't give a .sdds extension when you made the file. astra2elegant doesn't automatically add the extension.

--Michael

radhakanta
Posts: 4
Joined: 28 Aug 2014, 15:17

Re: elegant2astra conversion

Post by radhakanta » 04 Nov 2014, 07:30

Respected Sir,
I kept the 100TWS.0068.001 and elegant2astra files in the astra-sdds folder and typed the folloeing commands in the cygwin panel.
It gives the following results

R_DASH@R_DASH-VAIO ~/astra-sdds
$ astra2elegant 100TWS.0068.001 TWS1

R_DASH@R_DASH-VAIO ~/astra-sdds
$ elegant2astra TWS1 astra.ini
-bash: /cygdrive/c/Program Files/APS/Elegant x64/elegant2astra: /bin/csh: bad interpreter: Permission denied

please tell me the steps to follow to get the desired conversion of sdds file to astra format

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

Re: elegant2astra conversion

Post by michael_borland » 04 Nov 2014, 09:03

It appears that you don't have csh installed on your system. Your system administrator may be able to help install it.

--Michael

radhakanta
Posts: 4
Joined: 28 Aug 2014, 15:17

Re: elegant2astra conversion

Post by radhakanta » 05 Nov 2014, 00:55

Respected Sir,
Thank you for kind suggestion.
I installed .csh and could convert the sdds file to astra format.

But the previous file TWS.0068.001 and the new astra.ini do not exactly match.
I have attched the astra.ini file

Again, the astra.ini file generated is imported to MS Excel file for analysis, the data in the astra.ini file do not come
in column formats like the previous TWS.0068.001 file.

Could you please sort out the problem?
Attachments
astra.ini
(2.25 MiB) Downloaded 267 times

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

Re: elegant2astra conversion

Post by michael_borland » 05 Nov 2014, 14:38

The original file TWS.0068.001 appears not to be a valid astra beam output file. It is missing the fiducial particle on the first line. This messes up the astra2elegant conversion, because that program assumes that the first row in the file is the fiducial particle.

--Michael

simona.bettoni
Posts: 45
Joined: 06 Jul 2011, 03:14

Re: elegant2astra conversion

Post by simona.bettoni » 16 Jan 2015, 05:49

Hello,
I am trying to use the elegant2astra conversion file, but I have a problem. When I use it on a binary file generated by Elegant is working perfectly, but when I try to apply the conversion to an ascii file which I generate I am not able to make it work.
./elegant2astra elegant_distr.sdds start_astra.sim
and I have
"
error: problem completing processing definition
Error for sddsprocess:
column Charge does not exist
Error for sddscombine:
Unable to read layout--no header lines found (SDDS_ReadLayout)
Error for sddsprocess:
Unable to read layout--no header lines found (SDDS_ReadLayout)
Error for sdds2plaindata:
Unable to read layout--no header lines found (SDDS_ReadLayout)
"
I upload also the file I want to convert.
Thanks for any help.
Attachments
elegant_distr.sdds
(684.05 KiB) Downloaded 271 times

Post Reply