Page 1 of 2
elegant2astra conversion
Posted: 18 Jun 2013, 04:29
by simona.bettoni
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.
Re: elegant2astra conversion
Posted: 21 Jun 2013, 08:05
by michael_borland
Simone,
It seems there is an unresolved dependency in that script.
Can you try the attached version instead?
--Michael
Re: elegant2astra conversion
Posted: 24 Jun 2013, 02:06
by simona.bettoni
It worked perfectly!
Thanks and have a nice day,
Simona.
Re: elegant2astra conversion
Posted: 03 Nov 2014, 14:59
by radhakanta
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.
Re: elegant2astra conversion
Posted: 03 Nov 2014, 18:32
by michael_borland
If you try
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
Re: elegant2astra conversion
Posted: 04 Nov 2014, 07:30
by radhakanta
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
Re: elegant2astra conversion
Posted: 04 Nov 2014, 09:03
by michael_borland
It appears that you don't have csh installed on your system. Your system administrator may be able to help install it.
--Michael
Re: elegant2astra conversion
Posted: 05 Nov 2014, 00:55
by radhakanta
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?
Re: elegant2astra conversion
Posted: 05 Nov 2014, 14:38
by michael_borland
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
Re: elegant2astra conversion
Posted: 16 Jan 2015, 05:49
by simona.bettoni
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.