Hi Michael,
Is there a command to output the last entry of a specified column in an SDDS file (e.g. you want the exit beta functions from a .twi file)? I have no doubt that this can be done, but a from a quick glance through the OAG manual, it wasn't clear to me how to do it.
Thanks,
chris
SDDS: Output last entry of a column
Moderators: cyao, michael_borland
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: SDDS: Output last entry of a column
Chris,
You need to use several commands togther. One way using SDDS tools only is
sddsprocess data.twi -clip=0,1,invert -pipe=out | sdds2stream -pipe -column=betax
Another way is
sdds2stream data.twi -column=betax | tail -1
If you are using the data inside elegant in an optimization term, you can use rpn_load. If you want to continue beta function calculations from a previous segment, you can use the reference_file feature of twiss_output.
--Michael
You need to use several commands togther. One way using SDDS tools only is
sddsprocess data.twi -clip=0,1,invert -pipe=out | sdds2stream -pipe -column=betax
Another way is
sdds2stream data.twi -column=betax | tail -1
If you are using the data inside elegant in an optimization term, you can use rpn_load. If you want to continue beta function calculations from a previous segment, you can use the reference_file feature of twiss_output.
--Michael