Wave "scaling" to include uncertainty / errors

It would be nice if there was a way to associate uncertainties directly with a wave, so that one could propagate calculation uncertainties effortlessly, and minimize "messiness".

The wave error could be a "hidden" attribute of a wave much like wave scaling but not entirely - since it could not be calculated like wave scales are.
Joel,
I posted a snippet for uncertainty propagation at: http://www.igorexchange.com/node/1584.
There is probably room for improvement. At the moment uncertainties are assumed to be in a separate wave. One modification that would approach your problem would be to use a 2 column wave, where the second column is the associated uncertainty.
Furthermore, you can use one column of a wave to display a graph trace, and another column of the same wave to add error bars. Try these commands to see it:
make/N=(10,2) junk
junk[][0]=p
junk[][1]=1
display junk[][0]
ErrorBars junk Y,wave=(junk[][1],junk[][1])

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
johnweeks wrote:
Furthermore, you can use one column of a wave to display a graph trace, and another column of the same wave to add error bars. Try these commands to see it:
make/N=(10,2) junk
junk[][0]=p
junk[][1]=1
display junk[][0]
ErrorBars junk Y,wave=(junk[][1],junk[][1])

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com


...and you can use dimension labels if you don't want to get confused by column indices

setdimlabel 1, 0, data, junk
setdimlabel 1, 1, error, junk
edit junk.ld
display junk[][%data]
ErrorBars junk Y,wave=(junk[][%error],junk[][%error])


C


Chris,

Very nice solution, I may implement that. Though the huge downside is that the data browser will no longer work.

With dimension labels the Wish List could be changed to simply add the ability for the Data Browser to manage this.