Remapping some waves
Thu, 05/28/2020 - 10:52 am
Here is the problem I have a set of waves which are measurements that have been broken up and I want to reconstruct a single wave. The waves have different x scaling and there is a break between them were no data was collected. There are also much higher frequency than I actually need so I can down sample.
I have created a master wave that has x scaling that represents the range of the samples. I found out that I cannot use straight forward x mapping within functions and am forced to use point scaling. It compiles ok, but when I run it I keep getting out of range errors on the last assignment.
String runs =nameofwave(sensor)
sensor = nan
listOfRuns = wavelist("*_sm",";","")
maxindex = itemsInList(listOfRuns)
wave subset = $(stringfromList(index,listOfRuns))
//x value at the end of the subset wave
endpoint = x2pnt(sensor,endx)
sensor[startpoint,endpoint] = subset(pnt2x(sensor,p))
I am trying to figure where things go astray.
Pointers or a better way to do this would be most appreciated.