sdds command help

Moderators: cyao, michael_borland

Post Reply
tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

sdds command help

Post by tennant » 19 May 2010, 12:40

Hi,

I have an SDDS file (attached) in which contains a column of MAL.DP and betaxFinal values (among other things). What I would like to do is calculate (betaxFinal-betaxFinal0)/betaxFinal0 where betaxFinal is the value corresponding to MAL.DP being zero. Just wondering if there is a way to do that in a fairly straight forward manner.

Thanks,
chris
Attachments
test.sdds
(44.75 KiB) Downloaded 152 times

soliday
Posts: 393
Joined: 28 May 2008, 09:15

Re: sdds command help

Post by soliday » 19 May 2010, 14:27

Here is what I would do:

sddsprocess test.sdds -pipe=out -filter=column,MAL.DP,0.0,0.0 | sdds2stream -pipe=in -col=betaxFinal

This returns 7.431099999999999e-01

Next run:

sddsprocess test.sdds test2.sdds "-define=column,betaxFinalNormalized,betaxFinal 7.431099999999999e-01 - 7.431099999999999e-01 /"

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: sdds command help

Post by tennant » 20 May 2010, 07:28

Thanks. I was hoping to find a solution that did not require any user intervention (i.e. where one has to type the value generated by the first set of commands into the second command).

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

Re: sdds command help

Post by michael_borland » 20 May 2010, 08:18

Chris,

Try this:

sddsprocess test.sdds test1.sdds -process=beta?Final,first,%s0,functionOf=MAL.DP,lower=-1e-6,upper=1e-6 -define=col,%sNormalized,"%s %s0 - %s0 /",select=beta?Final

sddsplot -col=MAL.DP,beta?FinalNormalized -graph=line,vary test1.sdds

--Michael

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: sdds command help

Post by tennant » 20 May 2010, 08:22

This works great. Thanks!

Post Reply