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
sdds command help
Moderators: cyao, michael_borland
sdds command help
- Attachments
-
- test.sdds
- (44.75 KiB) Downloaded 152 times
Re: sdds command help
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 /"
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
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).
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: sdds command help
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
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
This works great. Thanks!