Additional for irregular scales

I would like to see an extension of a function that for a NewImage and for AppendImage you can display data with an irregular scale similar to Display and AppendtoGraph with the addition vs scale_wave?
Currently you can only solve the whole thing by interpolating missing data points into a new wave. Or is this already possible and I have missed it?

For a regular scale, yes you can store it in the wave with dimoffset and dimselta. Maybe this could be extended to store an irregular scale in a wave (i.e. store one value per row, column and layer). I don't know how complicated this wish is.

And for the FuncFit, would it be possible to include a flag for weighting for irregular scaling so that regions with higher data point density do not have a greater impact on a fit than regions with lower data point density?

You can specify scaling waves (xWaveName, yWaveName) for AppendImage:

AppendImage [/G=g /W=winName ][axisFlags ] matrix   [vs {xWaveName, yWaveName }]

replace xWaveName with * if you want to use only yWaveName

The scale waves must have one more point than the corresponding image dimension because they define the edges of the pixels.

For FuncFit, you are free to provide a weighting wave with whatever contents you wish. But I question if "irregular scaling so that regions with higher data point density do not have a greater impact on a fit" is statistically sound. In those areas of greater density, you have more information, so those points *should* have more weight.

@tony: Ok, thanks! Then my wish would be that this function of AppendImage is also included in NewImage.

@johnweeks: Yes, it's probably for a more specific case. In itself, it is correct that the weighting should be higher for an area with more measuring points. I'll take a look at it! Thanks!

---

And of course a storage option for an irregular scale in Waves would be great.

In reply to by ggermer

"And of course a storage option for an irregular scale in Waves would be great."

That's called an XY pair :)

You can get the same effect (more or less) with a two-column wave where column 0 is X and column 1 is Y (or the other way around). You can make a graph:

Display twocolwave[][1] vs towcolwave[][0]

And FuncFit also accepts syntax like that. Not all functions and operations will accept that syntax, though.

But for multidimensional waves this won't work, right?

It would certainly be a bit more elegant if you could store the scaling separately from the data points, or perhaps couple something like a scaling wave together with the data wave into a bundle. But in itself, the idea of simply having another row/column/layer per dimension containing the scale is quite a good idea. I will try it, thanks!

Ah- by the time we got down this far, I forgot we were talking about an image. Irregular wave scaling info for an image would have the same problem as X and Y auxiliary waves for an image: you need N+1 values. Regular wave scaling works for images because it is a simple computation that can be extrapolated in a clear way to N+1 values.