Page 1 of 1

Merging selected input from two sdds files

Posted: 29 Sep 2015, 09:40
by imartin
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

Re: Merging selected input from two sdds files

Posted: 30 Sep 2015, 02:44
by michael_borland
Ian,

Please see attached for an example. The key is to use sddsxref (sdds cross-reference).

--Michael

Re: Merging selected input from two sdds files

Posted: 01 Oct 2015, 10:39
by imartin
Thanks Michael,
as you say, using sddsxref (and sddscollapse) is the key,
Ian