Merging selected input from two sdds files
Posted: 29 Sep 2015, 09:40
Hello,
I am trying to create a summary file containing the results of an optimisation, containing for example the final quadrupole and sextupole values by family, final tunes, chromaticity etc. I am doing this in the following way:
sddsprocess myfile.param mag.out -match=col,ElementType=K* -match=col,ElementParameter=K*
sddssort mag.out -col=ElementName -unique
sddsprocess myfile.twi twiss.out -retain=param,nux,nuy,dnux/dp,dnuy/dp,alphac,alphac2 -retain=col,''
sddscombine twiss.out mag.out myfile.summary -merge
rm mag.out*
rm twiss.out
This seems to work OK, however, I would also like to add to the same file additional parameters such as Touschek lifetime, injection efficiency, etc from other files. For example, I also have a file called myfile.ltime which contains the parameter tLifetime, but I have not been able to work out a way to copy it across to myfile.summary.
If I create an intermediate file containing just tLifetime and then use sddscombine with the existing myfile.summary, then I get two pages with the tunes, chromaticity etc. parameters on page 1 (with tLifetime=0), and the lifetime on page 2 (with the tunes etc set to 0). Using the -merge option looks to keep tLifetime as 0 on page 1.
Does anyone know of a way to copy the value across using the sdds toolkit?
many thanks,
Ian
I am trying to create a summary file containing the results of an optimisation, containing for example the final quadrupole and sextupole values by family, final tunes, chromaticity etc. I am doing this in the following way:
sddsprocess myfile.param mag.out -match=col,ElementType=K* -match=col,ElementParameter=K*
sddssort mag.out -col=ElementName -unique
sddsprocess myfile.twi twiss.out -retain=param,nux,nuy,dnux/dp,dnuy/dp,alphac,alphac2 -retain=col,''
sddscombine twiss.out mag.out myfile.summary -merge
rm mag.out*
rm twiss.out
This seems to work OK, however, I would also like to add to the same file additional parameters such as Touschek lifetime, injection efficiency, etc from other files. For example, I also have a file called myfile.ltime which contains the parameter tLifetime, but I have not been able to work out a way to copy it across to myfile.summary.
If I create an intermediate file containing just tLifetime and then use sddscombine with the existing myfile.summary, then I get two pages with the tunes, chromaticity etc. parameters on page 1 (with tLifetime=0), and the lifetime on page 2 (with the tunes etc set to 0). Using the -merge option looks to keep tLifetime as 0 on page 1.
Does anyone know of a way to copy the value across using the sdds toolkit?
many thanks,
Ian