one very simple and stupid question:
i have one trace which is not stable, and has a little bit slope, i just want to make the the trace stable, i mean horizonal, how to do it? i think it's not fitting,
just some way to make it parraler with x axis.
The usual way to do that is to subtract a trend line. The line might be fitted to the part of the data that you think should be horizontal, or it might be a line connecting two points.
What does your data look like? What is your ultimate goal?
my data is exported from patchmaster as igor text data, actually is just a trace with some single channel on it, but the trace is not horizonal with some slope, i want the trace is horizonal which looks good.
and just find another post on this website, somebody has asked the same question, and Adam light has replied, see following:
but when i paste the code into an Igor procedure window, run, erro pup out, it show " expected wave name, variable name, or operation“， what this mean? do i name my file wrongly? i named my file as" sweep1".
sorry new person to igor..
In order for us to diagnose the problem you will need to provide instructions for reproducing it, for example, a set of Igor commands that cause the error message. Or post an experiment and instructions that would enable us to reproduce the error.
Short of that, a wild guess is that your procedures are uncompiled. For details execute these two commands one-at-a-time and read the displayed help:
DisplayHelpTopic "Compiling the Procedures"
From your description, it sounds like John Weeks is correct and I'll try to elaborate a little. Lets say your data is super-imposed on a linear slope. You can create a wave which then represents this linear line. Simply use two points, which should be at equal values [baseline], to get the slope and use the y-intercept to re-create the line. Finally, subtract this linear line from your data.
linear_line = slope*p + y_intercept
data -= linear_line
In general you might have something other than a linear offset so you need to make sure you are using the correct equation to represent your baseline offset.
You might also look at the Projects tab and browse those related to Analysis or Curve Fitting. At least two packages are posted that propose to do baseline fitting.
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
If you are trying to correct for a baseline shift that changes during the duration of a single trace (that is, a slope), then the code I posted previously that you linked to isn't appropriate. You need to do what John suggests and calculate a trend line and subtract that.
Pen ..I use the following code by Tony for the purpose you mentioned. it works flawlessly !!! Try it.
Back to top