Ouput data vectors for plotting T166 vs z

Moderators: cyao, michael_borland

Post Reply
Björklund
Posts: 84
Joined: 19 May 2016, 07:14

Ouput data vectors for plotting T166 vs z

Post by Björklund » 23 Nov 2018, 03:21

Hi,

I want to make plots of T166 and T266 (and possibly U1666 and U2666) as a function of position along the beamline, and I want to do be able to do it in some other software, for example directly in a TeX file. This means that I would like to get e.g. the total T166 after each element as well as the corresponding z value output to a text file. Is there such an option, either directly in elegant or using some sdds command?

Best regards
Jonas

Björklund
Posts: 84
Joined: 19 May 2016, 07:14

Re: Ouput data vectors for plotting T166 vs z

Post by Björklund » 25 Nov 2018, 04:33

Hi again!

So, I managed to find a solution on my own, I'll post it here in case someone else has the same question at some point. It wasn't obvious to me how to do this at first, but in the end it was very simple!

First, the "SDDS_output" parameter must be set within "&matrix_output", for the example here I put 'SDDS_output=".\output\%s.matr.sdds",'. The regular "printout" parameter doesn't produce an SDDS file, although that one is sort of easy to look at by eye.

Anyhow, after the SDDS_output file has been created, just go to the \output\ folder (or wherever you want to put the file) and run the command
"sdds2plaindata mySDDSmatrix.matr.sdds s_T166_T266.txt -outputMode=ascii "-separator= " -column=s -column=T166 -column=T266".

Easy as pie (once I figured it out, haha), I think I should get more acquainted with the SDDS options!
Best regards
Jonas

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

Re: Ouput data vectors for plotting T166 vs z

Post by michael_borland » 26 Nov 2018, 15:53

Jonas,

That's pretty much the solution I would have suggested. Thanks for posting it.

--Michael

Post Reply