johnweeks Like this? Function overlayTraces(graphName, overlayPoint) String graphName Variable overlayPoint if (strlen(graphName) == 0) graphName = WinName(0,1) endif String traces = TraceNameList(graphName, ";", 1) Variable ntraces = ItemsInList(traces) Variable i String trace0 = StringFromList(0, traces) Wave w0 = TraceNameToWaveRef(graphName, trace0) Variable commonValue = w0[overlayPoint] for (i = 1; i < ntraces; i += 1) String tname = StringFromList(i, traces) Wave wn = TraceNameToWaveRef(graphName, tname) Variable YatOverlay = wn[overlayPoint] Variable dif = commonValue - YatOverlay ModifyGraph offset($tname)={0, dif} endfor end I leave as an exercise the task of using this as a framework for the subtraction task :) John Weeks WaveMetrics, Inc. support@wavemetrics.com Log in or register to post comments March 3, 2016 at 02:48 pm - Permalink
RSH Hello thank you! I found a satisfying solution that, while not completely automated, is a good compromise between result and invested time writing a proper procedure. Thanks again! Log in or register to post comments March 4, 2016 at 02:20 pm - Permalink
String graphName
Variable overlayPoint
if (strlen(graphName) == 0)
graphName = WinName(0,1)
endif
String traces = TraceNameList(graphName, ";", 1)
Variable ntraces = ItemsInList(traces)
Variable i
String trace0 = StringFromList(0, traces)
Wave w0 = TraceNameToWaveRef(graphName, trace0)
Variable commonValue = w0[overlayPoint]
for (i = 1; i < ntraces; i += 1)
String tname = StringFromList(i, traces)
Wave wn = TraceNameToWaveRef(graphName, tname)
Variable YatOverlay = wn[overlayPoint]
Variable dif = commonValue - YatOverlay
ModifyGraph offset($tname)={0, dif}
endfor
end
I leave as an exercise the task of using this as a framework for the subtraction task :)
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
March 3, 2016 at 02:48 pm - Permalink
I found a satisfying solution that, while not completely automated, is a good compromise between result and invested time writing a proper procedure.
Thanks again!
March 4, 2016 at 02:20 pm - Permalink