Page 1 of 1

sdds command help

Posted: 19 May 2010, 12:40
by tennant
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

Re: sdds command help

Posted: 19 May 2010, 14:27
by soliday
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 /"

Re: sdds command help

Posted: 20 May 2010, 07:28
by tennant
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).

Re: sdds command help

Posted: 20 May 2010, 08:18
by michael_borland
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

Re: sdds command help

Posted: 20 May 2010, 08:22
by tennant
This works great. Thanks!